GNU bug report logs -
#6334
24.0.50; both examples in (elisp) Defining Minor Modes raise an error
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Wed, 2 Jun 2010 21:44:01 UTC
Severity: normal
Found in version 24.0.50
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6334 in the body.
You can then email your comments to 6334 AT debbugs.gnu.org in the normal way.
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#6334
; Package
emacs
.
(Wed, 02 Jun 2010 21:44:01 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, 02 Jun 2010 21:44:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -Q
Try evaluating either of these examples from (elisp) Defining Minor
Modes:
(define-minor-mode hungry-mode
"Toggle Hungry mode.
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode.
When Hungry mode is enabled, the control delete key
gobbles all preceding whitespace except the last.
See the command \\[hungry-electric-delete]."
;; The initial value.
nil
;; The indicator for the mode line.
" Hungry"
;; The minor mode bindings.
'(("\C-\^?" . hungry-electric-delete))
:group 'hunger)
(define-minor-mode hungry-mode
"Toggle Hungry mode.
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode.
When Hungry mode is enabled, the control delete key
gobbles all preceding whitespace except the last.
See the command \\[hungry-electric-delete]."
;; The initial value.
:init-value nil
;; The indicator for the mode line.
:lighter " Hungry"
;; The minor mode bindings.
:keymap
'(("\C-\^?" . hungry-electric-delete)
("\C-\M-\^?"
. (lambda ()
(interactive)
(hungry-electric-delete t))))
:group 'hunger)
Both raise this error:
Debugger entered--Lisp error: (error "Invalid modifier in string")
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-05-23 on G41R2F1
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/include'
Reply sent
to
Juanma Barranquero <lekktu <at> gmail.com>
:
You have taken responsibility.
(Tue, 27 Jul 2010 01:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Tue, 27 Jul 2010 01:39:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 6334-done <at> debbugs.gnu.org (full text, mbox):
On Wed, Jun 2, 2010 at 23:42, Drew Adams <drew.adams <at> oracle.com> wrote:
> Debugger entered--Lisp error: (error "Invalid modifier in string")
I've fixed it using C-delete and C-M-delete (which are clearer anyway)
in the examples.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 04:45:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 6334 <at> debbugs.gnu.org (full text, mbox):
On 2010-07-27 03:38 +0200, Juanma Barranquero wrote:
> On Wed, Jun 2, 2010 at 23:42, Drew Adams <drew.adams <at> oracle.com> wrote:
>
>> Debugger entered--Lisp error: (error "Invalid modifier in string")
>
> I've fixed it using C-delete and C-M-delete (which are clearer anyway)
> in the examples.
C-M-delete is not the most fortunate choice since it can induce a reboot
on some systems (e.g. on the GNU/Linux console or on MS-DOS). On
Windows, it invokes the task manager IIRC.
Sven
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 11:28:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 6334 <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
> On Wed, Jun 2, 2010 at 23:42, Drew Adams <drew.adams <at> oracle.com> wrote:
>
>> Debugger entered--Lisp error: (error "Invalid modifier in string")
>
> I've fixed it using C-delete and C-M-delete (which are clearer anyway)
> in the examples.
I'm not sure if you intended to preserve the key binding, let me just
point out that ^? (which was in the original example) is (ASCII) DEL,
i.e. usually [backspace], not [delete] on (modern?) text terminals.
Štěpán
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 16:16:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 6334 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jul 27, 2010 at 06:44, Sven Joachim <svenjoac <at> gmx.de> wrote:
> C-M-delete is not the most fortunate choice since it can induce a reboot
> on some systems (e.g. on the GNU/Linux console or on MS-DOS). On
> Windows, it invokes the task manager IIRC.
I agree. I didn't want to change the documentation, just fix the bug.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 16:19:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 6334 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jul 27, 2010 at 13:26, Štěpán Němec <stepnem <at> gmail.com> wrote:
> I'm not sure if you intended to preserve the key binding, let me just
> point out that ^? (which was in the original example) is (ASCII) DEL,
> i.e. usually [backspace], not [delete] on (modern?) text terminals.
The docstring for the sample minor mode says "the control delete key",
and my DEL key returns delete. If there's a more apropriate key
binding that does not reproduce the bug, it's fine by me.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 17:02:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 6334 <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
> On Tue, Jul 27, 2010 at 13:26, Štěpán Němec <stepnem <at> gmail.com> wrote:
>
>> I'm not sure if you intended to preserve the key binding, let me just
>> point out that ^? (which was in the original example) is (ASCII) DEL,
>> i.e. usually [backspace], not [delete] on (modern?) text terminals.
>
> The docstring for the sample minor mode says "the control delete key",
> and my DEL key returns delete. If there's a more apropriate key
> binding that does not reproduce the bug, it's fine by me.
That'd be [C-backspace], if you're using the vector notation. Note we're
talking about the DEL _character_, not the key labeled Del(ete). It's
the Backspace key that usually sends DEL in the terminal (also note that
the example speaks about deleting all _preceding_ whitespace). I suspect
"the control delete key" wording comes from times when the keyboards
were somewhat different from those of today.
But it's only an example, so all this perhaps doesn't matter. I just
thought I'd mention the semantic shift introduced by the change, sorry.
Štěpán
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 17:09:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 6334 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jul 27, 2010 at 19:00, Štěpán Němec <stepnem <at> gmail.com> wrote:
> Note we're
> talking about the DEL _character_, not the key labeled Del(ete).
The "control delete" bit on the docstring makes me think of pressing
the keys labeled Ctrl and Del, not Ctrl + Backspace...
> (also note that
> the example speaks about deleting all _preceding_ whitespace).
...but I suspect you're right. I'll change it to C-backspace /
C-M-backspace, if everybody thinks these are the right keybindings.
> But it's only an example, so all this perhaps doesn't matter. I just
> thought I'd mention the semantic shift introduced by the change, sorry.
No, thanks for bringing this up.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 20:23:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 6334 <at> debbugs.gnu.org (full text, mbox):
On 27/07/10 18:08, Juanma Barranquero wrote:
> ...but I suspect you're right. I'll change it to C-backspace /
> C-M-backspace, if everybody thinks these are the right keybindings.
>
Just noting: C-M-backspace traditionally kills an x11 server, usually
dumping you back at a login screen when the login manager (x/g/k)dm
respawns the server. Sometimes it's disabled these days.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6334
; Package
emacs
.
(Tue, 27 Jul 2010 22:42:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 6334 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jul 27, 2010 at 22:22, David De La Harpe Golden
<david <at> harpegolden.net> wrote:
> Just noting: C-M-backspace traditionally kills an x11 server,
"\C-\M-\^?" is what the original example used.
Juanma
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 25 Aug 2010 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 16 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.