[PATCH 7/7] emacs: hello: add option to omit count for a search
authorMark Walters <markwalters1009@gmail.com>
Sun, 11 May 2014 08:34:42 +0000 (09:34 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:02:41 +0000 (10:02 -0800)
8d/da52637c80913acd21d800d950250042349cee [new file with mode: 0644]

diff --git a/8d/da52637c80913acd21d800d950250042349cee b/8d/da52637c80913acd21d800d950250042349cee
new file mode 100644 (file)
index 0000000..48a2a54
--- /dev/null
@@ -0,0 +1,97 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 49B21431FD7\r
+       for <notmuch@notmuchmail.org>; Sun, 11 May 2014 01:35:33 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id vV69MtmwW9h9 for <notmuch@notmuchmail.org>;\r
+       Sun, 11 May 2014 01:35:28 -0700 (PDT)\r
+Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com\r
+       [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 8F187431FD9\r
+       for <notmuch@notmuchmail.org>; Sun, 11 May 2014 01:35:00 -0700 (PDT)\r
+Received: by mail-wi0-f169.google.com with SMTP id hi2so4221099wib.4\r
+       for <notmuch@notmuchmail.org>; Sun, 11 May 2014 01:34:59 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+       bh=UMqwpe4t+aF2yCjCNoplXTDz8InON8PL00jjhzxznLs=;\r
+       b=OOx1dLI8G9Vo5FrmFQVvWkNg87cSE5V4Anxsf6BJPqcTb0cIP+Fnm6jXnJy2UahxMC\r
+       wl1IXqitfF8xPfgcRUWIzWgD4ekjEmmjhspD9U6f3GaKSh46dj0TicijDVQ5QETP7GS6\r
+       K25HQb+xxy8VPrAYEk+9dSKOp/UOrWxmDKeCoAY0rzi0W0D/hFJSwc/wWYUK5evnyIz+\r
+       Wnhzp5YyDfEYs7TzFQwChQGQ09lMKTfojMTXtJM+4IbL+1eqzl/zbI79NiKaXUCo6pGZ\r
+       5Xk7PxSHh3ENsLcsaqNjcu9FODIi9znFaM99YksBmnMbn870Z1xezVxvdDy1jEyW3ZcN\r
+       L5YQ==\r
+X-Received: by 10.180.74.132 with SMTP id t4mr10562366wiv.30.1399797299436;\r
+       Sun, 11 May 2014 01:34:59 -0700 (PDT)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+       by mx.google.com with ESMTPSA id j3sm12738664wjw.38.2014.05.11.01.34.58\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 11 May 2014 01:34:58 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 7/7] emacs: hello: add option to omit count for a search\r
+Date: Sun, 11 May 2014 09:34:42 +0100\r
+Message-Id: <1399797282-20389-8-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1399797282-20389-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1399797282-20389-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 11 May 2014 08:35:33 -0000\r
+\r
+This omits the count for the specific search. This makes notmuch-hello\r
+faster, particularly for large complex saved searches.\r
+---\r
+ emacs/notmuch-hello.el |    7 +++++++\r
+ 1 file changed, 7 insertions(+)\r
+\r
+diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+index 265b879..b3b539d 100644\r
+--- a/emacs/notmuch-hello.el\r
++++ b/emacs/notmuch-hello.el\r
+@@ -94,6 +94,8 @@ (define-widget 'notmuch-saved-search-plist 'list\r
+                           (const :format "" :display-function)\r
+                           (choice :tag  " Display function"\r
+                                   (const :tag "Default (messages)" nil)\r
++                                  (function-item :tag "omit count"\r
++                                                 notmuch-hello-display-omit-count)\r
+                                   (function-item :tag "messages/threads"\r
+                                                  notmuch-hello-display-count-threads-and-messages)\r
+                                   (function-item :tag "highlight newly arrived messages"\r
+@@ -528,6 +530,11 @@ (defun notmuch-hello-display-new-messages (&rest args)\r
+     (plist-put current :count (notmuch-hello-nice-number (length new-list)))\r
+     (plist-put current :message-list new-list)))\r
\r
++(defun notmuch-hello-display-omit-count (&rest args)\r
++  "Omit the count."\r
++  (let* ((current (plist-get args :current)))\r
++    (plist-put current :count "---")))\r
++\r
+ (defun notmuch-hello-batch-message-count (elem-plist options)\r
+   "Update the message count for a saved search.\r
\r
+-- \r
+1.7.10.4\r
+\r