Status-Detective-783 · 2022-02-28 20:12
EDIT: I meant key sequences or key bindings for the title. (Key chords are those which are pressed simultaneously ala the key-chord package.)
For example, I'm editing a file and press `C-s` to enter an iSearch. The minibuffer presents "I-search:". At that point, I'd like to know which key chord combinations are available.
I imagine, if this is even possible, I would need to bind my own key chord to a which-key command, something like this:
(global-set-key (kbd "C-M-\`") #'which-key-show-top-level)
But that only shows the top level commands (for the current major mode?). Or perhaps there's another package that does this?
Note: I'd like to have a generalized solution, not necessarily just for iSearch.
Status-Detective-783 · 2022-02-28 22:13
I'll answer my own question! After pressing `C-s`, if you're stuck, press `C-h`. At that point, which-key will offer you many options, some of which start with "isearch-". From there, you can see the following options can help you out:
b -> isearch-describe-bindings
m -> isearch-describe-mode
00-11 · 2022-02-28 22:53
1. If you use Emacs 28, or you use library [`help-fns.el`](https://www.emacswiki.org/emacs/download/help-fns%2b.el) (any Emacs release) then you can use `M-x describe-keymap` (bound to `C-h M-k` in `help-fns.el`) to show the bindings in `isearch-mode-map`.
2. If you use library [Key See](https://www.emacswiki.org/emacs/KeySee) ([`keysee.el`](https://www.emacswiki.org/emacs/download/keysee.el)) then you can complete keys at any level, including while isearching. You can, for example, drill down into the `M-s` prefix-key bindings for Isearch. You can sort the bindings by prefix keys first, local keys first, or command name (alphabetically). (Completion candidates include both key and command.)
[deleted] · 2022-03-01 01:06
[deleted]
Status-Detective-783 · 2022-03-01 01:13
Thanks, that was very helpful! One question. I don't see help-fns.el on github, but I do see this: https://github.com/emacsmirror/help-fns-plus. Is help-fns-plus a branch of help-fns, extending it? Can I just go with that? Or is help-fns-plus an additional file to use along with help-fns?
00-11 · 2022-03-01 21:15
* `help-fns.el` is a standard library, delivered as *part of Emacs*. You don't need to download it - it's already in your Emacs.
* [`help-fns+.el`](https://www.emacswiki.org/emacs/download/help-fns%2b.el) (note the `+` char) is an external library that enhances what the standard library does.
I've given you the direct link to the download of the latter library from the Emacs Wiki [ElispArea](https://www.emacswiki.org/emacs/ElispArea) (both here and in my last msg).
This (not what you've shown) is the correct link to `help-fns+.el` on the EmacsWiki GitHub mirror: https://github.com/emacsmirror/help-fns-plus/blob/master/help-fns%2B.el.
However, if you want to be sure to get the latest version of the library then use the Emacs Wiki link.
After you've downloaded `help-fns+.el`, put it in a directory that's in your `load-path`, and put `(require 'help-fns+)` in your init file.
Status-Detective-783 · 2022-03-01 22:56
Thank you so much! I clearly had some missing puzzle pieces in my brain, and that added another few pieces!