summaryrefslogtreecommitdiffhomepage
path: root/lib/net/jao-notmuch.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/jao-notmuch.el')
-rw-r--r--lib/net/jao-notmuch.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index 918171f..48ba775 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -176,6 +176,15 @@
(button-at (point)))
(notmuch-show-toggle-part-invisibility))))
+(defun jao-notmuch--show-hidden-html ()
+ (when (save-excursion
+ (goto-char (point-min))
+ (re-search-forward "^\\[ text/html (hidden) \\]" nil t))
+ (jao-notmuch--toggle-mime)))
+
+(defun jao-notmuch-show-prefer-html ()
+ (add-hook 'notmuch-show-hook #'jao-notmuch--show-hidden-html))
+
(defun jao-notmuch-toggle-mime-parts ()
(interactive)
(when (jao-notmuch-goto-message-buffer nil t)