101b147ch · 2022-10-16 15:42
Guys, I'm migrating from Vim to Emacs and my `init.el` is still very basic. I've installed `evil`, `evil-collection` and `which-key`. Overall, things are working pretty well, but I'm having trouble when using `*Buffer List*` (you know, the buffer menu invoked with `C-x C-b` or `:ls<cr>`).
When I use `C-h k o`, for example, it shows the proper mapping defined in `evil-collection`: `o` is mapped to `tabulated-list-sort`.
However, if I use `C-h m`, it says `o` is "Select that buffer in another window". And when I invoke `which-key-show-mode`, is says `o` is mapped to `Buffer-menu-other-window`.
Am I missing something here? Is there a package that "glues" all the help systems together?
00-11 · 2022-10-16 20:51
With default Emacs (`emacs -Q`), in buffer `*Buffer List*` the key `o` is indeed bound (by default) to command `Buffer-menu-other-window`.
And yes, `C-h m` in buffer `*Buffer List*` describes its mode(s), and it lists some of the major mode's key bindings, including `o`. And for `o` the description is `Select that buffer in another window`.
In that mode key `o` is bound to command `Buffer-menu-other-window`, and the doc of that command (and the doc of key `o`) tells you that that command does this:
`Select this line’s buffer in other window, leaving buffer menu visible.`
What's the question/confusion?
101b147ch · 2022-10-16 23:19
With `emacs -Q`, `C-h m` shows the following:
o Select that buffer in another window...
g Update the list of buffers.
With `evil-collection`, `C-h m` shows the following:
o Select that buffer in another window...
g r Update the list of buffers.
In other words, `C-h m` shows the "updated" biding for `revert-buffer`, which is the expected and correct behavior.
However, it shows the "wrong" (old) binding for `Buffer-menu-other-window`. It should show `g O` instead of `o`. Why is this happening?
00-11 · 2022-10-17 01:16
I see. Dunno why.
If you think it shows the wrong binding, and if you don't get a good answer here as to why it should show `o`, consider filing a bug report: `M-x report-emacs-bug`.