While point is inside a diff in a Magit buffer I press RET, which invokes magit-diff-visit-file.

After checking this file, I want to quit it and get back to the Magit buffer that was previously showing.

I type q, it does the job but it always says that I start keyboard-macro recording.

So two questions here:

  1. What does q actually do in the buffer shown by magit-diff-visit-file?
  2. How can I list all the commands in the buffer after I run the magit-diff-visit-file command?
  • 1
    While in magit-diff-visit-file do C-h k q to find out what q does. Commented Oct 23, 2018 at 19:26
  • I corrected your question to say what I believe you are asking. E.g. pressing RET in a diff-mode buffer does not invoke magit-diff-visit-file. diff-mode is not part of Magit.
    – tarsius
    Commented Oct 26, 2018 at 13:05

1 Answer 1

  1. To see what command is bound to some key X type C-h k X. In this case it should tell you that it is bound to magit-kill-this-buffer or if magit-diff-visit-file took you to the working tree version of the file self-insert-command.

  2. You can use C-h b to do that in any buffer.

I don't know why pressing q tells you that you are starting keyboard-macro recording. That has something to to with your local configuration. Try to produce the issue without your customizations. You might want to use magit-emacs-Q-command to get some help with that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.