unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [RFC] emacs/show: drop header lines for excluded messages
@ 2017-09-09 11:15 David Bremner
  2017-09-09 11:45 ` [RFC] emacs/tree: do not insert " David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2017-09-09 11:15 UTC (permalink / raw)
  To: notmuch, notmuch

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

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

* [RFC] emacs/tree: do not insert excluded messages
  2017-09-09 11:15 [RFC] emacs/show: drop header lines for excluded messages David Bremner
@ 2017-09-09 11:45 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2017-09-09 11:45 UTC (permalink / raw)
  To: David Bremner, notmuch, notmuch

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

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

end of thread, other threads:[~2017-09-09 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-09 11:15 [RFC] emacs/show: drop header lines for excluded messages David Bremner
2017-09-09 11:45 ` [RFC] emacs/tree: do not insert " David Bremner

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).