From 5c6f90081fad69a8430e81e7d9e04212f7f3e009 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 22 Nov 2020 15:46:09 -0500 Subject: 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> --- piem-gnus.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'piem-gnus.el') diff --git a/piem-gnus.el b/piem-gnus.el index ca128fb..9dc4ae8 100644 --- a/piem-gnus.el +++ b/piem-gnus.el @@ -70,7 +70,8 @@ message itself if it looks like a patch." (mapcar (lambda (handle) (and (listp handle) (piem-am-patch-attachment-p - (mm-handle-media-type handle)) + (mm-handle-media-type handle) + (mm-handle-filename handle)) (with-temp-buffer (mm-display-inline handle) (buffer-substring-no-properties -- cgit v1.2.3