all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Devel" <emacs-devel@gnu.org>
Subject: RE: `customize-customized' and mode variable of a minor mode
Date: Fri, 6 Apr 2007 14:14:45 -0700	[thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMKEHMDAAA.drew.adams@oracle.com> (raw)
In-Reply-To: <4616A6AD.3060902@gmail.com>

> > Toggling a mode changes the value of the mode variable. Why would a user
> > want to save that new value? You might toggle a (global) minor
> > mode several times during an Emacs session. Turning the mode on and
> > off doesn't imply that you want to change the saved value. I don't see
> > a use case for that.
>
> If the global minor mode is at the state currently saved by Custom it
> will not show up in customize-customized.

True, and if it happens to be in the opposite state, then it will show up.

> I often put toggling of global minor modes in the menus.

So do I.

> It seems conventient to me to be able to save the state of those
> minor modes through customize-customized then.

I can see the use case you describe. I guess it depends on the use pattern
and the nature of the global minor mode. At least some mode toggling is not
tentative configuring, and at least some people might not want some mode
changes to be candidates for saving.

There may be no good way to satisfy all use scenarios and user preferences
for this. Another user option perhaps?

A mode variable does two things: 1) its saved value records your preference
for mode initialization, and 2) its current value reflects the state of the
mode (on or off). We could separate these two roles, using two different
variables: one, which is not customizable, to reflect the current state, and
another, which is customizable, to record the initial value.

But then `customize-customized' would not recognize the current mode state
and ask if you want to save it, so that wouldn't satisfy the use case you
mention.

Perhaps it comes down more to how `customize-customized' is invoked. If a
user specifically asks to see all changes, with an eye to saving some to
configure Emacs, then mode variables should be included. If a user uses
`customize-customized' in `kill-emacs-query-functions', then maybe mode
variables should be excluded. In this latter use, `customize-customized' is
invoked just as a safety measure, a la modified buffers in
`save-buffers-kill-emacs'.

  reply	other threads:[~2007-04-06 21:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-06 18:10 `customize-customized' and mode variable of a minor mode Drew Adams
2007-04-06 19:32 ` Lennart Borgman (gmail)
2007-04-06 19:48   ` Drew Adams
2007-04-06 19:59     ` Lennart Borgman (gmail)
2007-04-06 21:14       ` Drew Adams [this message]
2007-04-06 21:43         ` Lennart Borgman (gmail)
2007-04-07 12:40 ` 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=EIENLHALHGIMHGDOLMIMKEHMDAAA.drew.adams@oracle.com \
    --to=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.