aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorFran Burstall <feb@maths.bath.ac.uk>2018-09-25 23:27:17 +0100
committerFran Burstall <feb@maths.bath.ac.uk>2018-09-25 23:27:17 +0100
commitacbd7af54e907f0fb4aeb199883491176dbfa35b (patch)
tree8e565d0903b5611bc6bcc7a05914b68dd987df47 /lisp
parent309babf7af4a05faae2a1d91dcad94812e99a3db (diff)
* lisp/emms-playlist-limit.el: recycle derived playlist
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emms-playlist-limit.el6
1 files changed, 4 insertions, 2 deletions
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))