dbrock / bongo

Play music with GNU Emacs
http://www.emacswiki.org/emacs/Bongo
Other
207 stars 22 forks source link

Wrap internal UI updates in `with-silent-modifications` form #44

Closed iqbalansari closed 7 years ago

iqbalansari commented 7 years ago

Currently the buffer is marked as modified even for internal UI updates (like adding track timings), this can be annoying since it adds irrelevant entries the undo list of the Bongo buffer leading to unexpected behaviour when the user does an undo. As a concrete example consider this

  1. User removes a track
  2. The timing of the currently playing track is updated (via Bongo)

Without this commit each of the above events, will each generate an undo event, so if user will wants to undo the addition of the track he will have to execute undo twice instead of just once.

Using with-silent-modifications avoids the above scenario

dbrock commented 7 years ago

Ahh, yeah, this is annoying!

Did you check that saving a Bongo buffer to a file and loading it back still works?

iqbalansari commented 7 years ago

Did you check that saving a Bongo buffer to a file and loading it back still works?

Yes I tried that and it is working correctly.

dbrock commented 7 years ago

Nice!! 😂 😹 💯 🕹 🥇