[PATCH] emacs: show: make RET always toggle parts where plausible

Subject: [PATCH] emacs: show: make RET always toggle parts where plausible

Date: Wed, 5 Dec 2012 09:41:20 +0000

To: notmuch@notmuchmail.org

Cc:

From: Mark Walters


This makes RET toggle the visibility of any part which has a component
that can be displayed in the buffer. This included text parts (plain/
html/ x-tex etc) and images. Parts which cannot be displayed (eg pdf)
RET acts as before and saves/views etc.

Definite actions can always be accessed with s,v and o (eg v to view a
text/html part in a browser).

---

This is a slight tweak at Jani's suggestion on irc. Applies on top of
the previous series.



 emacs/notmuch-show.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index a4daff8..e319e5c 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -2028,7 +2028,7 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')."
 (defun notmuch-show-part-button-default (&optional button)
   (interactive)
   (let ((button (or button (button-at (point)))))
-    (if (invisible-p (button-get button 'invisibility-spec))
+    (if (button-get button 'invisibility-spec)
 	(notmuch-show-toggle-invisible-part-action button)
       (notmuch-show-part-button-internal button notmuch-show-part-button-default-action))))
 
-- 
1.7.9.1


Thread: