aboutsummaryrefslogtreecommitdiff
path: root/piem-notmuch.el
diff options
context:
space:
mode:
Diffstat (limited to 'piem-notmuch.el')
-rw-r--r--piem-notmuch.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/piem-notmuch.el b/piem-notmuch.el
index 915675e..37e695b 100644
--- a/piem-notmuch.el
+++ b/piem-notmuch.el
@@ -92,14 +92,8 @@ message itself if it looks like a patch."
"show" "--format=mbox" id))))
(notmuch-foreach-mime-part
(lambda (p)
- (and (piem-am-patch-attachment-p
- (mm-handle-media-type p)
- (mm-handle-filename p))
- (with-temp-buffer
- (mm-display-inline p)
- (push (buffer-substring-no-properties
- (point-min) (point-max))
- patches))))
+ (when-let ((patch (piem-am-extract-attached-patch p)))
+ (push patch patches)))
handle)
(when patches
(setq patches (nreverse patches))