[RFC] emacs/show: drop header lines for excluded messages

classic Classic list List threaded Threaded
2 messages Options
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

[RFC] emacs/show: drop header lines for excluded messages

These message headers can be brought back by the usual trick of adding
e.g. "tag:deleted" to the search.
---

This doesn't seem to break any tests (which suggests a gap in the test
suite). I _think_ this is a small improvement, particularly for
drafts, but I haven't used it much yet.

 emacs/notmuch-show.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index cd901e47..f72a2fdc 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1143,7 +1143,7 @@ is t, hide the part initially and show the button."
   (let ((msg (car tree))
  (replies (cadr tree)))
     ;; We test whether there is a message or just some replies.
-    (when msg
+    (when (and msg (not (plist-get msg :excluded)))
       (notmuch-show-insert-msg msg depth))
     (notmuch-show-insert-thread replies (1+ depth))))
 
--
2.14.1

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

[RFC] emacs/tree: do not insert excluded messages

This is motivated by hiding deleted drafts.
---

This is probably a little too simple-minded, and will likely cause
some strange display artifacts. If you have some nice test cases, let me know.

 emacs/notmuch-tree.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index c00315e8..424abd94 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -801,7 +801,8 @@ message together with all its descendents."
       (setq msg (plist-put msg :first (and first (eq 0 depth))))
       (setq msg (plist-put msg :tree-status tree-status))
       (setq msg (plist-put msg :orig-tags (plist-get msg :tags)))
-      (notmuch-tree-goto-and-insert-msg msg)
+      (when (not (plist-get msg :excluded))
+ (notmuch-tree-goto-and-insert-msg msg))
       (pop tree-status)
       (pop tree-status)
 
--
2.14.1

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch