From 55b2bafb0ee7f16acfb83d1f09cca524791824d0 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 8 Jul 2021 01:44:33 +0100 Subject: better toggling of images in notmuch --- lib/net/jao-notmuch.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/net/jao-notmuch.el') diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 1adbe34..9aecd7d 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -128,11 +128,13 @@ (save-window-excursion (jao-notmuch-goto-message-buffer) (when (derived-mode-p 'notmuch-show-mode) - (setq-local mm-w3m-safe-url-regexp nil - notmuch-show-text/html-blocked-images nil - shr-inhibit-images nil - shr-blocked-images nil) - (notmuch-refresh-this-buffer)))) + (when (or mm-w3m-safe-url-regexp notmuch-show-text/html-blocked-images) + (setq-local mm-w3m-safe-url-regexp nil + notmuch-show-text/html-blocked-images nil + shr-inhibit-images nil + shr-blocked-images nil) + (notmuch-refresh-this-buffer)) + (jao-notmuch--toggle-mime)))) ;; Keeping track of unread messages in current tree view -- cgit v1.2.3