[PATCH] emacs-hello: Do not calculate the count of the messages in hidden sections
Dmitry Kurochkin
dmitry.kurochkin at gmail.com
Sun Mar 4 18:00:00 PST 2012
Hi Michal.
On Sat, 18 Feb 2012 23:12:29 +0100, Michal Sojka <sojkam1 at fel.cvut.cz> 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 at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list