emacs: create patch filename from subject for inline patch fake parts
authorJani Nikula <jani@nikula.org>
Tue, 27 Dec 2011 16:04:39 +0000 (18:04 +0200)
committerDavid Bremner <bremner@debian.org>
Wed, 28 Dec 2011 12:18:27 +0000 (08:18 -0400)
commitf893d317624d2651fef4a2f6c2d68c32ac1e6fa6
tree40c70ad4a541f410bb6fdbd92b1981a4d7dc09e7
parentd5d39a92f1d2c38f2813bb9aa2fbffa2a450b549
emacs: create patch filename from subject for inline patch fake parts

Use the mail subject line for creating a descriptive filename for the wash
generated inline patch fake parts. The names are similar to the ones
created by 'git format-patch'.

If the user has notmuch-wash-convert-inline-patch-to-part hook enabled in
notmuch-show-insert-text/plain-hook, this will change the old default
filename of "inline patch" in fake parts:

[ inline patch: inline patch (as text/x-diff) ]

into, for example:

[ 0002-emacs-create-patch-filename-from-subject-for-inline.patch: inline patch (as text/x-diff) ]

which is typically the same filename the sender had if he was using 'git
format-patch' and 'git send-email'.

Signed-off-by: Jani Nikula <jani@nikula.org>
emacs/notmuch-wash.el