Here's an example of a variant that I'm finding quite useful:
(defun my-emms (playlist)
(interactive "P")
(cond ((equal major-mode 'dired-mode)
(call-interactively 'emms-add-dired))
((or (null emms-playlist-buffer)
(not (buffer-live-p emms-playlist-buffer))
(eq (current-buffer) emms-playlist-buffer))
(call-interactively (if playlist 'emms-add-playlist
'emms-add-directory-tree))))
(emms-playlist-mode-go))
As you see, it's a do-the-right-thing approach, in the sense that it
calls the appropriate source function depending on the context. It
surely can be improved, but I think it's pointing in the right
direction.
Best regards
--
Carlos
_______________________________________________
Emms-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emms-help