]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-show.el
emacs: add inline patch fake parts through a special handler
[notmuch] / emacs / notmuch-show.el
index b565f336832382862101df17a7a203e76ce46561..6ef3f90f1f39892aa305bb246f95de6deb540f2e 100644 (file)
@@ -585,6 +585,10 @@ current buffer, if possible."
                nil))
          nil))))
 
+;; Handler for wash generated inline patch fake parts.
+(defun notmuch-show-insert-part-inline-patch-fake-part (msg part content-type nth depth declared-type)
+  (notmuch-show-insert-part-*/* msg part "text/x-diff" nth depth "inline patch"))
+
 (defun notmuch-show-insert-part-*/* (msg part content-type nth depth declared-type)
   ;; This handler _must_ succeed - it is the handler of last resort.
   (notmuch-show-insert-part-header nth content-type declared-type (plist-get part :filename))
@@ -803,7 +807,7 @@ a corresponding notmuch search."
       (remove-overlays (match-beginning 0) (match-end 0) 'goto-address t)
       (make-text-button (match-beginning 0) (match-end 0)
                        'action `(lambda (arg)
-                                  (notmuch-search ,(match-string-no-properties 0)))
+                                  (notmuch-show ,(match-string-no-properties 0)))
                        'follow-link t
                        'help-echo "Mouse-1, RET: search for this message"
                        'face goto-address-mail-face))))