aboutsummaryrefslogtreecommitdiff
path: root/emms.el
diff options
context:
space:
mode:
authorforcer <forcer>2005-09-16 01:12:00 +0000
committerforcer <mwolson@gnu.org>2005-09-16 01:12:00 +0000
commit09a83a3d852966666ff7cfea8737f456ffd751dd (patch)
tree990903f7724c0fc63b92c58a1512637f4459cee1 /emms.el
parente028af54dcfc56f04bdabdf6aeba3037e4246fac (diff)
Provide source insertion
darcs-hash:20050916011202-2189f-8e2e487b296e5a4d69f48c4bf6e19ba54a2274fe.gz
Diffstat (limited to 'emms.el')
-rw-r--r--emms.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/emms.el b/emms.el
index 203979b..08df47d 100644
--- a/emms.el
+++ b/emms.el
@@ -788,6 +788,7 @@ See emms-source-file.el for some examples."
(let ((source-name (intern (format "emms-source-%s" name)))
(source-play (intern (format "emms-play-%s" name)))
(source-add (intern (format "emms-add-%s" name)))
+ (source-insert (intern (format "emms-insert-%s" name)))
(docstring "A source of tracks for EMMS.")
(interactive nil)
(call-args (delete '&rest
@@ -810,7 +811,11 @@ See emms-source-file.el for some examples."
(defun ,source-add ,arglist
,docstring
,interactive
- (emms-source-add ',source-name ,@call-args)))))
+ (emms-source-add ',source-name ,@call-args))
+ (defun ,source-insert ,arglist
+ ,docstring
+ ,interactive
+ (emms-source-insert ',source-name ,@call-args)))))
(defun emms-source-play (source &rest args)
"Play the tracks of SOURCE, after first clearing the EMMS playlist."
@@ -828,6 +833,12 @@ See emms-source-file.el for some examples."
(not (marker-position emms-playlist-selected-marker)))
(emms-playlist-select-first))))
+(defun emms-source-insert (source &rest args)
+ "Insert the tracks from SOURCE in the current buffer."
+ (if (not emms-playlist-buffer-p)
+ (error "Not in an EMMS playlist buffer")
+ (apply emms-playlist-insert-source source args)))
+
;;; User-defined playlists
;;; FIXME: Shuffle is bogus here! (because of narrowing)
(defmacro define-emms-combined-source (name shufflep sources)