[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emms-help] Add directory or directory tree instead of file

From: Yoni Rabkin
Subject: Re: [emms-help] Add directory or directory tree instead of file
Date: Fri, 04 Jan 2019 16:22:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Carlos Pita <address@hidden> writes:

> 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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/emms-help

Thank you for pointing out that the `emms' function doesn't do what the
docstring says. I went ahead and fixed that.

I'm not going to overload the emms function to do more than that though
(the other devs are welcome to weigh in if they disagree.)

   "Cut your own wood and it will warm you twice"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]