diff options
author | Kyle Meyer <kyle@kyleam.com> | 2021-01-04 01:54:48 +0000 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2021-01-03 22:44:19 -0500 |
commit | 57f802b2a43ac64c28a5a9ddb9da0afaf910975e (patch) | |
tree | e9b2d38b28c3846fa405c95619ebfca9bf19757f /piem-notmuch.el | |
parent | f5d67001ed706407b8fcda5447da64a4c215f0c2 (diff) | |
download | piem-57f802b2a43ac64c28a5a9ddb9da0afaf910975e.tar.gz |
gnus, notmuch: Absorb now-shared bits into patch attachment helper
With the previous commit, -notmuch more closely follows -gnus in its
handling of attachments (e.g., getting the content with
mm-display-inline). Replace piem-am-patch-attachment-p with a helper
that has this shared logic.
Message-Id: <20210104015435.18397-4-kyle@kyleam.com>
Diffstat (limited to 'piem-notmuch.el')
-rw-r--r-- | piem-notmuch.el | 10 |
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)) |