emms.git - EMMS, The Emacs Multimedia System.

index : emms.git
EMMS, The Emacs Multimedia System.
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--emms.el 21
1 files changed, 17 insertions, 4 deletions
diff --git a/emms.el b/emms.el
index 40c1677..910ffe7 100644
--- a/emms.el
+++ b/emms.el
@@ -585,7 +585,7 @@ See `emms-random-playlist'."
(interactive)
(customize-set-variable 'emms-random-playlist (not emms-random-playlist))
(if emms-random-playlist
- (message "Will play the tracks randomly.")
+ (message "Will play the tracks randomly.")
(message "Will play the tracks sequentially.")))
(defun emms-toggle-repeat-playlist ()
@@ -1468,6 +1468,7 @@ See emms-source-file.el for some examples."
(source-play (intern (format "emms-play-%s" name)))
(source-add (intern (format "emms-add-%s" name)))
(source-insert (intern (format "emms-insert-%s" name)))
+ (source-insert-current (intern (format "emms-insert-current-%s" name)))
(docstring "A source of tracks for EMMS.")
(interactive nil)
(call-args (delete '&rest
@@ -1500,7 +1501,11 @@ See emms-source-file.el for some examples."
(defun ,source-insert ,arglist
,docstring
,interactive
- (emms-source-insert ',source-name ,@call-args)))))
+ (emms-source-insert ',source-name ,@call-args))
+ (defun ,source-insert-current ,arglist
+ ,docstring
+ ,interactive
+ (emms-source-insert-current ',source-name ,@call-args)))))
(defun emms-source-play (source &rest args)
"Play the tracks of SOURCE, after first clearing the EMMS playlist."
@@ -1522,8 +1527,16 @@ See emms-source-file.el for some examples."
(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")
+ (with-current-emms-playlist
+ (apply #'emms-playlist-insert-source source args)))
+
+(defun emms-source-insert-current (source &rest args)
+ "Insert from SOURCE into buffer at current track."
+ (with-current-emms-playlist
+ (if (not emms-playlist-selected-marker)
+ (error "no current playlist track")
+ (goto-char emms-playlist-selected-marker)
+ (forward-line))
(apply #'emms-playlist-insert-source source args)))
;;; User-defined playlists
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月09日 08:31:42 +0000

AltStyle によって変換されたページ (->オリジナル) /