emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] Re: To list or not to list


From: Jorgen Schaefer
Subject: Re: [emms-help] Re: To list or not to list
Date: Mon, 29 Aug 2005 12:50:21 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Daniel Brockman <address@hidden> writes:

> Jorgen Schaefer <address@hidden> writes:
>
>> The alternative to them would be a double-linked list,
>> which would work sufficiently well for most cases I guess.
>> Actually, I think that would be nice to have.
>
> Yeah, maybe the random access isn't all that common.

Except for sorting and shuffling, but that's a task for which a
small delay isn't too problematic.

>> I'm not sure whether I have managed to get the abstraction
>> layer at the right place to facilitate such a change, so
>> possible quite a bit of emms.el would need to change.
>
> Though your abstraction layer is there, I think you're right
> that much would have to change.  For example, track indices
> are used all over the place.

If we use the buffer approach, we can just use line number
indices. Could someone with a huge setup (mine is with roughly 5k
files only) test whether `goto-line' is fast if the file names he
uses are in a buffer?

(with-current-buffer (generate-new-buffer "*Playlist*")
  (mapc (lambda (track)
           (insert (emms-track-name track) "\n"))
        emms-playlist))

>> Another alternative would be to use what Emacs is good
>> with, namely, a buffer.
>
> Yeah, I thought about this too but was afraid to say it. :-)
> I think it's a really interesting idea with a lot of potential.

Turns out I persuaded myself it's a good idea by now.

>> I don't use pbi, and I don't want yet another useless
>> buffer lying around.
>
> That problem would be easily fixed by renaming the playlist
> buffer to ` *Playlist*' to keep it out of the way.

Good point.

This allows us to do even more interesting things, like keeping
around multiple playlist buffers between which the user can easily
switch at no cost, all of them with the pbi interface if he wants
to.

emms-playlist-buffer - current playlist buffer
emms-set-playlist-buffer - set the current playlist buffer
emms-playlist-mode - mode for the playlist buffer

The latter would replace pbi, and wouldn't even need to be in
emms.el.

Tracks are stored one per line with track information in text
properties. The actual buffer text is irrelevant there (which
should make pbi really happy)

*going back to packing*

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]