Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail

Subject: Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail

Date: Thu, 02 Jun 2022 08:12:40 -0300

To: Damien Cassou,


From: David Bremner

Damien Cassou <> writes:

> Hi David,
> Can you please explain me what in git-send-email makes it easier to
> apply the patches?  I'm also interested in your process to apply
> patches from your mua (notmuch in Emacs hopefully) to your git
> repository.

There are some convenient tools for applying patches from notmuch in
Sean Whitton's mailscripts collection [1]. I tend to work in the shell
with some git aliases.

                nmam = "!f() { notmuch extract-patch $1 | git am -; }; f"

                nmam8 = "!f() { notmuch extract-patch $1 | email-to-8bit |  git am -; }; f"

                nmam3 = "!f() { notmuch extract-patch $1 | git am -3 -; }; f"
I use "c i" to copy the message id, and then paste it into a command
        $ git nmam <paste id here>

email-to-8bit is a little hack to work around mailman induced damage to
patches; it seems less needed with new versions of git.

notmuch-extract-patch is from mailscripts, and it fails (well, fails to
extract any patch) with attached
patches. I used to use

         notmuch show --format=raw

in place of "notmuch extract-patch". This succeeds in extracting a
patch, but smashes the body text together with the commit message in the
resulting commit.

>> [ about emacs git commit messages ]

> I think it focuses too much on what has changed
> (something that could be inferred from the patch with a little tooling)
> instead of why the code has changed this way (something only the author
> can tell).


     also available in e.g. Debian.

email-to-8bit (application/octet-stream)
notmuch mailing list --
To unsubscribe send an email to