GNU bug report logs -
#58216
Display user's custom keybindings in `help-for-help' (`C-h C-h')
Previous Next
To reply to this bug, email your comments to 58216 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sat, 01 Oct 2022 09:09:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Allen Li <darkfeline <at> felesatra.moe>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 01 Oct 2022 09:09:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The new `help-for-help' bound to C-h C-h hides the user's key bindings.
I have bound a couple of commands to the C-h prefix to provide some
personalized help and occasionally I would type C-h C-h to double check
which commands I have bound, for some of the less frequently used ones.
Previously, this would show the normal prefix help which describes all
keys in the prefix map. However, the new `help-for-help' does not do
so.
I suggest that the `help-for-help' command include any custom bindings
in the prefix map as a separate "Custom" section at the end so they can
still be found.
In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
of 2022-09-12 built on frederik
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Arch Linux
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sat, 01 Oct 2022 14:29:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Allen Li <darkfeline <at> felesatra.moe> writes:
> The new `help-for-help' bound to C-h C-h hides the user's key bindings.
Thanks for the bug report, I will look into it. Meanwhile, it would
help if you could provide a recipe to reproduce it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sun, 02 Oct 2022 00:09:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Allen Li <darkfeline <at> felesatra.moe> writes:
>
>> The new `help-for-help' bound to C-h C-h hides the user's key bindings.
>
> Thanks for the bug report, I will look into it. Meanwhile, it would
> help if you could provide a recipe to reproduce it.
1. emacs -Q
2. (define-key [?\C-h ?M] #'man)
3. C-h C-h
Expected:
Help shows the C-h M binding
Actual:
Help does not show the C-h M binding
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sun, 02 Oct 2022 13:52:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Allen Li <darkfeline <at> felesatra.moe> writes:
> 1. emacs -Q
> 2. (define-key [?\C-h ?M] #'man)
That doesn't work, so I interpreted this as:
(global-set-key [?\C-h ?M] #'man)
> 3. C-h C-h
With the above (adjusted) recipe on Emacs 27.1, my " *Metahelp*" buffer
contains the below text. I don't see the `C-h M' binding in there.
I also tried replacing step 2 with this instead
(define-key help-map [?M] #'man)
but I still couldn't see `C-h M' in there.
What am I missing? Could you provide the full text of your
" *Metahelp*" buffer (or a screenshot) with the above recipe?
You have typed C-h, the help character. Type a Help option:
(Use SPC or DEL to scroll through this text. Type q to exit the
Help command.)
a PATTERN Show commands whose name matches the PATTERN (a list of words
or a regexp). See also the ‘apropos’ command.
b Display all key bindings.
c KEYS Display the command name run by the given key sequence.
C CODING Describe the given coding system, or RET for current ones.
d PATTERN Show a list of functions, variables, and other items whose
documentation matches the PATTERN (a list of words
or a regexp).
e Go to the *Messages* buffer which logs echo-area messages.
f FUNCTION Display documentation for the given function.
F COMMAND Show the Emacs manual’s section that describes the command.
g Display information about the GNU project.
h Display the HELLO file which illustrates various scripts.
i Start the Info documentation reader: read included manuals.
I METHOD Describe a specific input method, or RET for current.
k KEYS Display the full documentation for the key sequence.
K KEYS Show the Emacs manual’s section for the command bound to KEYS.
l Show last 300 input keystrokes (lossage).
L LANG-ENV Describes a specific language environment, or RET for current.
m Display documentation of current minor modes and
current major mode,
including their special commands.
n Display news of recent Emacs changes.
o SYMBOL Display the given function or variable’s documentation
and value.
p TOPIC Find packages matching a given topic keyword.
P PACKAGE Describe the given Emacs Lisp package.
r Display the Emacs manual in Info mode.
s Display contents of current syntax table, plus explanations.
S SYMBOL Show the section for the given symbol in the Info manual
for the programming language used in this buffer.
t Start the Emacs learn-by-doing tutorial.
v VARIABLE Display the given variable’s documentation and value.
w COMMAND Display which keystrokes invoke the given command (where-is).
. Display any available local help at point in the echo area.
C-a Information about Emacs.
C-c Emacs copying permission (GNU General Public License).
C-d Instructions for debugging GNU Emacs.
C-e External packages and information about Emacs.
C-f Emacs FAQ.
C-m How to order printed Emacs manuals.
C-n News of recent Emacs changes.
C-o Emacs ordering and distribution information.
C-p Info about known Emacs problems.
C-s Search forward "help window".
C-t Emacs TODO list.
C-w Information on absence of warranty for GNU Emacs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sun, 02 Oct 2022 13:55:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> I also tried replacing step 2 with this instead
>
> (define-key help-map [?M] #'man)
>
> but I still couldn't see `C-h M' in there.
That's what he wants to have fixed -- he wants to see `C-h M' in that
buffer.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sun, 02 Oct 2022 14:02:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>> I also tried replacing step 2 with this instead
>>
>> (define-key help-map [?M] #'man)
>>
>> but I still couldn't see `C-h M' in there.
>
> That's what he wants to have fixed -- he wants to see `C-h M' in that
> buffer.
So this is a feature request? I interpreted it as a regression, based
on this in the original bug report:
The new `help-for-help' bound to C-h C-h hides the user's key bindings.
I have bound a couple of commands to the C-h prefix to provide some
personalized help and occasionally I would type C-h C-h to double check
which commands I have bound, for some of the less frequently used ones.
Previously, this would show the normal prefix help which describes all
keys in the prefix map. However, the new `help-for-help' does not do
so.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sun, 02 Oct 2022 14:09:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
>> That's what he wants to have fixed -- he wants to see `C-h M' in that
>> buffer.
>
> So this is a feature request? I interpreted it as a regression, based
> on this in the original bug report:
>
> The new `help-for-help' bound to C-h C-h hides the user's key bindings.
>
> I have bound a couple of commands to the C-h prefix to provide some
> personalized help and occasionally I would type C-h C-h to double check
> which commands I have bound, for some of the less frequently used ones.
>
> Previously, this would show the normal prefix help which describes all
> keys in the prefix map. However, the new `help-for-help' does not do
> so.
It's a regression that `C-h M' isn't shown any more, and he requests a
new feature that would show it in a way that fits the new `C-h C-h'
display.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sun, 02 Oct 2022 14:23:03 GMT)
Full text and
rfc822 format available.
Message #26 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> It's a regression that `C-h M' isn't shown any more,
Was `C-h M' displayed before though?
I thought that is what I tested, and the result was that it was not
shown. Did I make a mistake in my testing, or did I miss something?
> and he requests a new feature that would show it in a way that fits
> the new `C-h C-h' display.
This part is clear, thank you.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Sun, 02 Oct 2022 14:34:03 GMT)
Full text and
rfc822 format available.
Message #29 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
>> It's a regression that `C-h M' isn't shown any more,
>
> Was `C-h M' displayed before though?
Ah, no, I guess it wasn't.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Mon, 03 Oct 2022 01:07:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>>> It's a regression that `C-h M' isn't shown any more,
>>
>> Was `C-h M' displayed before though?
>
> Ah, no, I guess it wasn't.
Before the recent binding of C-h C-h to help-for-help, C-h C-h was
unbound and thus used the default behavior of printing help for all keys
bound to the prefix map. As an example see the behavior for C-x C-h.
If the user bound a key with C-h prefix, that binding previously would
show up in C-h C-h help.
Example:
User binds C-h M
Before help-for-help was introduced:
C-h C-h would display the user-bound C-h M mapping
After help-for-help was introduced:
C-h C-h does not display any user mappings with C-h prefix
See https://www.gnu.org/software/emacs/manual/html_node/emacs/Keys.html
Typing the help character (C-h or F1) after a prefix key displays a list
of the commands starting with that prefix. The sole exception to this
rule is ESC: ESC C-h is equivalent to C-M-h, which does something else
entirely. You can, however, use F1 to display a list of commands
starting with ESC.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Mon, 03 Oct 2022 09:03:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Allen Li <darkfeline <at> felesatra.moe> writes:
> Before the recent binding of C-h C-h to help-for-help, C-h C-h was
> unbound and thus used the default behavior of printing help for all keys
> bound to the prefix map.
I checked Emacs 26.1 --
C-h C-h runs the command help-for-help (found in global-map), which is
an alias for ‘help-for-help-internal’ in ‘help.el’.
Which Emacs version do you see `C-h C-h' not bound to `help-for-help'?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Mon, 03 Oct 2022 09:21:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 58216 <at> debbugs.gnu.org (full text, mbox):
severity 58216 wishlist
thanks
Allen Li <darkfeline <at> felesatra.moe> writes:
> Before the recent binding of C-h C-h to help-for-help, C-h C-h was
> unbound
AFAICT, that key binding has been the same since at least:
commit 433ae6f6e191af1d1bc67025200ea54a08761e68
Author: Richard M. Stallman <rms <at> gnu.org>
Date: Sun Aug 25 21:47:10 1991 +0000
Initial revision
Which says:
(define-key global-map "\C-h" 'help-command)
(fset 'help-command help-map)
(define-key help-map "\C-h" 'help-for-help)
> and thus used the default behavior of printing help for all keys
> bound to the prefix map. As an example see the behavior for C-x C-h.
> If the user bound a key with C-h prefix, that binding previously would
> show up in C-h C-h help.
That's not what I see in Emacs 27.1. Have you tried it in "emacs -Q"?
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 03 Oct 2022 09:21:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Tue, 04 Oct 2022 06:38:01 GMT)
Full text and
rfc822 format available.
Message #43 received at 58216 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Oct 3, 2022 at 2:20 AM Stefan Kangas <stefankangas <at> gmail.com> wrote:
> severity 58216 wishlist
> thanks
>
> Allen Li <darkfeline <at> felesatra.moe> writes:
>
> > Before the recent binding of C-h C-h to help-for-help, C-h C-h was
> > unbound
>
> AFAICT, that key binding has been the same since at least:
>
> commit 433ae6f6e191af1d1bc67025200ea54a08761e68
> Author: Richard M. Stallman <rms <at> gnu.org>
> Date: Sun Aug 25 21:47:10 1991 +0000
>
> Initial revision
>
> Which says:
>
> (define-key global-map "\C-h" 'help-command)
> (fset 'help-command help-map)
> (define-key help-map "\C-h" 'help-for-help)
>
> > and thus used the default behavior of printing help for all keys
> > bound to the prefix map. As an example see the behavior for C-x C-h.
> > If the user bound a key with C-h prefix, that binding previously would
> > show up in C-h C-h help.
>
> That's not what I see in Emacs 27.1. Have you tried it in "emacs -Q"?
>
Seems like I misremembered, sorry about that. Then this is a feature
request not regression.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58216
; Package
emacs
.
(Tue, 04 Oct 2022 07:00:02 GMT)
Full text and
rfc822 format available.
Message #46 received at 58216 <at> debbugs.gnu.org (full text, mbox):
Allen Li <darkfeline <at> felesatra.moe> writes:
> Seems like I misremembered, sorry about that. Then this is a feature
> request not regression.
Thanks, that gives us more clarity about what needs doing.
This bug report is marked "wishlist", and I think patches are welcome.
Changed bug title to 'Display user's custom keybindings in `help-for-help' (`C-h C-h')' from '28.2; New help-for-help hides user key bindings'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Oct 2022 13:41:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 253 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.