From: Mekeor Melire <mekeor@posteo.de>
To: Robert Pluim <rpluim@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: Andrea Corallo <acorallo@gnu.org>,
Stefan Kangas <stefankangas@gmail.com>,
74903@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#74903: [PATCH] Add function to show table of keys when describing keymap variable
Date: Mon, 16 Dec 2024 18:41:19 +0000 [thread overview]
Message-ID: <37DCBABA-3D38-4FDD-8769-93E3D7F71DCE@posteo.de> (raw)
In-Reply-To: <87bjxb5yg5.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2209 bytes --]
On December 16, 2024 6:28:58 PM GMT+01:00, Robert Pluim <rpluim@gmail.com> wrote:
>>>>>> On Mon, 16 Dec 2024 17:57:14 +0200, Eli Zaretskii <eliz@gnu.org> said:
>
> >> From: Mekeor Melire <mekeor@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.
[-- Attachment #2: Type: text/html, Size: 3490 bytes --]
prev parent reply other threads:[~2024-12-16 18:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 23:14 bug#74903: [PATCH] Add function to show table of keys when describing keymap variable Mekeor Melire
2024-12-16 15:57 ` Eli Zaretskii
2024-12-16 17:28 ` Robert Pluim
2024-12-16 18:41 ` Mekeor Melire [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37DCBABA-3D38-4FDD-8769-93E3D7F71DCE@posteo.de \
--to=mekeor@posteo.de \
--cc=74903@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rpluim@gmail.com \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).