How can I fetch patches from a subscribed development mailinglist with mutt and vim so that they can be applied with "git am" or "git apply" command easily?

Is it either possible to save it automaticaly as filenname.patch where filename is the patch subject according to git format-patch standard?

If I hit (v) on a Email containing a Patch mutt show something like this:

"<no description>  [text plain, base64, utf-8, 2,6K]"

Now I hit (s) and I can manually enter a filename. Here I like to have the patch name in git format-patch standard from the mail subject.

  • From the attachments menu (v), save the patch (s) to your desired directory... – jasonwryan May 3 '15 at 18:10
  • 1
    But here I must manually specify the filename. If I use (v) and (enter) I got an vim session with /tmp/muttXYZ instead of somethink like /tmp/filename.patch – Oliver G. May 3 '15 at 18:15
  • No, mutt loads the name of the attachment by default, just Ctrl-a to the start of the line and prepend the path... Don't hit Enter until after you have the full path at the prompt. – jasonwryan May 3 '15 at 18:16
  • did not work for me, I hit (v) then (s) then Ctrl-a, but mutt says "the key is not in use" the attachment is a text/plain 7 bit us-ascii – Oliver G. May 3 '15 at 18:30
  • Works fine for me: a limited set of the readline bindings (like Ctrl-a for beginning-of-line and Ctrl-u for erase line, etc) work in mutt's menu prompts... – jasonwryan May 3 '15 at 19:09

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.