This change means that hidden parts in the show buffer are inserted
into the buffer when the "view command" is called on that part (by
default v on the button).
---
emacs/notmuch-show.el | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 9157669..293456d 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -836,7 +836,8 @@ has overridden the default for this part"
(when (memq nth user-parts)
(setq not-shown (not not-shown)))
(if not-shown
- (notmuch-show-insert-part-header nth content-type content-type nil "
(not shown)")
+ (button-put (notmuch-show-insert-part-header nth content-type
content-type nil " (not shown)")
+ :part-not-shown 't)
(notmuch-show-insert-bodypart-internal msg part content-type nth depth
content-type)))
;; Some of the body part handlers leave point somewhere up in the
;; part, so we make sure that we're down at the end.
@@ -1912,7 +1913,10 @@ the user (see
`notmuch-show-stash-mlarchive-link-alist')."
(defun notmuch-show-part-button-view (&optional button)
(interactive)
- (notmuch-show-part-button-internal button #'notmuch-show-view-part))
+ (let ((button (or button (button-at (point)))))
+ (if (and button (button-get button :part-not-shown))
+ (notmuch-show-part-button-internal button
#'notmuch-show-internally-show-part)
+ (notmuch-show-part-button-internal button #'notmuch-show-view-part))))
(defun notmuch-show-part-button-interactively-view (&optional button)
(interactive)
--
1.7.9.1