all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Joost Kremers <joostkremers@fastmail.fm>
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>, help-gnu-emacs@gnu.org
Subject: Re: Persistence of variables
Date: Sun, 25 Mar 2018 19:15:14 +0200	[thread overview]
Message-ID: <87efk813h9.fsf@mbork.pl> (raw)
In-Reply-To: <87sh8txefj.fsf@fastmail.fm>


On 2018-03-21, at 23:16, Joost Kremers <joostkremers@fastmail.fm> wrote:

> 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.

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.

Thanks!

-- 
Marcin Borkowski
http://mbork.pl



  reply	other threads:[~2018-03-25 17:15 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21  6:08 Persistence of variables Marcin Borkowski
2018-03-21  6:55 ` Eli Zaretskii
2018-03-21  7:25   ` Marcin Borkowski
2018-03-21  9:13     ` Marcin Borkowski
2018-03-21  9:27       ` tomas
2018-03-21  9:51         ` Marcin Borkowski
2018-03-21 10:23           ` tomas
2018-03-25 17:10             ` Marcin Borkowski
2018-03-21 11:34       ` Emanuel Berg
     [not found]       ` <mailman.11020.1521632103.27995.help-gnu-emacs@gnu.org>
2018-03-21 11:38         ` Emanuel Berg
2018-03-21  9:53     ` Eric Abrahamsen
2018-03-21 10:26       ` Marcin Borkowski
2018-03-21 15:12       ` Drew Adams
2018-03-21 15:19         ` tomas
2018-03-21 22:16           ` Joost Kremers
2018-03-25 17:15             ` Marcin Borkowski [this message]
2018-03-25 18:57               ` Drew Adams
     [not found]             ` <mailman.11217.1521998149.27995.help-gnu-emacs@gnu.org>
2018-03-28  0:21               ` Emanuel Berg
2018-03-28  5:05                 ` Marcin Borkowski
     [not found]                 ` <mailman.11329.1522213571.27995.help-gnu-emacs@gnu.org>
2018-03-28 13:09                   ` Emanuel Berg
     [not found]         ` <mailman.11032.1521645579.27995.help-gnu-emacs@gnu.org>
2018-03-21 21:43           ` Emanuel Berg
2018-03-24 23:54           ` Robert L.
2018-03-25 17:12         ` Marcin Borkowski
2018-03-26  1:48         ` Eric Abrahamsen
2018-03-28 19:12           ` Marcin Borkowski
     [not found]       ` <mailman.11031.1521645187.27995.help-gnu-emacs@gnu.org>
2018-03-21 18:00         ` Emanuel Berg
2018-03-21 18:23           ` Eli Zaretskii
     [not found]           ` <mailman.11045.1521656612.27995.help-gnu-emacs@gnu.org>
2018-03-21 21:30             ` Emanuel Berg
2018-03-22  1:36             ` Rolf Ade
2018-03-22  7:02               ` Eli Zaretskii
     [not found]               ` <mailman.11076.1521702135.27995.help-gnu-emacs@gnu.org>
2018-03-24  3:06                 ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efk813h9.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=eric@ericabrahamsen.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=joostkremers@fastmail.fm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.