~breatheoutbreathein/emacs-simple-mpc-breatheoutbreathein

ca083d06bf7555a19e7b86705d4300fe4e75498e — Joseph Turner 1 year, 10 months ago ed6ca31
Echo song position, artist, and name when seeking
1 files changed, 4 insertions(+), 2 deletions(-)

M simple-mpc.el
M simple-mpc.el => simple-mpc.el +4 -2
@@ 73,12 73,14 @@
(defun simple-mpc-seek-forward ()
  "Does a relative seek forward by `simple-mpc-seek-time-in-s' seconds."
  (interactive)
  (simple-mpc-seek-internal simple-mpc-seek-time-in-s))
  (simple-mpc-seek-internal simple-mpc-seek-time-in-s)
  (message "%s" (concat (simple-mpc-song-position) " " (simple-mpc-current-artist-and-song))))

(defun simple-mpc-seek-backward ()
  "Does a relative seek backward by -`simple-mpc-seek-time-in-s' seconds."
  (interactive)
  (simple-mpc-seek-internal (- simple-mpc-seek-time-in-s)))
  (simple-mpc-seek-internal (- simple-mpc-seek-time-in-s))
  (message "%s" (concat (simple-mpc-song-position) " " (simple-mpc-current-artist-and-song))))

(defun simple-mpc-seek-internal (time-in-seconds)
  "Seek current song by TIME-IN-SECONDS."