From 66df3dd061c024b1e72de5f0d03587f109ffc1a9 Mon Sep 17 00:00:00 2001 From: forcer Date: Wed, 14 Sep 2005 12:40:00 +0000 Subject: emms-playlist-new, emms-playlist-set-playlist-buffer: New commands. darcs-hash:20050914124043-2189f-596b94d21d7715a023d574e9bb97efe001f0a266.gz --- emms.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'emms.el') diff --git a/emms.el b/emms.el index f75c501..e3dbf79 100644 --- a/emms.el +++ b/emms.el @@ -400,6 +400,21 @@ Otherwise, return the type and the name with a colon in between." "The marker for the currently selected track.") (make-variable-buffer-local 'emms-playlist-selected-marker) +(defun emms-playlist-set-playlist-buffer (&optional buffer) + "Set the current playlist buffer." + (interactive "bNew playlist buffer: ") + (setq emms-playlist-buffer (or (get-buffer buffer) + (current-buffer)))) + +(defun emms-playlist-new () + "Create a new playlist buffer." + (interactive) + (let ((buf (get-buffer emms-playlist-buffer-name))) + (when buf + (with-current-buffer buf + (rename-buffer (generate-new-buffer-name emms-playlist-buffer-name)))) + (emms-playlist-clear))) + (defun emms-playlist-clear () "Clear the current playlist. If a buffer named `emms-playlist-buffer-name' exists, this is -- cgit v1.2.3