How can I have a progress bar so I can drag to specific point of a song in emms? With a progress bar, it gives a more straight sense on how much the music has been played.

  • Where, exactly, would you like this bar to be displayed, out of curiosity? – PythonNut Apr 21 '16 at 17:48

You can display some text (something looks like process bar) in the echo area to indicate the music has been played after seeking:

enter image description here

(defun chunyang-emms-indicate-seek (_sec)
  (let* ((total-playing-time (emms-track-get
         (elapsed/total (/ (* 100 emms-playing-time) total-playing-time)))
    (with-temp-message (format "[%-100s] %2d%%"
                               (make-string elapsed/total ?=)
      (sit-for 2))))

(add-hook 'emms-player-seeked-functions #'chunyang-emms-indicate-seek 'append)

BTW, Bongo (another music player for Emacs) provides similar function, but its looks more beautiful and more useful.

| improve this answer | |
  • Do you know how to make Bongo have this feature? – xuhdev Apr 23 '16 at 4:16
  • @xuhdev Bongo itself already has this feature, you don't need to do anything, just run bongo-seek-forward etc and take a look at the echo area. – xuchunyang Apr 23 '16 at 4:21

You should implement one! (AFAIK emms doesn't have progress bar)

emms provides the emms-playing-time variable which gives you the time elapsed for the current track and you can find the track length with

(emms-track-get (emms-playlist-current-selected-track) 'info-playing-time)

(IMHO this should probably be exposed as an emms variable as well)

You can seek using the emms-seek-* functions.

For the progress bar itself one package that comes to mind is neato-bar-graph (https://gitlab.com/RobertCochran/neato-graph-bar).

Maybe other users here can suggest other code you should look at.

I'm looking forward to using what you build! ;-)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.