GNU bug report logs -
#74903
[PATCH] Add function to show table of keys when describing keymap variable
Previous Next
Reported by: Mekeor Melire <mekeor <at> posteo.de>
Date: Sun, 15 Dec 2024 23:15:02 UTC
Severity: normal
Tags: patch
Done: Mekeor Melire <mekeor <at> posteo.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On December 16, 2024 6:28:58 PM GMT+01:00, Robert Pluim <rpluim <at> gmail.com> wrote:
>>>>>> On Mon, 16 Dec 2024 17:57:14 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>
> >> From: Mekeor Melire <mekeor <at> posteo.de>
> >> Date: Sun, 15 Dec 2024 23:14:15 +0000
> >>
> >> It'd be nice if users could opt in to have C-h v some-map RET show a
> >> nice table of key bindings for that keymap. I wrote a function that can
> >> be added to help-fns-describe-variable-functions so that this happens.
> >>
> >> What do you think?
> >>
> >> Alternatively, we can also add a key binding to help-mode so that users
> >> can easily "switch" from describe-variable to describe-keymap, e.g. per
> >> "K":
> >>
> >> C-h v message-mode-map RET K
>
> Eli> We have "C-h b" and "C-h m" which show the bindings, albeit not by
> Eli> keymap. Is that not enough for some reason?
>
>"C-h b" shows all the bindings split out by major and minor mode
>already. I guess we could add the name of the relevant keymap as well,
>but the people who need to know the name of the keymap generally know
>enough about Emacs to figure it out (eg via "C-h k").
>
> Eli> Adding yet another help command related to key bindings needs to be
> Eli> justified, since we already have at least two with overlapping
> Eli> functionalities.
>
> Eli> What do others think about this?
>
>I really donʼt see the need for more functionality here.
>
>Robert
>--
I get the impression that you talk about M-x describe-keymap RET which does already exist.
That is not what I proposed. What I proposed is two things:
1. Allow users to opt-in to have C-h v foo-keymap RET show a table of key bindings in addition to the formatting as S-expression. This fits well into the existing help-fns mechanism. The patch I submitted implements a prototype.
2. In help-mode, bind a single-char-key like "K" to a command that will allow users to easily switch from describing a variable as variable to describing it as keymap a la describe-keymap.
I proposed (2.) as an alternative to (1.) but my main proposal is (1.). Both approaches have a similar objection though.
[Message part 2 (text/html, inline)]
This bug report was last modified 145 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.