mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-23 01:44:52 +01:00
emacs: If 'all tags' is not shown, don't use it when calculating widths.
If the 'all tags' section of the hello buffer will not be shown, don't
consider those tags when determining the number of saved searches that
can be displayed on a single line.
(cherry picked from commit 18d41192d2
)
This commit is contained in:
parent
7825376b3f
commit
98a05af063
1 changed files with 20 additions and 18 deletions
|
@ -284,8 +284,9 @@ diagonal."
|
|||
if (> (string-to-number (notmuch-saved-search-count (cdr elem))) 0)
|
||||
collect elem)))
|
||||
(saved-widest (notmuch-hello-longest-label saved-alist))
|
||||
(alltags-alist (mapcar '(lambda (tag) (cons tag (concat "tag:" tag)))
|
||||
(process-lines notmuch-command "search-tags")))
|
||||
(alltags-alist (if notmuch-show-all-tags-list
|
||||
(mapcar '(lambda (tag) (cons tag (concat "tag:" tag)))
|
||||
(process-lines notmuch-command "search-tags"))))
|
||||
(alltags-widest (notmuch-hello-longest-label alltags-alist))
|
||||
(widest (max saved-widest alltags-widest)))
|
||||
|
||||
|
@ -360,8 +361,6 @@ diagonal."
|
|||
(indent-rigidly start (point) notmuch-hello-indent)))
|
||||
|
||||
(when alltags-alist
|
||||
(if notmuch-show-all-tags-list
|
||||
(progn
|
||||
(widget-insert "\nAll tags: ")
|
||||
(widget-create 'push-button
|
||||
:notify (lambda (widget &rest ignore)
|
||||
|
@ -374,12 +373,15 @@ diagonal."
|
|||
(if (not final-target-pos)
|
||||
(setq final-target-pos found-target-pos))
|
||||
(indent-rigidly start (point) notmuch-hello-indent)))
|
||||
|
||||
(widget-insert "\n")
|
||||
|
||||
(if (not notmuch-show-all-tags-list)
|
||||
(widget-create 'push-button
|
||||
:notify (lambda (widget &rest ignore)
|
||||
(setq notmuch-show-all-tags-list t)
|
||||
(notmuch-hello-update))
|
||||
"Show all tags"))))
|
||||
"Show all tags")))
|
||||
|
||||
(let ((start (point)))
|
||||
(widget-insert "\n\n")
|
||||
|
|
Loading…
Reference in a new issue