mu4e-utils: send maildir queries along with bookmarks

When `mu4e-main-show-maildirs' is non-nil, we append the list of maildir
queries to the mu server.
This commit is contained in:
Sean Farley
2020-02-24 14:17:44 -08:00
committed by Dirk-Jan C. Binnema
parent a899dd04f7
commit c2b0d2db6e

View File

@ -809,14 +809,14 @@ When successful, call FUNC (if non-nil) afterwards."
(mu4e~context-autoswitch nil mu4e-context-policy)) (mu4e~context-autoswitch nil mu4e-context-policy))
(setq mu4e-pong-func (lambda (info) (mu4e~pong-handler info func))) (setq mu4e-pong-func (lambda (info) (mu4e~pong-handler info func)))
(mu4e~proc-ping (mu4e~proc-ping
(mapcar (mapcar ;; send it a list of queries we'd like to see read/unread info for
;; send it a list of queries we'd like to see read/unread info for. (lambda (bm) (plist-get bm :query))
(lambda(bm) (plist-get bm :query)) ;; exclude bookmarks that are not strings, and with certain flags
(seq-filter (lambda (bm) ;; exclude bookmarks that are not strings, (seq-filter (lambda (bm)
;; and with these flags.
(and (stringp (plist-get bm :query)) (and (stringp (plist-get bm :query))
(not (or (plist-get bm :hide) (plist-get bm :hide-unread))))) (not (or (plist-get bm :hide) (plist-get bm :hide-unread)))))
(mu4e-bookmarks)))) (append (mu4e-bookmarks)
(mu4e~maildirs-with-query)))))
;; maybe request the list of contacts, automatically refreshed after ;; maybe request the list of contacts, automatically refreshed after
;; reindexing ;; reindexing
(unless mu4e~contacts (mu4e~request-contacts-maybe))) (unless mu4e~contacts (mu4e~request-contacts-maybe)))