aboutsummaryrefslogtreecommitdiff
path: root/emms.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-11-19 05:20:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-11-19 05:20:00 +0000
commitb19d65da017e9a95fd018bf1c205f5d18b95ce8f (patch)
tree908f56f4459c62fd6de473463cfd085b2a75f2b9 /emms.el
parentb4b5e24a6ce5b7049a95ddc66949b7b1d1b99d67 (diff)
emms.el: In emms-playlist-set-playlist-buffer, prompt user from available EMMS playlist buffers rather than all buffers, and display feedback upon setting the current buffer, since this is not an easy change to see
darcs-hash:20061119052023-1bfb2-145fb4f51da6d1bff473343442ddb9ea207ffded.gz
Diffstat (limited to 'emms.el')
-rw-r--r--emms.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/emms.el b/emms.el
index 52f5547..d556522 100644
--- a/emms.el
+++ b/emms.el
@@ -639,13 +639,23 @@ for that purpose.")
(defun emms-playlist-set-playlist-buffer (&optional buffer)
"Set the current playlist buffer."
- (interactive "bNew playlist buffer: ")
+ (interactive
+ (list (let* ((buf-list (mapcar #'(lambda (buf)
+ (list (buffer-name buf)))
+ (emms-playlist-buffer-list)))
+ (shortest (car (sort buf-list #'(lambda (lbuf rbuf)
+ (< (length (car lbuf))
+ (length (car rbuf))))))))
+ (completing-read "Playlist buffer to make current: "
+ buf-list nil t shortest))))
(let ((buf (if buffer
(get-buffer buffer)
(current-buffer))))
(with-current-buffer buf
(emms-playlist-ensure-playlist-buffer))
- (setq emms-playlist-buffer buf)))
+ (setq emms-playlist-buffer buf)
+ (when (interactive-p)
+ (message "Set current EMMS playlist buffer"))))
(defun emms-playlist-new (&optional name)
"Create a new playlist buffer.