From 178245f5ef8606338b768ebaffe9deeb1ab5f63b Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 13 Aug 2021 19:53:57 +0100 Subject: notmuch: prefer html multipart --- lib/net/jao-notmuch.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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) -- cgit v1.2.3