GNU bug report logs -
#12949
24.3.50; request: use Customize to set local value (in addition to global/default)
Previous Next
To reply to this bug, email your comments to 12949 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12949
; Package
emacs
.
(Wed, 21 Nov 2012 00:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 21 Nov 2012 00:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Customize provides not only persistence but also (a) type-checking and
(b) a fairly easy (if less than ideal) user interface for non-Lispers.
It is about *setting* option values, in addition to - even independently
from - *saving* them persistently. A user can want to set a value
temporarily for different reasons.
If an option is buffer-local (yes, nothing wrong with that), then
Customize sets or saves the *default* value. That's normal.
But it can also be useful in some cases to use the Customize UI not to
save the default value but to set the local value for various buffers.
Why? Simply because in some cases setting the value can be easier or
clearer using Customize than using Lisp.
This enhancement request is to add an item to the Customize State menu to
set the buffer-local value, for the buffer where `customize-option' (or
whatever) was invoked, to the value as edited in Customize.
That lets a user invoke Customize from different buffers and set their
buffer-local values using the GUI.
But that requires a user to repeat `M-x customize-option' in each such
buffer.
An alternative possibility would be to add a dropdown menu/list to let
the user choose an existing buffer (or even multiple such), to set its
local value to the edited value.
This could be combined with the State menu: add a `Set Local for XYZ'
menu item for each existing buffer (XYZ, in this example). If there are
more than some small number of existing buffers then these menu items
could be placed in a submenu: Set Local Value > XZY etc.
When the option is buffer-local, the current menu item `Set for Current
Session' would be changed to something like `Set Default Value'.
Here is one example where this might be helpful:
Library highlight-chars.el lets you highlight any set of characters.
You can specify the characters in the set using any of these methods,
any number of times:
* Specify a string of chars, to include the chars in the string.
* Specify the start and end chars, to include the chars in the range.
* Specify a character class, to include the chars in the class.
* Specify a charset, to include its chars.
Now suppose you want to highlight Lao chars in Gnus buffers and
[:xdigit] in .css buffers. In that case, you want to make the option
buffer-local. And it would be handy to be able to use the GUI of
Customize to set the option in each buffer.
In this case, you could use (setq hc-other-chars '(lao)) for one and
(setq hc-other-chars '([:xdigit:])) for the other. But to do that
you would need to know the required Lisp.
More complex values (and more complex options) would require more
complex Lisp sexps.
The point is that the Customize GUI can be leveraged for non-Lisp users
to set option values, including local values, regardless of whether
saving the values makes any sense (it does not, for a local value).
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
of 2012-11-05 on MS-W7-DANI
Bzr revision: 110809 lekktu <at> gmail.com-20121105172930-a5gn0bwi4lndchhw
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-I../../libs/libXpm-3.5.10/include -I../../libs/libXpm-3.5.10/src
-I../../libs/libpng-1.2.37-lib/include -I../../libs/zlib-1.2.5
-I../../libs/giflib-4.1.4-1-lib/include
-I../../libs/jpeg-6b-4-lib/include
-I../../libs/tiff-3.8.2-1-lib/include
-I../../libs/libxml2-2.7.8-w32-bin/include/libxml2
-I../../libs/gnutls-3.0.9-w32-bin/include
-I../../libs/libiconv-1.9.2-1-lib/include'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12949
; Package
emacs
.
(Wed, 21 Nov 2012 13:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12949 <at> debbugs.gnu.org (full text, mbox):
severity 12949 wishlist
thanks
> This enhancement request is to add an item to the Customize State menu to
> set the buffer-local value, for the buffer where `customize-option' (or
> whatever) was invoked, to the value as edited in Customize.
Yes, adding the ability of setting buffer-local values would be nice.
Being to *save* buffer-local values would also be nice.
Stefan
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Monnier <monnier <at> iro.umontreal.ca>
to
control <at> debbugs.gnu.org
.
(Wed, 21 Nov 2012 13:58:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12949
; Package
emacs
.
(Wed, 21 Nov 2012 15:17:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 12949 <at> debbugs.gnu.org (full text, mbox):
> > This enhancement request is to add an item to the Customize
> > State menu to set the buffer-local value, for the buffer where
> > `customize-option' (or whatever) was invoked, to the value as
> > edited in Customize.
>
> Yes, adding the ability of setting buffer-local values would be nice.
> Being to *save* buffer-local values would also be nice.
Agreed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12949
; Package
emacs
.
(Fri, 06 Apr 2018 19:32:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 12949 <at> debbugs.gnu.org (full text, mbox):
> > > This enhancement request is to add an item to the Customize
> > > State menu to set the buffer-local value, for the buffer where
> > > `customize-option' (or whatever) was invoked, to the value as
> > > edited in Customize.
> >
> > Yes, adding the ability of setting buffer-local values would be nice.
> > Being to *save* buffer-local values would also be nice.
>
> Agreed.
Emacs still needs this, IMO. Sure wish someone would tackle it.
I guess that a library that wants to make an option _always_
be buffer local can just accompany the defcustom with
(make-variable-buffer-local 'the-option). But the more
general behavior proposed here would be helpful.
This bug report was last modified 7 years and 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.