From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 6578@debbugs.gnu.org
Subject: bug#6578: 24.0.50; defcustom :set does not apply to `set-variable'
Date: Wed, 21 Aug 2019 16:39:12 -0700 (PDT) [thread overview]
Message-ID: <52f8fea3-f1b9-44ae-9df2-4ecb70445f39@default> (raw)
In-Reply-To: <87r25euo5q.fsf@mouse.gnus.org>
> > If you use a :set entry for defcustom, it is not
> > respected by `set-variable'. It should be. When
> > a user uses `M-x set-variable' s?he should get the
> > effect of :set. Otherwise, the defcustom is not
> > serving its purpose. defcustom is not only for
> > Customize - it needs to work with `set-variable'
> > also. And it does, for :type; but it does not,
> > for :set.
>
> This is apparently by design:
>
> ----
> Note that this function is at heart equivalent to the basic ‘set’
> function.
> For a variable defined with ‘defcustom’, it does not pay attention to
> any :set property that the variable might have (if you want that, use
> M-x customize-set-variable instead).
> ----
I know (and knew) that the behavior is documented.
That doesn't mean it's good. This is an enhancement
request: it "_should_" provide the effect of :set.
Anything else is just a gotcha, inviting problems.
We document the weak behavior, because it is what it
is. We should document it, whatever it is. That
doesn't make it good.
What's more, `customize-set-variable' isn't even
documented in the Emacs or Elisp manuals.
`set-variable' is (in the Emacs manual), and it even
has an index entry. What's more, (emacs) `Examining'
says that "The most convenient way to set a specific
customizable variable is with `set-variable'.
That's an endorsement/recommendation, and it can get
users into trouble.
That doc should perhaps use `customize-set-variable'
instead. More generally, perhaps some harmonizing
of behavior/features is in order, among `set-variable',
`customize-set-variable', and `customize-set-value'.
Users can be excused for being confused, and they
can get into trouble when they set an option value
using just `set-variable' or `setq', if it has a
:set function.
Emacs should be enhanced to clear up the confusing
differences and clear up the doc recommendations.
> So I'm closing this bug report.
Unfortunate. Someone might have implemented the
enhancement someday.
prev parent reply other threads:[~2019-08-21 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 4:52 bug#6578: 24.0.50; defcustom :set does not apply to `set-variable' Drew Adams
2019-08-21 22:52 ` Lars Ingebrigtsen
2019-08-21 23:39 ` Drew Adams [this message]
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=52f8fea3-f1b9-44ae-9df2-4ecb70445f39@default \
--to=drew.adams@oracle.com \
--cc=6578@debbugs.gnu.org \
--cc=larsi@gnus.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.
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.