1 Return-Path: <sojkam1@fel.cvut.cz>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 9BE83431FC0
\r
6 for <notmuch@notmuchmail.org>; Sat, 18 Feb 2012 14:13:06 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Rb7Y3vQtQ+nF for <notmuch@notmuchmail.org>;
\r
16 Sat, 18 Feb 2012 14:13:06 -0800 (PST)
\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 26F19431FAE
\r
19 for <notmuch@notmuchmail.org>; Sat, 18 Feb 2012 14:13:06 -0800 (PST)
\r
20 Received: from localhost (unknown [192.168.200.4])
\r
21 by max.feld.cvut.cz (Postfix) with ESMTP id 4393019F3418;
\r
22 Sat, 18 Feb 2012 23:13:05 +0100 (CET)
\r
23 X-Virus-Scanned: IMAP AMAVIS
\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])
\r
25 by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,
\r
27 with ESMTP id pFWiD1gcsbSi; Sat, 18 Feb 2012 23:13:04 +0100 (CET)
\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])
\r
29 by max.feld.cvut.cz (Postfix) with ESMTP id 2F44D19F340C;
\r
30 Sat, 18 Feb 2012 23:13:04 +0100 (CET)
\r
31 Received: from steelpick.2x.cz (unknown [213.29.198.144])
\r
32 (Authenticated sender: sojkam1)
\r
33 by imap.feld.cvut.cz (Postfix) with ESMTPSA id 19E8B660968;
\r
34 Sat, 18 Feb 2012 23:13:04 +0100 (CET)
\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.77)
\r
36 (envelope-from <sojkam1@fel.cvut.cz>)
\r
37 id 1RysWZ-0001aD-6E; Sat, 18 Feb 2012 23:12:59 +0100
\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH] emacs-hello: Do not calculate the count of the messages in
\r
42 Date: Sat, 18 Feb 2012 23:12:29 +0100
\r
43 Message-Id: <1329603149-6047-1-git-send-email-sojkam1@fel.cvut.cz>
\r
44 X-Mailer: git-send-email 1.7.7.3
\r
45 In-Reply-To: <874nunokr5.fsf@steelpick.2x.cz>
\r
46 References: <874nunokr5.fsf@steelpick.2x.cz>
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\r
50 List-Id: "Use and development of the notmuch mail system."
\r
51 <notmuch.notmuchmail.org>
\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
55 List-Post: <mailto:notmuch@notmuchmail.org>
\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
59 X-List-Received-Date: Sat, 18 Feb 2012 22:13:06 -0000
\r
61 The result is that hello screen shows much faster when some sections are
\r
64 emacs/notmuch-hello.el | 20 ++++++++++----------
\r
65 1 files changed, 10 insertions(+), 10 deletions(-)
\r
67 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
68 index aad373d..e9caade 100644
\r
69 --- a/emacs/notmuch-hello.el
\r
70 +++ b/emacs/notmuch-hello.el
\r
71 @@ -695,16 +695,16 @@ Supports the following entries in OPTIONS as a plist:
\r
72 (notmuch-hello-update))
\r
74 (widget-insert "\n")
\r
76 - (searches (apply 'notmuch-hello-query-counts query-alist options)))
\r
77 - (when (and (not is-hidden)
\r
78 - (or (not (plist-get options :hide-if-empty))
\r
80 - (widget-insert "\n")
\r
82 - (notmuch-hello-insert-buttons searches))
\r
83 - (indent-rigidly start (point) notmuch-hello-indent)
\r
86 + (when (not is-hidden)
\r
87 + (let ((searches (apply 'notmuch-hello-query-counts query-alist options)))
\r
88 + (when (or (not (plist-get options :hide-if-empty))
\r
90 + (widget-insert "\n")
\r
92 + (notmuch-hello-insert-buttons searches))
\r
93 + (indent-rigidly start (point) notmuch-hello-indent))))
\r
96 (defun notmuch-hello-insert-tags-section (&optional title &rest options)
\r
97 "Insert a section displaying all tags with message counts.
\r