emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] `define-emms-playlist'


From: William XWL
Subject: Re: [emms-help] `define-emms-playlist'
Date: Wed, 17 Aug 2005 23:26:44 +0800
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Jorgen Schaefer <address@hidden> writes:

> Hi there.
> Emms didn't have an interface change in quite some time, and you
> all know how much I love to do that. And, this code is living in
> my .emacs for a long time now. So I guess it's time to merge it
> into emms.
>
> `define-emms-playlist' defines a "playlist", or more correctly, a
> `emms-play-FOO' and `emms-add-FOO' command. This generalizes the
> old `emms-play-all' stuff.
>
> For example:
>
> (define-emms-playlist favorites t
>   '((emms-source-directory-tree "~/snd/musik/artists/Anarchist_Academy/")
>     (emms-source-directory-tree "~/snd/musik/artists/Illuminate/")))
>
> This would define two commands, `emms-play-favorites' and
> `emms-add-favorites'. The former replaces the current playlist
> with a mixture of hip hop and goth ballads, the latter just adds
> that to your current playlist. In case you wonder, the t there
> means to shuffle the resulting tracks.

Nice feature !

And for me, let Emms remember last playlist is quite handy, as in XMMS,
for instance. I have the following in my .emacs for some time.

(setq my-emms-playlist "~/.emacs.d/.playlist")

(add-hook 'emms-pbi-after-build-hook
          (lambda () (emms-pbi-export-playlist my-emms-playlist)))

(defun my-emms-play-last ()
  "Play recent playlist."
  (interactive)
  (emms-pbi-open-playlist my-emms-playlist))


PS. `emms-save-playlist's docstring says:

    emms-save-playlist is an interactive Lisp function in
    `emms-source-file'.  (emms-save-playlist filename)

    Export the current playlist as to filename. See also:
    `emms-pbi-import-playlist'.

Where's `emms-pbi-import-playlist'?

[...]

--
William




reply via email to

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