I'm beginning to learn about the magit package for Emacs. The integration is nice. But I'm very confused about how to get help with it.
I created a temporary repository, added a file test.org to it and ran the command magit-status. Then I hit ? to get help. I figured that this means it displays the command available to me inside the magit-status screen. The screen looks like the following:

At the bottom are the magit actions available. Notice how it says s: Show Status. But s doesn't do that. It stages a file. And there is no u key, but it unstages a file.
Am I misreading this or am I invoking the wrong help screen or something else?
magit offers a form of context menus which fits with a keyboard-based input. Hence the key-binding depend on which menu you are in. Somewhat counter-intuitively, ? does not open the mode specific help (use C-h m for that, as usual). ? opens up the top level context menu, by invoking magit-key-mode-popup-dispatch. When in this menu, the available keybindings are different from those on invoking magit-status. In the status mode, s and u are bound to magit-stage-item and magit-unstage-item. Since they act on the item at point, it doesn't make sense to bind a key to them when in one of the context menus. Given this consideration, binding s to "Show Status" in the context menu launched by ? is quite natural.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With