[PATCH 7/7] emacs: hello: add option to omit count for a search

Mark Walters markwalters1009 at gmail.com
Sun May 11 01:34:42 PDT 2014


This omits the count for the specific search. This makes notmuch-hello
faster, particularly for large complex saved searches.
---
 emacs/notmuch-hello.el |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 265b879..b3b539d 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -94,6 +94,8 @@ (define-widget 'notmuch-saved-search-plist 'list
 			    (const :format "" :display-function)
 			    (choice :tag  " Display function"
 				    (const :tag "Default (messages)" nil)
+				    (function-item :tag "omit count"
+						   notmuch-hello-display-omit-count)
 				    (function-item :tag "messages/threads"
 						   notmuch-hello-display-count-threads-and-messages)
 				    (function-item :tag "highlight newly arrived messages"
@@ -528,6 +530,11 @@ (defun notmuch-hello-display-new-messages (&rest args)
     (plist-put current :count (notmuch-hello-nice-number (length new-list)))
     (plist-put current :message-list new-list)))
 
+(defun notmuch-hello-display-omit-count (&rest args)
+  "Omit the count."
+  (let* ((current (plist-get args :current)))
+    (plist-put current :count "---")))
+
 (defun notmuch-hello-batch-message-count (elem-plist options)
   "Update the message count for a saved search.
 
-- 
1.7.10.4



More information about the notmuch mailing list