X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.el;h=7e95f95671801e0c2e1c75c47d3bfddd8b792489;hp=872397646857956e1a8f67db2077e689a6f704a3;hb=d3349358c6a5048559bd2a4faebe476ebd222170;hpb=8561c7463a5de3bd0990d8244abb1c67ca4f4a7d diff --git a/notmuch.el b/notmuch.el index 87239764..7e95f956 100644 --- a/notmuch.el +++ b/notmuch.el @@ -19,7 +19,8 @@ ; ; Authors: Carl Worth -(load "cl-seq") +(require 'cl) +(require 'mm-view) (defvar notmuch-show-mode-map (let ((map (make-sparse-keymap))) @@ -35,6 +36,7 @@ (define-key map "b" 'notmuch-show-toggle-body-read-visible) (define-key map "c" 'notmuch-show-toggle-citations-visible) (define-key map "h" 'notmuch-show-toggle-headers-visible) + (define-key map "m" 'message-mail) (define-key map "n" 'notmuch-show-next-message) (define-key map "N" 'notmuch-show-mark-read-then-next-open-message) (define-key map "p" 'notmuch-show-previous-message) @@ -43,6 +45,7 @@ (define-key map "q" 'kill-this-buffer) (define-key map "r" 'notmuch-show-reply) (define-key map "s" 'notmuch-show-toggle-signatures-visible) + (define-key map "v" 'notmuch-show-view-all-mime-parts) (define-key map "w" 'notmuch-show-view-raw-message) (define-key map "x" 'kill-this-buffer) (define-key map "+" 'notmuch-show-add-tag) @@ -222,6 +225,18 @@ buffer." (interactive) (view-file (notmuch-show-get-filename))) +(defun notmuch-show-view-all-mime-parts () + "Use external viewers (according to mailcap) to view all MIME-encoded parts." + (interactive) + (save-excursion + (let ((filename (notmuch-show-get-filename))) + (switch-to-buffer (generate-new-buffer (concat "*notmuch-mime-" + filename + "*"))) + (insert-file-contents filename nil nil nil t) + (mm-display-parts (mm-dissect-buffer)) + (kill-this-buffer)))) + (defun notmuch-show-reply () "Begin composing a reply to the current message in a new buffer." (interactive) @@ -614,6 +629,7 @@ thread from that buffer can be show when done with this one)." (define-key map "a" 'notmuch-search-archive-thread) (define-key map "b" 'notmuch-search-scroll-down) (define-key map "f" 'notmuch-search-filter) + (define-key map "m" 'message-mail) (define-key map "n" 'next-line) (define-key map "o" 'notmuch-search-toggle-order) (define-key map "p" 'previous-line)