summaryrefslogtreecommitdiffhomepage
path: root/lib/net/jao-notmuch.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-07-05 00:34:44 +0100
committerjao <jao@gnu.org>2021-07-05 00:34:44 +0100
commit666d7d94655a3b9151504b9550411feb845c7b96 (patch)
treeebed6583740bbc3b06e234d8216d0bdef55b76c9 /lib/net/jao-notmuch.el
parentc32e7602b05da3daecf5c487b04f163f5a4bf7e4 (diff)
downloadelibs-666d7d94655a3b9151504b9550411feb845c7b96.tar.gz
elibs-666d7d94655a3b9151504b9550411feb845c7b96.tar.bz2
cleaner handling of images in html email
Diffstat (limited to 'lib/net/jao-notmuch.el')
-rw-r--r--lib/net/jao-notmuch.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index bb57f57..97e34f5 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -108,28 +108,30 @@
(jao-notmuch-goto-message-buffer))
(notmuch-show-browse-urls)))
+(defun jao-notmuch--toggle-mime ()
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward "\\[ multipart/alternative \\]" nil t)
+ (while (forward-button 1 nil nil t)
+ (notmuch-show-toggle-part-invisibility)))))
+
(defun jao-notmuch-toggle-mime-parts ()
(interactive)
(when (jao-notmuch-goto-message-buffer)
(goto-char (point-min))
- (let ((notmuch-show-text/html-blocked-images nil)
- (shr-inhibit-images nil)
- (shr-blocked-images nil))
- (save-excursion
- (when (re-search-forward "\\[ multipart/alternative \\]" nil t)
- (while (forward-button 1 nil nil t)
- (notmuch-show-toggle-part-invisibility)))))
+ (jao-notmuch--toggle-mime)
(jao-notmuch-goto-tree-buffer)))
-(defun jao-notmuch-toggle-images ()
+(defun jao-notmuch-show-images ()
(interactive)
(save-window-excursion
(jao-notmuch-goto-message-buffer)
(when (derived-mode-p 'notmuch-show-mode)
- (let ((notmuch-show-text/html-blocked-images nil)
- (shr-inhibit-images nil)
- (shr-blocked-images nil))
- (notmuch-refresh-this-buffer)))))
+ (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))))
;; Keeping track of unread messages in current tree view