[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emms-help] [Patch] Fix bugs in xxx-clear/current-kill functions

From: Carlos Pita
Subject: [emms-help] [Patch] Fix bugs in xxx-clear/current-kill functions
Date: Sun, 6 Jan 2019 17:23:08 -0300


There are some bugs in the family of functions mentioned in the subject:

1. emms-playlist-clear doesn't create a new playlist as announced in
the docstring. Indeed, the docstring seems to be copy-pasted from
emms-playlist-current-clear. AFAICS is plainly wrong for

2. emms-playlist-mode-clear unnecessarily and faulty repeats code in
emms-playlist-clear, forgetting to call emms-playlist-cleared-hook in
some cases.

3. Despite its documentation, emms-playlist-mode-clear will fail when
the current buffer is not an emms playlist one, since it calls
emms-playlist-clear which starts by ensuring the current buffer is a
playlist. Probably the intention was to call
emms-playlist-current-clear instead (and probably
emms-playlist-mode-clear should be renamed to
emms-playlist-mode-current-clear for consistency).

Also, there is an usability issue I discussed in [1]:

4. Killing a playlist while in in playlist mode should move to the
next one, if any, instead of "closing" emms. If there is no next one,
just bury the current one (here I'm being conservative, it's the
current behavior, intended or not). This improves usability and more
closely aligns the behavior of emms-playlist-mode-current-kill to that
of emms-playlist-current-kill.

I'm sending a patch fixing all the above. I've taken special care of
documenting the exact behavior of all functions, specially for corner
cases. All in all, the code has been simplified. Every single change
has been documented in the commit message. Fill free to amend it if
you don't agree with everything.

Best regards

[1] http://lists.gnu.org/archive/html/emms-help/2019-01/msg00010.html

Attachment: 0001-Fix-bugs-in-xxx-clear-current-kill-functions.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]