unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart
@ 2012-12-17 21:54 Mark Walters
  2012-12-17 21:54 ` [PATCH v4 1/5] emacs: show: modify insert-part-header to save the button text Mark Walters
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Mark Walters @ 2012-12-17 21:54 UTC (permalink / raw)
  To: notmuch

This is version 4 of this series (previous version at
id:1355559338-14313-1-git-send-email-markwalters1009@gmail.com).

The only change should be a bugfix which, for reasons I don't
understand, only causes a problem on emacs 24. The problem is that the
part invisibility code looks for a part button at the start of the
region. This gets confused if there is a part with no part button
(this is the case for the first part if it is text/plain) and the part
starts with a button (as can happen if the message starts with the
reply as in the first test in test/emacs-show).

This checks that the button is a part button before creating the part
overlay.

The diff is below the diffstat. 

Best wishes

Mark



Mark Walters (5):
  emacs: show: modify insert-part-header to save the button text
  emacs: show: add overlays for each part
  emacs: show: add invisibility button action
  emacs: wash: fix fake-diff part to include msg parameter
  emacs: show: set default show-all-multipart/alternatives to nil

 emacs/notmuch-show.el |  115 ++++++++++++++++++++++++++++++++++++++-----------
 emacs/notmuch-wash.el |    2 +-
 2 files changed, 90 insertions(+), 27 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 5ca6fe2..3816e32 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -865,8 +865,10 @@ message at DEPTH in the current thread."
   (let* ((button (button-at beg))
 	 (part-beg (and button (1+ (button-end button)))))
 
-    ;; If the part contains no text we do not make it toggleable.
-    (when (and button (/= part-beg end))
+    ;; If the part contains no text we do not make it toggleable. We
+    ;; also need to check that the button is a genuine part button not
+    ;; a notmuch-wash button.
+    (when (and button (/= part-beg end) (button-get button :base-label))
       (let ((base-label (button-get button :base-label))
 	    (overlay (make-overlay part-beg end))
 	    (message-invis-spec (plist-get msg :message-invis-spec))
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-18 17:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 21:54 [PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart Mark Walters
2012-12-17 21:54 ` [PATCH v4 1/5] emacs: show: modify insert-part-header to save the button text Mark Walters
2012-12-17 21:54 ` [PATCH v4 2/5] emacs: show: add overlays for each part Mark Walters
2012-12-17 21:54 ` [PATCH v4 3/5] emacs: show: add invisibility button action Mark Walters
2012-12-17 21:54 ` [PATCH v4 4/5] emacs: wash: fix fake-diff part to include msg parameter Mark Walters
2012-12-17 21:54 ` [PATCH v4 5/5] emacs: show: set default show-all-multipart/alternatives to nil Mark Walters
2012-12-18  8:54 ` [PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart Mark Walters
2012-12-18 17:10   ` Austin Clements

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).