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: Jorgen Schaefer
Subject: Re: [emms-help] emms-playlist-mode.el
Date: Fri, 16 Sep 2005 15:39:43 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Yoni Rabkin <address@hidden> writes:

> Here is the raw, untested and abrasive first version of
> emms-playlist-mode. I sent it as a tarball because I don't trust Gmail
> not to frob it and am away from my own, Gnus fear'in machine.

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))

;;; (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.

;;; (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.


`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'.


Some functionality is duplicated:

`emms-playlist-mode-play-random' = `emms-random'
`emms-playlist-mode-show-current-track{-clean}' = `emms-show'


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.


  ;; 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)


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

Greetings,
        -- Jorgen

-- 
((email . "address@hidden") (www . "http://www.forcix.cx/";)
 (gpg   . "1024D/028AF63C")   (irc . "nick forcer on IRCnet"))




reply via email to

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