Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Use persist or multisession to save/restore fontaine-latest-state #3

Open
alphapapa opened this issue Dec 14, 2023 · 5 comments

Comments

@alphapapa
Copy link

Hi Prot,

Just a quick suggestion: I saw that you use some bespoke code to serialize and load the variable fontaine-latest-state. Since the multisession library is now built-in to Emacs, and since the persist library is available on GNU ELPA for older versions of Emacs, it would seem like a good idea to use one of them to do the saving and restoring.

Doing so would have a few benefits: reducing code in fontaine; using well-tested, known-good code (which is important for, e.g. code that is added to kill-emacs-hook); sharing configuration (e.g. a common directory for storing this user data), etc.

Thanks for your work on fontaine!

@protesilaos
Copy link
Owner

protesilaos commented Dec 16, 2023 via email

@alphapapa
Copy link
Author

Do you know if the multisession works with Emacs 27? I remember first seeing the multisession as part of the emoji implementation of Emacs 29.

No, it was added to Emacs 29 and is not on GNU ELPA; it only works for 29+. So to support earlier versions, the persist library should be used instead (and it works well, in my experience).

@protesilaos
Copy link
Owner

Hello again Adam,

I realise I did not follow up on this, though I did mean to. Anyway, persist seems like a decent option for the time being. Since you have used it already, do you want to submit a patch/PR?

@alphapapa
Copy link
Author

Hi Prot,

No problem. I'm afraid my to-do list for Emacs packages is already more than I have time for, so I'll have to respectfully decline to send a patch. It's just an idea, anyway. :)

@protesilaos
Copy link
Owner

protesilaos commented Apr 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants