1. Use Magit to view the log with show diffs (-p).
  2. Inspect 4 commit old commit.
  3. Navigate to a few lines I've since deleted, but want back my project.

I can mark the lines but cannot copy them, which would be a sufficient solution for me. But, since we're opening the discussion, is there a better way to do this using Magit?

  • You should be able to magit-diff-visit-file on the diff (RET in spacemacs), or to be able to copy text, evil-magit-toggle-text-mode (C-t in spacemacs) – Croad Langshan Feb 26 at 20:03
  • What about pure emacs? – young_souvlaki Feb 26 at 21:53
  • You mean what key bindings? Try e.g. C-h f magit-diff-visit-file <RET>, or look at the magit documentation (it says it's bound to RET, in fact)? If you're not using evil and want to copy/paste, not sure, sorry -- in a pinch you could just M-x text-mode <RET> (you'll probably have to C-x k the magit buffer after that to make it work again). Actually I think even if you're using evil, evil-magit-toggle-text-mode will have moved to evil-collection out of evil-magit very recently, and might be renamed with a new prefix there. – Croad Langshan Feb 27 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.