[Top][All Lists]

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

Re: Recovering playback state of multiple playlists and over multiple se

From: Yoni Rabkin
Subject: Re: Recovering playback state of multiple playlists and over multiple sessions
Date: Thu, 14 Oct 2021 17:12:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Yuchen Pei <hi@ypei.me> writes:

> Yoni Rabkin <yoni@rabkins.net> writes:
>> Yuchen Pei <hi@ypei.me> writes:
>>> Hello,
>>> I often have several long playlists of spoken words, mostly
>>> conference
>>> talks and lectures, and I wonder how I can resume where I left from
>>> last time.  I have them all saved in native playlist files, and
>>> load
>>> them manually when I start an emacs session.
>>> There are two problems:
>>> 1. Say I have two playlists A and B, A is at track 42 at 23:00 and
>>> B
>>> is at track 73 at 87:32.  I just paused track 42 of A and would
>>> like
>>> to resume track 73 of B.  How do I do that?  If I navigate to B and
>>> press RET (emms-playlist-mode-play-smart) or invoke
>>> (emms-playlist-mode-play-current-track), track 73 will start from 
>>> the beginning, rather than 87:32.  If I navigate to B and press P,
>>> track 42 of A will resume.  I also tried switching to playlist B 
>>> at the metaplaylist first, but that did not seem to help either.
>>> 2. Say I have one playlist A at track 42 at 23:00.  How do I save
>>> it,
>>> close emacs and resume at track 42 at 23:00 next time I open emacs
>>> and
>>> load the playlist?  I tried saving the playlist as a native
>>> playlist,
>>> but when I load it starts from track 1 again.
>> `emms-bookmarks' has code to support this, but it isn't extensively
>> developed because this is an edge case and doesn't come up very
>> often. I
>> have used `emms-bookmarks' in the (far) past and I remember it
>> working
>> well enough at the time.
> Thanks for the pointer.
> As I understand it emms-bookmarks's goal is to restore the playback
> position in a media file, but not to restore to the item in a playlist
> across emacs sessions (my second problem).  I tried emms-bookmark-add
> on an item, switched to another playlist and played something there,
> and came back to the item, and did emms-bookmark-next.  It didn't
> restore the position.  I'll have to look more into it.

The bookmark data is stored natively as part of the track, so it would
be written to disk in a emms-playlist-save, and equally read back of

I don't save emacs sessions generally speaking (desktop-save and etc.),
so I can't speak to if the existing emacs packages for saving buffers
and restoring them would also do what you want for Emms. Emms playlists
are just buffers with "propertized" text after all, so those solutions
should work (in theory; famous last words).

So the answer would require first knowing how you manage saving and
restoring sessions in Emacs "grosso modo" and then find out how Emms
fits into that.

>> One of my uses for Emms is to watch video's stored on my disk, and
>> many of them are very long (6 or 4 hour endurance races). In that
>> case I use the mpv backend with its save-position-on-quit option, so
>> both saving and continuation is handled outside of Emms.
> I tried save-position-on-quit - it doesn't seem to work on streams
> over https and ssh, which are the only things I play with emms 
> these days...
> This also does not address the second problem.  I guess I'll have to
> hack out something myself.
> Do you think restoring to an item in a playlist across emacs sessions
> is also an edge case?

See above, and we'll discuss it from there.

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

reply via email to

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