aboutsummaryrefslogtreecommitdiff
path: root/piem-notmuch.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-11-22 15:46:09 -0500
committerKyle Meyer <kyle@kyleam.com>2020-11-22 19:51:16 -0500
commit5c6f90081fad69a8430e81e7d9e04212f7f3e009 (patch)
tree1c47f0fcbb5386bd701248257d17f38dc2540e12 /piem-notmuch.el
parent27495eeb67515f8dac0e7449aa2165272e8ebe5a (diff)
downloadpiem-5c6f90081fad69a8430e81e7d9e04212f7f3e009.tar.gz
gnus, notmuch: Consider text/plain patch attachments
When inspecting attachments for generating an am-ready mbox, both -notmuch and -gnus limit the operation to attachments with text/x-diff or text/x-patch content types. That has worked okay for me, though I've run into a few cases where I couldn't apply a patch attachment because it had a text/plain content type. To do something useful in this case, check the file name to see whether it looks like a patch. Message-Id: <20201122204609.12604-5-kyle@kyleam.com>
Diffstat (limited to 'piem-notmuch.el')
-rw-r--r--piem-notmuch.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/piem-notmuch.el b/piem-notmuch.el
index 8f5ef77..58e4d88 100644
--- a/piem-notmuch.el
+++ b/piem-notmuch.el
@@ -92,7 +92,8 @@ message itself if it looks like a patch."
(delq nil
(mapcar (lambda (part)
(and (piem-am-patch-attachment-p
- (plist-get part :content-type))
+ (plist-get part :content-type)
+ (plist-get part :filename))
(plist-get part :content)))
(plist-get body :content)))))
(cons (lambda ()