X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-hello.el;h=28f39f19a8cb4724642e51b522d2b64282139510;hb=6acd61dad91cb1b5c43261a3c6cf7583ecf16f13;hp=aad373d6fbbae7d1d52fc9bd3e1180833ea1fe4d;hpb=ad6a6edb38e428f7bbcd81b49fd2ef1e5197f8c7;p=notmuch diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index aad373d6..28f39f19 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -461,7 +461,7 @@ Such a list can be computed with `notmuch-hello-query-counts'." ;; just insert `(- widest (length name))' spaces - the ;; column separator is included in the button if ;; `(equal widest (length name)'. - (widget-insert (make-string (max 1 + (widget-insert (make-string (max 0 (- widest (length name))) ? ))))) (setq count (1+ count)) @@ -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.