[Top][All Lists]

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

Re: [emms-help] BUG: emms-playlist-limit trashes persisted playlists

From: Fran Burstall (Gmail)
Subject: Re: [emms-help] BUG: emms-playlist-limit trashes persisted playlists
Date: Wed, 20 Jun 2018 21:17:11 +0100

Here is a tiny patch that fixes the problem for me: emms-history-load should run emms-playlist-source-inserted-hook when loading each playlist.


diff --git a/lisp/emms-history.el b/lisp/emms-history.el
index 9b913b2..2f75571 100644
--- a/lisp/emms-history.el
+++ b/lisp/emms-history.el
@@ -120,6 +120,7 @@ Emacs."
                 (setq buf (current-buffer)))
             (mapc 'emms-playlist-insert-track
                   (nth 2 playlist))
+     (run-hooks 'emms-playlist-source-inserted-hook)
               (emms-playlist-select (cadr playlist)))))
         (setq emms-playlist-buffer buf)

On Mon, 18 Jun 2018 at 17:23, Yoni Rabkin <address@hidden> wrote:
Fran Burstall <address@hidden> writes:

> I have a playlist created from emms-history-load.  In the
> playlist buffer I do /a to limit to an artist and then // to
> get the whole playlist back.
> What I expect: to see the whole playlist in the buffer.
> What I get: the buffer has been erased and is now completely
> empty.
> Reason: emms-playlist-limit-to-all repopulates the buffer
> from the contents of the var emms-playlist-limit-tracks but
> this is apparently not set for playlists created by
> emms-history-load.
> A possible fix would be to do
> (run-hooks 'emms-playlist-source-inserted-hook)
> in emms-history-load but that would only work if
> emms-playlist-limit-tracks was buffer-local (or there was
> only one playlist in the history.)

The fact that `emms-playlist-limit-tracks' isn't buffer-local is a
bug. I fixed that.

The rest of the code in emms-playlist-limit.el is pretty basic and needs
a lot of work to avoid several other issues. I'll add that to the list,
but I can't guarantee when it'll all get done.

In the meantime if you feel like sending in patches...

In any case, thank you for the bug reports.

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

reply via email to

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