help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Persistence of variables


From: Joost Kremers
Subject: Re: Persistence of variables
Date: Wed, 21 Mar 2018 23:16:16 +0100
User-agent: mu4e 1.1.0; emacs 25.3.50.1


On Wed, Mar 21 2018, tomas@tuxteam.de wrote:
On Wed, Mar 21, 2018 at 08:12:40AM -0700, Drew Adams wrote:
If you only want to save one variable, just use an option.

Of course!

What Drew said. The whole thing was in front of us all, we
just had to squint the right way.

Well, that depends on the variable. Options (i.e., those defined with defcustom) are really meant for user customisation: meant to be set explicitly by the user, and meant to be forgotten once set. If you want to save a variable that changes regularly and that the user doesn't set explicitly, then a user option is a bad fit. IMHO the best way to deal with that is indeed to use a separate file and to provide a user option to set the file path & name. That way, users can decide for themselves if they want to keep the file under version control, sync it across machines, or not.



--
Joost Kremers
Life has its moments



reply via email to

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