GNU bug report logs -
#8350
24.0.50; wrong bindings for remapped keys
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sat, 26 Mar 2011 20:04:01 UTC
Severity: normal
Merged with 6882,
8351
Found in version 24.0.50
Done: Chong Yidong <cyd <at> stupidchicken.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 8350 in the body.
You can then email your comments to 8350 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#8350
; Package
emacs
.
(Sat, 26 Mar 2011 20:04: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
.
(Sat, 26 Mar 2011 20:04:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
(define-key ctl-x-map "f" 'forward-char)
C-h w forward-char (says that it is bound to C-x f)
(define-key ctl-x-map [remap forward-char] 'backward-char)
C-h w forward-char (says that it is still bound to C-x f)
C-h w backward-char (says that it is bound to C-x <remap>
<forward-char>)
(command-remapping 'forward-char nil (list ctl-x-map))
=> backward-char
C-x f (moves forward, not backward a character;
`backward-char' is not invoked)
C-x C-h (says C-x f is bound to `forward-char')
Looking at (elisp) Remapping Commands I do not see how/why this should
be. Seems like this should just work (as the doc indicates).
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2011-03-21 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Sun, 27 Mar 2011 21:20:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 8350 <at> debbugs.gnu.org (full text, mbox):
> (define-key ctl-x-map [remap forward-char] 'backward-char)
[...]
> (command-remapping 'forward-char nil (list ctl-x-map))
> => backward-char
But ctl-x-map is never used as one of the active maps, it's always
limited to being a prefix map bound to C-x, so the define-key above will
have pretty much no effect.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Sun, 27 Mar 2011 21:52:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 8350 <at> debbugs.gnu.org (full text, mbox):
> > (define-key ctl-x-map [remap forward-char] 'backward-char)
> > C-x C-h (says C-x f is bound to `forward-char')
>
> But ctl-x-map is never used as one of the active maps, it's always
> limited to being a prefix map bound to C-x, so the define-key
> above will have pretty much no effect.
It was a simplified example. And whether `ctl-x-map' is used as an active map
is irrelevant, I think, to the bugged behavior wrt `PREFIX-KEY C-h' described
here.
In any case, in my own use, where I uncovered this, the keymap is not
`ctl-x-map', just as the commands are not `forward-char' and `backward-char'.
In my use, `bmkp-this-buffer-jump', for example, is remapped to
`icicle-bookmark-this-buffer' in `icicle-mode-map' (a minor mode map). And the
remapping works as expected - `icicle-bookmark-this-buffer' gets called.
And all of the help output is correct - except for `PREFIX-KEY C-h'.
`C-h w bmkp-this-buffer-jump' says:
"bmkp-this-buffer-jump is remapped to icicle-bookmark-this-buffer which is on
C-x j ."
`C-h w icicle-bookmark-this-buffer' says:
"icicle-bookmark-this-buffer is on C-x j ."
`C-h f bmkp-this-buffer-jump' says it is remapped to etc., etc. All of the help
output is correct. Except the output from `C-x j C-h', which shows this:
"C-x j . bmkp-this-buffer-jump"
The code defining the initial binding of `bmkp-this-buffer-jump' includes this:
(define-prefix-command 'bmkp-jump-map)
(define-key ctl-x-map "j" bmkp-jump-map)
(define-key bmkp-jump-map "." 'bmkp-this-buffer-jump)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Mon, 28 Mar 2011 14:23:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 8350 <at> debbugs.gnu.org (full text, mbox):
forcemerge 6882 8350
thanks
>> > (define-key ctl-x-map [remap forward-char] 'backward-char)
>> > C-x C-h (says C-x f is bound to `forward-char')
>> But ctl-x-map is never used as one of the active maps, it's always
>> limited to being a prefix map bound to C-x, so the define-key
>> above will have pretty much no effect.
> It was a simplified example. And whether `ctl-x-map' is used as an
> active map is irrelevant,
Well, since the `remap' is in ctl-x-map it is of crucial importance.
> I think, to the bugged behavior wrt `PREFIX-KEY C-h' described here.
That problem is in bug#6881 and bug#8351 so I don't think it needs
a third bug report.
Stefan
Forcibly Merged 6882 8350 8351.
Request was from
Stefan Monnier <monnier <at> iro.umontreal.ca>
to
control <at> debbugs.gnu.org
.
(Mon, 28 Mar 2011 14:23:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Mon, 28 Mar 2011 15:05:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 8350 <at> debbugs.gnu.org (full text, mbox):
> That problem is in bug#6881 and bug#8351 so I don't think it needs
> a third bug report.
Granted, 8351 refers to the C-h part of this bug.
If you don't think the rest of 8350 (apart from C-h) represents a bug, OK.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Tue, 29 Mar 2011 00:32:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 8350 <at> debbugs.gnu.org (full text, mbox):
>> That problem is in bug#6881 and bug#8351 so I don't think it needs
>> a third bug report.
> Granted, 8351 refers to the C-h part of this bug.
> If you don't think the rest of 8350 (apart from C-h) represents a bug, OK.
All the rest is explained by the fact that you put the `remap' thing on
a non-top-level keymap, AFAICT.
If not, then please submit a new report that focuses on the
new misbehavior.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Tue, 29 Mar 2011 04:17:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 8350 <at> debbugs.gnu.org (full text, mbox):
> >> That problem is in bug#6881 and bug#8351 so I don't think it needs
> >> a third bug report.
> >
> > Granted, 8351 refers to the C-h part of this bug.
> > If you don't think the rest of 8350 (apart from C-h)
> > represents a bug, OK.
>
> All the rest is explained by the fact that you put the
> `remap' thing on a non-top-level keymap, AFAICT.
Yes, I already agreed with you about that. The question is whether the symptoms
constitute a bug. It's fine with me if you feel they do not.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Tue, 29 Mar 2011 13:59:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 8350 <at> debbugs.gnu.org (full text, mbox):
> Yes, I already agreed with you about that. The question is whether
> the symptoms constitute a bug. It's fine with me if you feel they
> do not.
I don't know what symptoms you're talking about.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Tue, 29 Mar 2011 14:19:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 8350 <at> debbugs.gnu.org (full text, mbox):
> > Yes, I already agreed with you about that. The question is whether
> > the symptoms constitute a bug. It's fine with me if you feel they
> > do not.
>
> I don't know what symptoms you're talking about.
The behavior described in the bug report, of course. The symptoms you explained
are manifested because of using `remap' with a non-top-level keymap. IOW, what
you called "all the rest":
>>> All the rest is explained by the fact that you put the
>>> `remap' thing on a non-top-level keymap, AFAICT.
If that behavior doesn't constitute a bug in your eyes, as I say, that's fine
with me. You might nevertheless consider documenting it. There is nothing in
the doc for `remap' that suggests this, I believe.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8350
; Package
emacs
.
(Sun, 29 May 2011 19:02:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 8350 <at> debbugs.gnu.org (full text, mbox):
> If that behavior doesn't constitute a bug in your eyes, as I say,
> that's fine with me. You might nevertheless consider documenting it.
> There is nothing in the doc for `remap' that suggests this, I believe.
I've edited the Lisp manually to specifically mention this.
bug closed, send any further explanations to
8350 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Sun, 29 May 2011 19:02:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 27 Jun 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 364 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.