From acbd7af54e907f0fb4aeb199883491176dbfa35b Mon Sep 17 00:00:00 2001 From: Fran Burstall Date: Tue, 25 Sep 2018 23:27:17 +0100 Subject: * lisp/emms-playlist-limit.el: recycle derived playlist --- lisp/emms-playlist-limit.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/emms-playlist-limit.el b/lisp/emms-playlist-limit.el index d4e38c0..e9f864a 100644 --- a/lisp/emms-playlist-limit.el +++ b/lisp/emms-playlist-limit.el @@ -116,7 +116,7 @@ (let ((old-buf (current-buffer))) (switch-to-buffer emms-playlist-limit-original-playlist) (emms-playlist-set-playlist-buffer) - (kill-buffer old-buf)))) + (bury-buffer old-buf)))) (define-key emms-playlist-mode-map (kbd "/ n") 'emms-playlist-limit-to-name) (define-key emms-playlist-mode-map (kbd "/ a") 'emms-playlist-limit-to-info-artist) @@ -157,8 +157,10 @@ usable date when TYPE is 'info-year." (lambda (track) (let ((field (emms-playlist-limit-track-get track type))) (and field (string-match regexp field)))) tracks)) - (new-playlist (emms-playlist-new bufname))) + (new-playlist (or (get-buffer bufname) + (emms-playlist-new bufname)))) (with-current-buffer new-playlist + (erase-buffer) (mapc #'emms-playlist-insert-track filtered-tracks)) new-playlist)) -- cgit v1.2.3