GNU bug report logs -
#5974
23.1.95; enabling disabled cmd & saving doesn't respect `custom-file'
Previous Next
To reply to this bug, email your comments to 5974 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Mon, 19 Apr 2010 16:24: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
.
(Mon, 19 Apr 2010 16:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have `custom-file' set to a particular file, different from my .emacs
(actually, I use `_emacs' on Windows).
I just tried `C-x n p'. I thought that I had enabled it years ago, but
apparently not. I hit `y' to enable it, then `y' to save it. A message
said that the customization was being saved to my `_emacs' file. And it
was in fact saved there.
That is wrong. I have a separate `custom-file' specifically so that
customization does not mess with my init file.
In GNU Emacs 23.1.95.1 (i386-mingw-nt5.1.2600)
of 2010-04-03 on G41R2F1
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/imagesupport/include'
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Mon, 19 Apr 2010 17:07:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 5974 <at> debbugs.gnu.org (full text, mbox):
> I have `custom-file' set to a particular file, different from
> my .emacs (actually, I use `_emacs' on Windows).
>
> I just tried `C-x n p'. I thought that I had enabled it years ago, but
> apparently not. I hit `y' to enable it, then `y' to save it. A message
> said that the customization was being saved to my `_emacs'
> file. And it was in fact saved there.
>
> That is wrong. I have a separate `custom-file' specifically so that
> customization does not mess with my init file.
There is no option or face that corresponds to this kind of customization, so I
guess this is not so much a bug as an enhancement request:
If a user has defined variable `custom-file', then code that enables or disables
commands should place the proper `put' sexp in the `custom-file', not in the
init file.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Mon, 19 Apr 2010 17:24:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 5974 <at> debbugs.gnu.org (full text, mbox):
> That is wrong. I have a separate `custom-file' specifically so that
> customization does not mess with my init file.
The reason for it is that enabling disabling such commands is not done
via Custom (and indeed, I don't think you can do it from Custom
currently).
But I guess it would make sense to extend the meaning of `custom-file'
from "the things managed by Custom" to "any Emacs-generated config code".
This said, the easiest way to get this result is to make
`enable-command' use Custom somehow.
Stefan
Severity set to 'wishlist' from 'normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 19 Apr 2010 17:36:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Wed, 27 Apr 2016 21:54:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> That is wrong. I have a separate `custom-file' specifically so that
>> customization does not mess with my init file.
>
> The reason for it is that enabling disabling such commands is not done
> via Custom (and indeed, I don't think you can do it from Custom
> currently).
>
> But I guess it would make sense to extend the meaning of `custom-file'
> from "the things managed by Custom" to "any Emacs-generated config code".
> This said, the easiest way to get this result is to make
> `enable-command' use Custom somehow.
That's the code that puts
(put 'narrow-to-region 'disabled nil)
into our .emacs files, right? Yes, it would be better if that was
handled by Custom. But how? Custom works by setting (variable) values,
not adjusting symbol properties...
Hm...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Thu, 28 Apr 2016 10:42:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> That's the code that puts
>
> (put 'narrow-to-region 'disabled nil)
>
> into our .emacs files, right? Yes, it would be better if that was
> handled by Custom. But how? Custom works by setting (variable) values,
> not adjusting symbol properties...
We could add a defcustom like
(defcustom enabled-commands nil
"List of commands to enable"
:set (lambda (sym val)
(dolist (cmd val)
(put cmd 'disabled nil))
(set-default sym val)))
(code 100% untested)
--
Nicolas Richard
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Thu, 28 Apr 2016 22:59:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Nicolas Richard <nrichard <at> ulb.ac.be> writes:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> That's the code that puts
>>
>> (put 'narrow-to-region 'disabled nil)
>>
>> into our .emacs files, right? Yes, it would be better if that was
>> handled by Custom. But how? Custom works by setting (variable) values,
>> not adjusting symbol properties...
>
> We could add a defcustom like
> (defcustom enabled-commands nil
> "List of commands to enable"
> :set (lambda (sym val)
> (dolist (cmd val)
> (put cmd 'disabled nil))
> (set-default sym val)))
Hm... the `set-default' wouldn't be necessary, would it?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Thu, 28 Apr 2016 23:09:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Nicolas Richard <nrichard <at> ulb.ac.be> writes:
>
>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>>> That's the code that puts
>>>
>>> (put 'narrow-to-region 'disabled nil)
>>>
>>> into our .emacs files, right? Yes, it would be better if that was
>>> handled by Custom. But how? Custom works by setting (variable) values,
>>> not adjusting symbol properties...
>>
>> We could add a defcustom like
>> (defcustom enabled-commands nil
>> "List of commands to enable"
>> :set (lambda (sym val)
>> (dolist (cmd val)
>> (put cmd 'disabled nil))
>> (set-default sym val)))
>
> Hm... the `set-default' wouldn't be necessary, would it?
But otherwise this seems like a good idea. We do potentially have
clobbering definitions -- where there is a
(put 'narrow-to-region 'disabled nil)
in the buffer, and then it's also customised...
But I don't really think this is much of a problem in practice.
If that defcustom form works, then I'm all for changing over the
enabled-command stuff to customise.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Fri, 29 Apr 2016 14:26:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Nicolas Richard <nrichard <at> ulb.ac.be> writes:
>
>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>>> That's the code that puts
>>>
>>> (put 'narrow-to-region 'disabled nil)
>>>
>>> into our .emacs files, right? Yes, it would be better if that was
>>> handled by Custom. But how? Custom works by setting (variable) values,
>>> not adjusting symbol properties...
>>
>> We could add a defcustom like
>> (defcustom enabled-commands nil
>> "List of commands to enable"
>> :set (lambda (sym val)
>> (dolist (cmd val)
>> (put cmd 'disabled nil))
>> (set-default sym val)))
>
> Hm... the `set-default' wouldn't be necessary, would it?
I think it is necessary, for if you eval:
(progn
(defcustom enabled-commands nil
"List of commands to enable"
:set (lambda (sym val)
(dolist (cmd val)
(put cmd 'disabled nil))
;; (set-default sym val)
))
(customize-set-variable 'enabled-commands '(upcase-region))
(describe-variable 'enabled-commands))
you obtain "enabled-commands is void", which is confusing. It probably
also becomes impossible to keep track of which commands were enabled via
customize.
Nicolas.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Fri, 29 Apr 2016 14:31:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Nicolas Richard <nrichard <at> ulb.ac.be> writes:
> It probably also becomes impossible to keep track of which commands
> were enabled via customize.
Ah, yes. That's true.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Fri, 29 Apr 2016 16:32:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Please. You guys have hijacked this bug report to speculate
about using Customize to handle enabling/disabling commands
Please start a new bug thread - or better yet an emacs-devel
thread - for that.
THIS bug report is about the fact that if a user has a
`custom-file' the enabling gets recorded to ~/.emacs instead.
That's just plain wrong.
Surely this bug can be fixed independently of your thoughts
about a new design/feature for letting Customize handle
enabling more generally. You can always revisit this case
after you've implemented whatever you dream up for that,
but this bug is not that enhancement.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Fri, 29 Apr 2016 20:21:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> Please. You guys have hijacked this bug report
*sigh*
> THIS bug report is about the fact that if a user has a
> `custom-file' the enabling gets recorded to ~/.emacs instead.
> That's just plain wrong.
> Surely this bug can be fixed
AFAICT there is no bug : the code is behaving as expected and as
documented. It's a request for changing the current behaviour.
Nicolas.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Fri, 29 Apr 2016 22:33:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 5974 <at> debbugs.gnu.org (full text, mbox):
> > Surely this bug can be fixed
>
> AFAICT there is no bug : the code is behaving as expected and as
> documented. It's a request for changing the current behaviour.
OK; it's an enhancement request (as I mentioned in my last msg
before today). Mille excuses for too-quickly calling it a bug.
The point of my msg today is that it makes sense to take your
interesting side discussion elsewhere.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Fri, 29 Apr 2016 22:40:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 5974 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> The point of my msg today is that it makes sense to take your
> interesting side discussion elsewhere.
It's not a side discussion. The `put' things are not going to move to
`custom-file', because they have nothing to do with Custom.
But they might "in effect" move to `custom-file' if we change how they
are implemented.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5974
; Package
emacs
.
(Fri, 29 Apr 2016 23:13:01 GMT)
Full text and
rfc822 format available.
Message #46 received at 5974 <at> debbugs.gnu.org (full text, mbox):
> It's not a side discussion. The `put' things are not going to move to
> `custom-file', because they have nothing to do with Custom.
Good point. I retract my objection.
> But they might "in effect" move to `custom-file' if we change how they
> are implemented.
Actually, now that you've pointed out that they have nothing to
do with Customize (options, faces), I wonder whether where they
should go.
The point of `custom-file' is, on the one hand, to keep automatically
written Lisp code from mixing with hand-coded stuff, in ~/.emacs.
On the other hand, its point is to gather in one place only stuff
that is managed by Customize.
Typically (so far), we use other files for other automatically
written Lisp code: bookmarks, desktops, package stuff, savehist,
saveplace,...
Especially since we now have an Emacs-specific default directory
for such things, a separate file seems to make sense - not
`custom-file' (since this is not managed by Customize) but something
else.
As for the suggestion that this be handled by Customize: A priori,
I'm not too hot for that idea. I think it has enough trouble with
options and faces. ;-) But maybe someone has a good reason why it
should be Customize that manages these things.
Forcibly Merged 5974 24023.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 19 Jul 2016 06:19:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 110 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.