Yuchen Pei <[email protected]> writes: > Yoni Rabkin <[email protected]> writes: > >> Yuchen Pei <[email protected]> writes: >> >>> Yoni Rabkin <[email protected]> writes: >>> >>>> Yuchen Pei <[email protected]> writes: >>>> >>>>> 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. >>>> >>>> We may be speaking past each other. If you don't restart emacs, >>>> why >>>> do >>>> you need a function to save the playlist position? >>> >>> As I said, things can go wrong, and emacs crashes. Sometimes this >>> happens more often than other times. But especially after long >>> sessions of emacs is it hard to recover the position from (my) >>> memory. >> >> This is a slightly different situation that what we've >> discussed. Previously, I understood it to be merely saving playlist >> positions so that they can be restored later. But now this is >> described >> as a case of hardening Emms against an Emacs crash. >> >> Therefore, what you are describing sounds more similar to Emacs' >> auto-save feature. >> >> What that be a good way of describing it? > > Thanks for clarifying. I suppose that covers most of my usecase, > though I think there's not much difference between saving and > auto-saving, as the latter could be simply implemented as a > run-at-times with the former if one can tolerate a bit of loss. > "Saving" is a more universal feature and probably needed by more > people other than me, and I'll be content to have a "saving" which > I can use run-at-times to risk losing the bit in the time interval.
In that case, why not solve half of your problem quickly by adding a function to `emms-player-started-hook' that iterates over your playlists and saves them? That hook is certainly well used in Emms. -- "Cut your own wood and it will warm you twice"
