0

I'd like to open multiple playlists with M-x emms-play-playlist and have each one in a seperate *EMMS Playlist* buffer - at the same time.

Is it possible to have different "*EMMS Playlist*" buffers - at the same time?

My init.el has for EMMS just these lines of https://www.gnu.org/software/emms/manual/#Quickstart-Guide:

(add-to-list 'load-path "~/elisp/emms/lisp/")  
(require 'emms-setup)  
(emms-all)  
(emms-default-players)  
1
+50

You can just rename-buffer and create a new playlist. EMMS functions keep a list of playlist buffers internally. You can see this list at any time by calling (emms-playlist-buffer-list)

The playlist/buffer that's being "currently" playing is pointed by emms-playlist-buffer

EDIT: I thought that "the current playlist-buffer" was updated automagically, but that doesn't seem to be your case. You can use (emms-playlist-set-playlist-buffer) to choose the buffer used as "current playlist"

1
  • I can use rename-buffer to rename the EMMS Playlist buffer to pl1. If I open then a new playlist, pl2 (for example), I just get it in the same buffer pl1! Calling (emms-playlist-buffer-list) in an elisp-file always gives a list of only one name. My init.el has just the four lines of gnu.org/software/emms/manual/#Quickstart-Guide. Should I change this configuration?
    – rl1
    Mar 8 '17 at 18:51
0

With the help of @Felipe Lema I've found the following function. It works well for me. But I'm not sure about the code! So please be careful if you use it! Certainly an elisp programmer would find a better solution..

(defun my-emms-play-playlist (filename &optional wildcards)
  "makes a new EMMS playlist buffer from the playlist of filename" 
  (interactive
   (find-file-read-args "Find file: "
                        (confirm-nonexistent-file-or-buffer)))
  (emms-playlist-new (file-name-base filename))
  (switch-to-buffer (file-name-base filename))
  (emms-playlist-set-playlist-buffer)
  (emms-play-playlist filename)
)
0

You can iterate your playlist using M-p and M-n, look at the documentation of the buffer major mode with C-h m. You can make the active buffer the current playlist pressing b. You can add a track from the active buffer to the current playlist by pressing a. You can rename a playlist by simply renaming the buffer with rename-buffer (this way it becomes visible in the buffer list also). You can delete a playlist altogether with K. Doing M-x emms always switches to the current playlist.

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.