~breatheoutbreathein/emacs-simple-mpc-breatheoutbreathein

ea010c08d83175839b52a0ea82c16bd201ceb476 — Joseph Turner 1 year, 10 months ago 9731a8b
Add simple-mpc-playing-status
1 files changed, 9 insertions(+), 0 deletions(-)

M simple-mpc-utils.el
M simple-mpc-utils.el => simple-mpc-utils.el +9 -0
@@ 95,6 95,15 @@ output as a string."
    (end-of-line)
    (buffer-substring (point-min) (point))))

(defun simple-mpc-playing-status ()
  "Return either `playing' or `paused'."
  (with-temp-buffer
    (simple-mpc-call-mpc t "status")
    (beginning-of-buffer)
    (next-line)
    (mark-sexp)
    (buffer-substring (mark) (point))))

(defun simple-mpc-goto-line (line-number)
  "Go to beginning of line LINE-NUMBER.