X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/4af1ac604ed982d6e584c8d471a9f8fc404c4d8b..b714a808a692a99c1b936be43186a40ab251aeca:/emacs/notmuch-show.el diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 5751d984..a4d2c128 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -362,8 +362,7 @@ operation on the contents of the current buffer." (if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t) (let ((inhibit-read-only t)) (replace-match (concat "(" - (propertize (mapconcat 'identity tags " ") - 'face 'notmuch-tag-face) + (notmuch-tag-format-tags tags) ")")))))) (defun notmuch-clean-address (address) @@ -441,8 +440,7 @@ message at DEPTH in the current thread." " (" date ") (" - (propertize (mapconcat 'identity tags " ") - 'face 'notmuch-tag-face) + (notmuch-tag-format-tags tags) ")\n") (overlay-put (make-overlay start (point)) 'face 'notmuch-message-summary-face))) @@ -469,7 +467,8 @@ message at DEPTH in the current thread." 'action 'notmuch-show-part-button-default 'keymap 'notmuch-show-part-button-map 'follow-link t - 'face 'message-mml) + 'face 'message-mml + :supertype 'notmuch-button-type) (defvar notmuch-show-part-button-map (let ((map (make-sparse-keymap))) @@ -818,6 +817,16 @@ message at DEPTH in the current thread." (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-text/html (msg part content-type nth depth declared-type) + ;; text/html handler to work around bugs in renderers and our + ;; invisibile parts code. In particular w3m sets up a keymap which + ;; "leaks" outside the invisible region and causes strange effects + ;; in notmuch. We set mm-inline-text-html-with-w3m-keymap to nil to + ;; tell w3m not to set a keymap (so the normal notmuch-show-mode-map + ;; remains). + (let ((mm-inline-text-html-with-w3m-keymap nil)) + (notmuch-show-insert-part-*/* msg part content-type nth depth declared-type))) + (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)) @@ -1075,6 +1084,7 @@ buttons for a corresponding notmuch search." ;; Remove the overlay created by goto-address-mode (remove-overlays (first link) (second link) 'goto-address t) (make-text-button (first link) (second link) + :type 'notmuch-button-type 'action `(lambda (arg) (notmuch-show ,(third link))) 'follow-link t