emms-help
[Top][All Lists]
Advanced

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

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


From: Yoni Rabkin
Subject: Re: [emms-help] [Patch] Fix bugs in xxx-clear/current-kill functions
Date: Wed, 09 Jan 2019 10:32:38 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Carlos Pita <address@hidden> writes:

> Hi,
>
> 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
> emms-playlist-clear.

The behavior of the function is correct, so I fixed the doc string.

> 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).

(kbd "C") can call `emms-playlist-clear' directly, and since nobody
calls `emms-playlist-mode-clear' it can be removed. I changed that.

> 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.

I don't know that the behavior of `emms-playlist-current-kill' makes
sense. I'll have to review it.

> Best regards
> --
> Carlos
>
> [1] http://lists.gnu.org/archive/html/emms-help/2019-01/msg00010.html
>
>
> _______________________________________________
> Emms-help mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/emms-help
>

-- 
   "Cut your own wood and it will warm you twice"



reply via email to

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