From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: toggling a minor mode should not tell Customize that the value has been set
Date: Sun, 06 Jan 2008 11:16:37 -0500 [thread overview]
Message-ID: <jwvsl1bszyh.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <BNELLINCGFJLDJIKDGACMEGICGAA.drew.adams@oracle.com> (Drew Adams's message of "Sun, 6 Jan 2008 00:01:12 -0800")
>> Because M-x foo-mode RET on such global minor-modes isn't much different
>> from M-x customize-variable RET foo-mode RET .... -> Set for
>> current session.
> "isn't much different" How so? What do you mean by that?
It has the same user-visible effect of enabling/disabling the mode in
the current session.
> But _why_ should they be treated similarly? That is the question.
Because they have the same effect in all other respects.
> Logically and a priori, it isn't much the _same_, I'd say.
In which way is it different?
>> > What was the rationale behind this behavior? Why should toggling
>>
>> The rationale is that Custom does not like it when Elisp code modifies
>> a defcustom behind its back.
> Modifies a defcustom? What does that mean?
"Modifies a variable that's defined via defcustom".
> Changing the value of a variable that happens to be defined by defcustom is
Right, so you did understand ;-)
> Why should toggling a minor mode be tantamount to customizing its variable?
You mean "when done interactively"?
Well that's what this thread is trying to explain, isn't it?
> And if it should for some reason, then why distinguish between global and
> local modes in this regard?
Simple: local modes are not defined via defcustom.
>> If we don't do it, then Custom will simply tell you that the variable
>> was set outside of Custom and that saving the var may hence not have
>> the expected effect.
> But that's what happened: the value was changed outside Customize.
Who says?
> If you ask Customize for what was changed outside Customize, this variable
> should show up. But if you ask Customize for what was customized but not
> saved (`customize-customized'), this should not show up.
Why? What would be the benefit?
> Why should toggling a mode variable be considered the same as
> customizing it?
Again, because "they have the same effect in all other respects".
>> > A user should be able to use `customize-customized' (including
>> > perhaps in `kill-emacs-query-functions') to see what s?he has
>> > customized and might want to save.
>>
>> Exactly, after trying our M-x iswtchb-mode RET she may very much like to
>> see that iswitchb-mode is now eabled and that she could save it so that
>> it's enabled next time around.
> "May?" This design is based only on that _possibility_?
No. It was in response to some request. I can't remember the details
of it, but I can assure you that it wouldn't have crossed my mind to do
that if it weren't for someone complaining about the "changed outside
Customize".
> It think it is far more likely that someone will toggle a mode on and off
> occasionally, without that action implying that s?he would want to save its
> last value.
Nobody complained about this behavior since it was introduced (in
Emacs-21 IIRC), so I don't know about "far more likely" or about the
importance of this detail.
Stefan
next prev parent reply other threads:[~2008-01-06 16:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-05 17:48 toggling a minor mode should not tell Customize that the value has been set Drew Adams
2008-01-06 2:14 ` Stefan Monnier
2008-01-06 8:01 ` Drew Adams
2008-01-06 16:16 ` Stefan Monnier [this message]
2008-01-06 20:47 ` Drew Adams
2008-01-06 21:20 ` Stefan Monnier
2008-01-06 23:00 ` Drew Adams
2008-01-07 1:32 ` Stefan Monnier
2008-01-06 22:41 ` martin rudalics
2008-01-06 23:41 ` Drew Adams
2008-01-07 1:26 ` Stefan Monnier
2008-01-07 7:34 ` martin rudalics
2008-01-07 11:31 ` Richard Stallman
2008-01-06 10:46 ` Richard Stallman
2008-01-06 16:19 ` toggling a minor mode should not tell Customize that the value hasbeen set Drew Adams
2008-01-07 17:15 ` Richard Stallman
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=jwvsl1bszyh.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@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.
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.