aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-02-10 12:40:47 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-02-10 12:40:47 -0800
commit2174adf374370135061bd80db21cbd43bbac95ab (patch)
tree0fd9fd41befdeba7fabf3d6f97aae5dd0d73de7b /notmuch.el
parent5dbe1c0307e905a3a770a1820bb82aaf09445121 (diff)
notmuch.el: Handle attached images via an external viewer.
We temporarily override the mm-inline-media-tests variable so that the only parts inserted into the temporary buffer (and lost) are those parts that the user has already seen in the notmuch-show buffer. Anything else, (such as images), will now be left to be handled via mailcap, just like other attachment types.
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el17
1 files changed, 16 insertions, 1 deletions
diff --git a/notmuch.el b/notmuch.el
index b9095677..040997ee 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -327,7 +327,22 @@ buffer."
"Use external viewers to view all attachments from the current message."
(interactive)
(with-current-notmuch-show-message
- (mm-display-parts (mm-dissect-buffer))))
+ ; We ovverride the mm-inline-media-tests to indicate which message
+ ; parts are already sufficiently handled by the original
+ ; presentation of the message in notmuch-show mode. These parts
+ ; will be inserted directly into the temporary buffer of
+ ; with-current-notmuch-show-message and silently discarded.
+ ;
+ ; Any MIME part not explicitly mentioned here will be handled by an
+ ; external viewer as configured in the various mailcap files.
+ (let ((mm-inline-media-tests '(
+ ("text/.*" ignore identity)
+ ("application/pgp-signature" ignore identity)
+ ("multipart/alternative" ignore identity)
+ ("multipart/mixed" ignore identity)
+ ("multipart/related" ignore identity)
+ )))
+ (mm-display-parts (mm-dissect-buffer)))))
(defun notmuch-foreach-mime-part (function mm-handle)
(cond ((stringp (car mm-handle))