emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] emms-playlist-mode.el


From: Yoni Rabkin Katzenell
Subject: Re: [emms-help] emms-playlist-mode.el
Date: Fri, 16 Sep 2005 23:15:30 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Jorgen Schaefer <address@hidden> writes:

> Thanks a lot! This is really needed.
>
> I haven't used it yet, but a few notes from glimpsing over the
> source...
>
> ;;; Feature requests:
> ;;;
> ;;; (1) Lukhas wants `emms-list-playlist-buffers' to list all the
> ;;;     playlist buffers.
>
> (defun emms-playlist-buffers ()
>   "Return a list of EMMS playlist buffers."
>   (let ((lis nil))
>     (mapc (lambda (buf)
>             (with-current-buffer buf
>               (when emms-playlist-buffer-p
>                 (setq lis (cons buf lis)))))
>           (buffer-list))
>     lis))

Added, thanks.

I guess that this will be the basis for an interactive buffer of
playlist buffers that the user can choose from.

> ;;; (2) Add emms-info support which re-writes the track titles.
>
> EMMS will probably get an `emms-playlist-update-track' function
> (or similar) which should update the display of track at point.

Nice.

> ;;; (3) Add multi-line formatting and arbitrary comment entry (via a
> ;;;     null-track type [Lukhas]?).
>
> I would advise against the null-track type. This can be quite
> confusing to users. See my other mail for ideas on how to handle
> this.

Fair enough.

> `emms-playlist-mode-font-lock-keywords': The spec should be
> '(("\\(.*\\)" 1 emms-playlist-track-face))
>
> Although I think that just adding the face on the insert function
> is easier (and also does not accidentally highlight users' input,
> when he can modify the buffer :-))
>
> `emms-playlist-mode-when-playing-p': I would suggest rather
> providing an `emms-ensure-player-playing'.

If you want such a thing in the core, who am I to say nay?

> Some functionality is duplicated:
>
> `emms-playlist-mode-play-random' = `emms-random'
> `emms-playlist-mode-show-current-track{-clean}' = `emms-show'

Those are wrappers which have the `(interactive)' thingy so that I can
tie them to a keystroke on the keymap. Unless you want to add the thingy
to the core functions (not a good idea) I have to wrap them.

> I think it's easier to just define two overlays per buffer in
> buffer-local variables - one for the currently selected track, and
> one for the track-at-point - and `move-overlay' those as needed.

I'll try the overlay approach. I'm still hurting from wasting so much
time on font-lock problems.

>   ;; Even though Stefan Monnier warns against this, in this case I
>   ;; know what I'm doing.
>   (make-variable-buffer-local
>    'emms-playlist-mode-selected-overlay-marker)
>
> Either, do the `make-variable-buffer-local' at the definition of
> the variable, or use `make-local-variable' here. (I think the
> former is more useful)

OK, I moved it the right after the definition.

> I added the file to the Darcs repository. Please darcs send me
> patches of your further work :-)

Hai!

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




reply via email to

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