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