aboutsummaryrefslogtreecommitdiff
path: root/emms.el
diff options
context:
space:
mode:
authorforcer <forcer>2005-09-14 12:40:00 +0000
committerforcer <mwolson@gnu.org>2005-09-14 12:40:00 +0000
commit66df3dd061c024b1e72de5f0d03587f109ffc1a9 (patch)
treea35afa86fe42f010529e5a3bc4cb4b351f39bcae /emms.el
parent935c96b110747ea774d6e9a8ddb8d4d73e93b58e (diff)
emms-playlist-new, emms-playlist-set-playlist-buffer: New commands.
darcs-hash:20050914124043-2189f-596b94d21d7715a023d574e9bb97efe001f0a266.gz
Diffstat (limited to 'emms.el')
-rw-r--r--emms.el15
1 files changed, 15 insertions, 0 deletions
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