From e14816295f37f7c03531b16cbba95bcaaac82a74 Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 20 Apr 2006 22:31:00 +0000 Subject: emms-metaplaylist-mode.el: new function to create a new empty EMMS playlist. darcs-hash:20060420223126-4f952-0ed23bd23c06cf7febd995919cb8b95b75b01765.gz --- emms-metaplaylist-mode.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/emms-metaplaylist-mode.el b/emms-metaplaylist-mode.el index e2a2ab9..df7c2b0 100644 --- a/emms-metaplaylist-mode.el +++ b/emms-metaplaylist-mode.el @@ -136,6 +136,21 @@ (current-buffer))) ; return the buffer as lisp obj (error "No Emms playlist buffers")))) +;;; -------------------------------------------------------- +;;; Playlist Management : creation, deletion (?) +;;; -------------------------------------------------------- + +(defun emms-metaplaylist-new-buffer (buffer-name) + "Creates a new buffer called buffer-name, which will be ready +to host EMMS tracks." + (interactive "sBuffer Name: ") + (if(get-buffer buffer-name) + (error "Buffer must not exist.") + (let ((buf (get-buffer-create buffer-name))) + (with-current-buffer buf + (setq emms-playlist-buffer-p t))) + (message "Buffer created"))) + ;;; -------------------------------------------------------- ;;; Mode entry ;;; -------------------------------------------------------- -- cgit v1.2.3