Add optional name for maildir shortcuts

This commit is contained in:
Manuel Wiesinger
2022-07-04 11:46:39 +02:00
parent cd23debf77
commit f16f4b5e3c
2 changed files with 7 additions and 3 deletions

View File

@ -97,6 +97,7 @@ Each of the list elements is a plist with at least:
`:key' - the shortcut key.
Optionally, you can add the following:
`:name' - name of the maildir to be displayed in main-view.
`:hide' - if t, the shortcut is hidden from the main-view and
speedbar.
`:hide-unread' - do not show the counts of unread/total number
@ -159,7 +160,8 @@ This is compatibile with `mu4e-bookmarks'."
(seq-map
(lambda (item)
(let* ((maildir (plist-get item :maildir))
(item (plist-put item :name maildir))
(name (or (plist-get item :name) maildir))
(item (plist-put item :name name))
(item (plist-put item :query (format "maildir:\"%s\"" maildir))))
item)) ;; we don't need ":maildir", but it's harmless.
(mu4e-maildir-shortcuts)))