On Sat, 23 Jul 2016, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote: > Hi Nicolas-- > > On Fri 2016-07-22 17:02:03 -0400, Nicolas Petton wrote: > >> I'd like to be able to apply patches sent from emails, either as >> attachments or inlined. >> >> Notmuch can show inline patches as diffs, which is very handy, but I >> didn't find a builtin way to apply these inline patches (or attached >> ones) directly from the email, maybe I overlooked something? > > If you're asking about notmuch-emacs, I just use "|" (or ". |" if a > MIME subpart is the patch instead of the whole message) to pipe the > patch into some command i care about. Additionally, you can expand all the messages you want applied, collapse others, and use "C-u |" to pipe all open messages. > For example, if it's a git-format-generated e-mail, i'll hit the pipe > character ("|") and then in the minibuffer i'll do: > > cd ~/src/notmuch/notmuch && git am I usually end up doing M-x cd RET first, with the convenience of directory history and completion, then piping to git am. The end result is the same. BR, Jani.