[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: Yuchen Pei
Subject: Re: Recovering playback state of multiple playlists and over multiple sessions
Date: Tue, 19 Oct 2021 08:54:44 +1100
User-agent: mu4e 1.4.13; emacs 27.2

Yoni Rabkin <yoni@rabkins.net> writes:

Yuchen Pei <hi@ypei.me> writes:

Yoni Rabkin <yoni@rabkins.net> writes:

Yuchen Pei <hi@ypei.me> writes:


I often have several long playlists of spoken words, mostly
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
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
is at track 73 at 87:32. I just paused track 42 of A and would
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
close emacs and resume at track 42 at 23:00 next time I open emacs
load the playlist?  I tried saving the playlist as a native
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
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.

I don't really save or restore emacs sessions. This is because I have an emacsclient on all the time until an untimely death because something goes terribly wrong, and if I make it revive from that state I fear it could go into a death loop. This is why I would rather have an emms-specific feature for this.

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.


PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0

Attachment: signature.asc
Description: PGP signature

reply via email to

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