Re: [PATCH] emacs-hello: Do not calculate the count of the messages in hidden sections
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Mon, 5 Mar 2012 02:00:00 +0000 (06:00 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:14 +0000 (09:45 -0800)
0d/230a0ea7e6d425c1e35f1cc5bb638925590f97 [new file with mode: 0644]

diff --git a/0d/230a0ea7e6d425c1e35f1cc5bb638925590f97 b/0d/230a0ea7e6d425c1e35f1cc5bb638925590f97
new file mode 100644 (file)
index 0000000..500d42f
--- /dev/null
@@ -0,0 +1,134 @@
+Return-Path: <dmitry.kurochkin@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 85C6B431FAF\r
+       for <notmuch@notmuchmail.org>; Sun,  4 Mar 2012 18:01:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, 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 QV7A6J15QHTA for <notmuch@notmuchmail.org>;\r
+       Sun,  4 Mar 2012 18:01:31 -0800 (PST)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 80A8F431FAE\r
+       for <notmuch@notmuchmail.org>; Sun,  4 Mar 2012 18:01:31 -0800 (PST)\r
+Received: by bkwj4 with SMTP id j4so3168873bkw.26\r
+       for <notmuch@notmuchmail.org>; Sun, 04 Mar 2012 18:01:29 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of dmitry.kurochkin@gmail.com\r
+       designates 10.204.145.81 as permitted sender)\r
+       client-ip=10.204.145.81; \r
+Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
+       dmitry.kurochkin@gmail.com designates 10.204.145.81 as\r
+       permitted sender) smtp.mail=dmitry.kurochkin@gmail.com;\r
+       dkim=pass header.i=dmitry.kurochkin@gmail.com\r
+Received: from mr.google.com ([10.204.145.81])\r
+       by 10.204.145.81 with SMTP id c17mr9736851bkv.39.1330912889927\r
+       (num_hops = 1); Sun, 04 Mar 2012 18:01:29 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type;\r
+       bh=ffo1XB/z1258zHybdgk995wKJF2CSgfVmjZjk+FhD1o=;\r
+       b=UFWwZnGUCONtQrjP11JuevRc9A7rIsuwoIW88fEYYYN5IfMFK7v6YWGWOekU1BrPch\r
+       XXvx0VT5eRO7l0EDgnvmFJHqAWWl0+DNsrILbz+Sj6kwBj1IL5ZxqrMHfcJvTj5OlTA4\r
+       zizNukIxca2jJTK31uqpfQxaGwk+XIRyFq2OicOzTpnlfcvGtnJLbBo51J+XqlTcO6YD\r
+       ZmxQvVWF4q5w/iM7zHYUS8ww8Fi/rN9tRXs2EKICPSk1w8gf7j59FIF7eJg9yGXSm8UT\r
+       ybsnMHvbPlYX0zdlhLUqbpqKTgX3HLqlWqsGi54ojD2+5EfVQQ5XCWFzYUHC4q4ZVLTN\r
+       RhwQ==\r
+Received: by 10.204.145.81 with SMTP id c17mr7757996bkv.39.1330912889812;\r
+       Sun, 04 Mar 2012 18:01:29 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id ey8sm22253600bkb.1.2012.03.04.18.01.28\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 04 Mar 2012 18:01:28 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs-hello: Do not calculate the count of the messages\r
+       in hidden sections\r
+In-Reply-To: <1329603149-6047-1-git-send-email-sojkam1@fel.cvut.cz>\r
+References: <874nunokr5.fsf@steelpick.2x.cz>\r
+       <1329603149-6047-1-git-send-email-sojkam1@fel.cvut.cz>\r
+User-Agent: Notmuch/0.11.1+288~g4b3af0e (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Mon, 05 Mar 2012 06:00:00 +0400\r
+Message-ID: <87eht7lsdb.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Mon, 05 Mar 2012 02:01:32 -0000\r
+\r
+Hi Michal.\r
+\r
+On Sat, 18 Feb 2012 23:12:29 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+> The result is that hello screen shows much faster when some sections are\r
+> hidden.\r
+> ---\r
+\r
+The patch looks good to me.\r
+\r
+Please do not send new patches as replies to other patch threads.  It\r
+makes it difficult to track, especially when there are multiple\r
+versions.  You can always add an id: reference to the related thread.\r
+\r
+Regards,\r
+  Dmitry\r
+\r
+>  emacs/notmuch-hello.el |   20 ++++++++++----------\r
+>  1 files changed, 10 insertions(+), 10 deletions(-)\r
+> \r
+> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+> index aad373d..e9caade 100644\r
+> --- a/emacs/notmuch-hello.el\r
+> +++ b/emacs/notmuch-hello.el\r
+> @@ -695,16 +695,16 @@ Supports the following entries in OPTIONS as a plist:\r
+>                              (notmuch-hello-update))\r
+>                   "hide"))\r
+>      (widget-insert "\n")\r
+> -    (let (target-pos\r
+> -      (searches (apply 'notmuch-hello-query-counts query-alist options)))\r
+> -      (when (and (not is-hidden)\r
+> -           (or (not (plist-get options :hide-if-empty))\r
+> -              searches))\r
+> -    (widget-insert "\n")\r
+> -    (setq target-pos\r
+> -          (notmuch-hello-insert-buttons searches))\r
+> -    (indent-rigidly start (point) notmuch-hello-indent)\r
+> -    target-pos))))\r
+> +    (let (target-pos)\r
+> +      (when (not is-hidden)\r
+> +    (let ((searches (apply 'notmuch-hello-query-counts query-alist options)))\r
+> +      (when (or (not (plist-get options :hide-if-empty))\r
+> +                searches)\r
+> +        (widget-insert "\n")\r
+> +        (setq target-pos\r
+> +              (notmuch-hello-insert-buttons searches))\r
+> +        (indent-rigidly start (point) notmuch-hello-indent))))\r
+> +      target-pos)))\r
+>  \r
+>  (defun notmuch-hello-insert-tags-section (&optional title &rest options)\r
+>    "Insert a section displaying all tags with message counts.\r
+> -- \r
+> 1.7.7.3\r
+> \r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r