0

I've got an email with a dozen .patch files attached in gnus. I can save them to e.g. ~/Downloads and then apply them with magit-patch-apply-popup, but considering that I've got gnus open on the left (and I can open the patch in its own buffer by putting my cursor over it and pressing c) and the magit summary buffer on the right, I would think that I could just apply the patch right there. But I cannot figure out how to do this.

  • 1
    debbugs-gnu-apply-patch from debbugs.el might be of interest. Although I find it not quite adequate; I have some work-in-progress replacements in my .emacs.d/. – npostavs Nov 15 '17 at 12:31
  • @npostavs In the same way that Emacs provides "some" features. :) – Basil Nov 15 '17 at 13:44
1

Found the answer via this blog post: Use Gnus to apply patch sent by git send-email.

Basically, I put point on the email in the gnus Summary buffer, then do O m and save the email somewhere. Then in magit I do w m and it will apply the patch.

Unfortunately for me this lost some commit info because the patches were sent from Gmail which formats patches incorrectly. So I just saved all the attached patches into the root of the git repo, selected them all (C-SPC) in the magit buffer, then did w w to apply them all individually. Then deleted the .patch files.

  • If you have them highlighted in the magit status buffer, k deletes them. – npostavs Nov 15 '17 at 12:21

Your Answer

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

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