** MPC
+---
+*** New command 'mpc-goto-playing-song'.
+This command, bound to 'o' in any 'mpc-mode' buffer, moves point to
+the currently playing song in the "*Songs*" buffer.
+
---
*** New user option 'mpc-cover-image-re'.
If non-nil, it is a regexp that should match a valid cover image.
(define-key map ">" #'mpc-next)
(define-key map "<" #'mpc-prev)
(define-key map "g" #'mpc-seek-current)
+ (define-key map "o" #'mpc-goto-playing-song)
map))
(easy-menu-define mpc-mode-menu mpc-mode-map
(mpc-select event)
(mpc-play))
+(defun mpc-goto-playing-song ()
+ "Move point to the currently playing song in the \"*Songs*\" buffer."
+ (interactive)
+ (let* ((buf (mpc-proc-buffer (mpc-proc) 'songs))
+ (win (get-buffer-window buf)))
+ (when (and (buffer-live-p buf) win)
+ (select-window win)
+ (with-current-buffer buf
+ (when (and overlay-arrow-position
+ (eq (marker-buffer overlay-arrow-position) buf))
+ (goto-char (marker-position overlay-arrow-position)))))))
+
;; (defun mpc-play-tagval ()
;; "Play all the songs of the tag at point."
;; (interactive)