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

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

Date: Sat, 9 Sep 2017 08:45:01 -0300

To: David Bremner, notmuch@notmuchmail.org, notmuch@freelists.org

Cc:

From: David Bremner


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



Thread: