Add support for empty and string maildir shortcuts

This commit is contained in:
Manuel Wiesinger
2022-07-04 12:54:13 +02:00
parent f16f4b5e3c
commit be695579c6
3 changed files with 14 additions and 8 deletions

View File

@ -212,7 +212,7 @@ clicked."
with longest = (mu4e--longest-of-maildirs-and-bookmarks)
with queries = (plist-get mu4e--server-props :queries)
for m in mds
for key = (string (plist-get m :key))
for key = (plist-get m :key)
for name = (plist-get m :name)
for query = (plist-get m :query)
for qcounts = (and (stringp query)
@ -228,9 +228,12 @@ clicked."
when (not (and mu4e-main-hide-fully-read (eq unread 0)))
concat (concat
;; menu entry
(mu4e--main-action-str
(concat "\t* [j" key "] " name)
(concat "j" key))
(cond ((characterp key)
(mu4e--main-action-str
(concat "\t* [j" (string key) "] " name)
(concat "j" (string key))))
((stringp key) (concat "\t* " key " " name))
(t (concat "\t* " name)))
;; append all/unread numbers, if available.
(if qcounts
(let ((unread (plist-get (car qcounts) :unread))