GNU bug report logs - #60530
28.2; Add tools to find keymaps that bind a given command

Previous Next

Package: emacs;

Reported by: Sean Devlin <spd <at> toadstyle.org>

Date: Tue, 3 Jan 2023 22:32:01 UTC

Severity: wishlist

Found in version 28.2

Full log


View this message in rfc822 format

From: Ruijie Yu <ruijie <at> netyu.xyz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: spd <at> toadstyle.org, 60530 <at> debbugs.gnu.org
Subject: bug#60530: 28.2; Add tools to find keymaps that bind a given command
Date: Mon, 20 Feb 2023 20:01:27 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Cc: 60530 <at> debbugs.gnu.org
>> Date: Mon, 20 Feb 2023 15:07:09 +0800
>> From:  Ruijie Yu via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> I saw this message long ago, but recently I came across a situation
>> where I wanted to know if a command was bound in *some* keymap whose
>> name I didn't know, and this would be quite a helpful feature for me
>> personally (pun intended).
>
> Isn't that what where-is and/or where-is-internal already do?

No, not quite.  The functions where-is{,-internal} only look for
*currently active keymaps*, whereas my intention was to look for all
keybinds for the specified command, be it active or not.

The following is my reason to want this feature.  I use pyim, an input
method that shows candidate words in a small frame (which I believe is
called posframe?), which has `pyim-mode-map' enabled.  Then, while
typing, I want to know how to call the `pyim-next-page' command without
going into pyim source.

If I type M-x where-is, this frame disappears, and I am dropped back
into the editing buffer, which does not have `pyim-mode-map' enabled.
Hence, `where-is' does not show anything bound for `pyim-next-page',
because it indeed is not bound globally.  FTR, C-h b does not work
either.

Similar situations can occur in other popup behaviors with temporary
keybinds, such as lsp-ui package (github.com/emacs-lsp/lsp-ui).

--
Best,


RY




This bug report was last modified 1 year and 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.