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

David Bremner david at tethera.net
Sat Sep 9 04:45:01 PDT 2017


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



More information about the notmuch mailing list