X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=1864dd15a05bb8b24c2255806c9e383d9f5f6e31;hb=8d7afd0f45c2ce4d54ec475bb53528eadefa6697;hp=f9366d0ae56378d7a75609f2bae3d08e3520c6b7;hpb=a5b5404976597739d335cab3767d59bd240aeeaf;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index f9366d0a..1864dd15 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -94,7 +94,7 @@ visible for any given message." :group 'notmuch-hooks) ;; Mostly useful for debugging. -(defcustom notmuch-show-all-multipart/alternative-parts t +(defcustom notmuch-show-all-multipart/alternative-parts nil "Should all parts of multipart/alternative parts be shown?" :type 'boolean :group 'notmuch-show) @@ -818,6 +818,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))