mu4e: allow for hiding fully read maildirs/bookmarks

Add a variable mu4e-main-hide-fully-read to control whether to _not_ show
maildir / bookmark links if they're fully read.
This commit is contained in:
Dirk-Jan C. Binnema
2020-05-27 17:27:00 +03:00
parent 8bfcb7430b
commit 454e8d9a3a
2 changed files with 12 additions and 1 deletions

View File

@ -33,12 +33,16 @@
;;; Mode
(defvar mu4e-main-buffer-hide-personal-addresses nil
"Whether to hid the personal address in the main view. This
"Whether to hide the personal address in the main view. This
can be useful to avoid the noise when there are many.
This also hides the warning if your `user-mail-address' is not
part of the personal addresses.")
(defvar mu4e-main-hide-fully-read nil
"When set to t, do not hide bookmarks or maildirs that have
no unread messages.")
(defvar mu4e-main-buffer-name " *mu4e-main*"
"Name of the mu4e main view buffer. The default name starts
with SPC and therefore is not visible in buffer list.")
@ -134,7 +138,9 @@ clicked."
(plist-get q :query) 'utf-8 t)
query)
collect q))
for unread = (and qcounts (plist-get (car qcounts) :unread))
when (not (plist-get bm :hide))
when (not (and mu4e-main-hide-fully-read (eq unread 0)))
concat (concat
;; menu entry
(mu4e~main-action-str
@ -171,7 +177,9 @@ clicked."
'utf-8 t)
query)
collect q))
for unread = (and qcounts (plist-get (car qcounts) :unread))
when (not (plist-get m :hide))
when (not (and mu4e-main-hide-fully-read (eq unread 0)))
concat (concat
;; menu entry
(mu4e~main-action-str