mu4e-utils: add method to count the longest name
Consolidates the logic for looping over bookmarks and maildirs so that we can compute the longest name.
This commit is contained in:
committed by
Dirk-Jan C. Binnema
parent
c2b0d2db6e
commit
41f0c5a92a
@ -862,6 +862,11 @@ This is meant to be the exact same data structure as
|
|||||||
append (list key value))))
|
append (list key value))))
|
||||||
(mu4e-maildir-shortcuts)))
|
(mu4e-maildir-shortcuts)))
|
||||||
|
|
||||||
|
(defun mu4e~longest-of-maildirs-and-bookmarks ()
|
||||||
|
"Return the length of longest name of bookmarks and maildirs."
|
||||||
|
(cl-loop for b in (append (mu4e-bookmarks)
|
||||||
|
(mu4e~maildirs-with-query))
|
||||||
|
maximize (length (plist-get b :name))))
|
||||||
|
|
||||||
|
|
||||||
;;; Indexing & Updating
|
;;; Indexing & Updating
|
||||||
|
|||||||
Reference in New Issue
Block a user