[Top][All Lists]

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

Re: Persistence of variables

From: Marcin Borkowski
Subject: Re: Persistence of variables
Date: Sun, 25 Mar 2018 19:15:14 +0200
User-agent: mu4e 1.1.0; emacs 27.0.50

On 2018-03-21, at 23:16, Joost Kremers <> wrote:

> On Wed, Mar 21 2018, 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.

And this is exactly my use-case: a variable whose value will be
periodically changed.  And I don't like the hassle of having an option
to a separate file with just this one variable...  Of course, if the
only user beside me won't like Emacs messing around with his init.el,
I'll do it that way.


Marcin Borkowski

reply via email to

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