3 ms·
> One of the bigger problems I have with Doom is reading the docs for Emacs packages and the keybinds don't match. Did you try `C-h m`? It will generate intera
by setopt 2y ago
> One of the bigger problems I have with Doom is reading the docs for Emacs packages and the keybinds don't match.
Did you try `C-h m`? It will generate interactive keybinding descriptions for your current context, including say Magit + Evil.
- herewulf 2y agoThanks for your response in an otherwise dead thread. Unfortunately `C-h m` seems to show the bindings as defined by the mode and not what they actually are. So in the example of Magit, `z` is supposed to be bound to `magit-stash` but it's not because `z` is already used by Evil, so another package, evil-collection, fixes this situation by binding `magit-stash` to `Z`. And that is the key I use even though numerous places within Emacs show it as `z`. Maybe this has been fixed more recently though? My Doom Emacs is probably rather out of date because for the most part it just works. If I look up a command with `M-x` it always shows correct key bindings there. In terms, of writing about bindings in static documentation on the web (for example) I think it's unfortunate that many Emacs package authors choose to write the default key bindings when instead they could simply write the Emacs command (or both). Indeed, we got lucky that the `C-h` binding that you suggested is bound exactly to what you intended, but it would have been just as effective to tell me to run `describe-mode`. :) This is a great advantage of Emacs over the Vim ecosystem where changing bindings generally means binding a new key to point to the default one. So all the bindings are just about _keys_ and not _commands_. I much prefer the Emacs way for all the obvious reasons.
- setopt 2y agoI've been using Evil-mode a bit on and off since I came to Emacs (from Vim), right now I'm in a "vanilla phase" again. But I tried re-enabling Evil-mode and Evil Collection now to test what you mentioned (in a vanilla config not Doom) and found that: - `z` triggers stash in magit even with evil collection on, so `C-h m` was correct there. As you said, perhaps it changed at some point, since `evil-magit` used to be its own package but then got assimilated into Evil Collection if I recall correctly. - But your general point stands: If I look up e.g. `j`, then it first shows me `magit-status-jump` and I have to scroll down to see that it is overridden by `evil-next-line` in `<normal-state>`. In that sense, I think perhaps `C-h b` is more useful, since it lists all defined keybindings in order of precedence, and thus correctly lists the Evil keybinding further up than the Magit keybinding in this case. As for it being more useful to say `describe-mode` and `describe-bindings` than `C-h m` and `C-h b`, I generally agree. That was quite annoying using Evil myself. On the other hand, I usually write HN comments from my iPhone without Emacs installed, and I tend to remember keybindings and not underlying functions for the most common operations, so it's just easier to type `C-h m` than to go back to my desk to check `C-h k C-h m` first ;). If you want to check what function a default keybinding runs, you can use `C-z` to toggle Evil off temporarily and then use `C-h k`.