From: Drew Adams <drew.adams@oracle.com>
To: Alan Schmitt <alan.schmitt@polytechnique.org>, help-gnu-emacs@gnu.org
Subject: RE: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?
Date: Sun, 29 Nov 2015 11:19:10 -0800 (PST) [thread overview]
Message-ID: <b37bab4b-366e-499e-ac8b-3d3cc2bfd2d6@default> (raw)
In-Reply-To: <m2vb8k1w3j.fsf@polytechnique.org>
> I recently read a message where, if I read it correctly, it was
> recommended to use `customize-set-variable' and `customize-set-value'
> to change settings in an init file while playing nice with the
> custom system. I looked at their documentation and I have trouble
> understanding how they differ. I see there is also
> `custom-set-variables' which has a different signature.
>
> So my question is: should I use `setq', `customize-set-variable',
> `customize-set-value', or `custom-set-variables' to change in my
> init file variables that exist in the custom ecosystem?
Good question! Here is my understanding, which might not be
100% correct:
1. The `customize-*' functions are also commands. And they set
only a single variable (option). `custom-set-variables' is not
a command, and it can set any number of options - it is what
Customize writes to your `custom-file' (or init file).
2. `customize-set-value' does not use the defcustom's :set
function, and it does not set the default value. It just sets
the current value in the current buffer. It is like setq,
except that it can be used interactively (it is a command),
and in that case it reads the value according to how such
values are read interactively. AFAIK, it respects the
defcustom :type (but it does not respect :set).
I agree that the doc is not very clear. Recently I forgot
that `customize-set-value' does not use the defcustom's :set
function, and I was bitten by the fact that it does not.
It seems odd that it has two, completely independent
differences from `customize-set-variable'.
next prev parent reply other threads:[~2015-11-29 19:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-29 18:47 which one to use: custom-set-variables, customize-set-variable, or customize-set-value? Alan Schmitt
2015-11-29 19:19 ` Drew Adams [this message]
2015-11-30 8:52 ` Alan Schmitt
2015-11-30 15:20 ` Drew Adams
2015-11-30 15:44 ` Alan Schmitt
2015-12-11 18:23 ` Lele Gaifax
2015-12-11 18:53 ` Drew Adams
2015-12-12 8:31 ` Lele Gaifax
2015-12-12 12:09 ` tomas
2015-12-12 13:31 ` Lele Gaifax
2015-12-12 16:11 ` Drew Adams
2015-12-13 8:17 ` tomas
2015-12-13 17:32 ` Drew Adams
2015-12-14 2:44 ` B.V. Raghav
2015-12-14 8:28 ` Lele Gaifax
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b37bab4b-366e-499e-ac8b-3d3cc2bfd2d6@default \
--to=drew.adams@oracle.com \
--cc=alan.schmitt@polytechnique.org \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).