Skip to content

Commit

Permalink
mu4e-search-query: include unread counts if available
Browse files Browse the repository at this point in the history
In the completion annotation.
  • Loading branch information
djcb committed Aug 10, 2023
1 parent dd5d5e6 commit 677a6d3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions mu4e/mu4e-search.el
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,16 @@ query before submitting it."
(concat
" "
(make-string (- longest-name (length name)) ?\s)
query))))
query
(make-string (- longest-query (length query)) ?\s)
" "
(mu4e--query-item-display-counts item)))))
(completion-extra-properties
`(:annotation-function ,annotation-func)))
(mu4e-search-bookmark (completing-read "Query: " candidates) edit)))
`(:annotation-function ,annotation-func))
(chosen (completing-read "Query: " candidates))
(query (or (plist-get (cdr-safe (assoc chosen candidates)) :query)
(mu4e-warn "No query for %s" chosen))))
(mu4e-search-bookmark query edit)))

(define-minor-mode mu4e-search-minor-mode
"Mode for searching for messages."
Expand Down

0 comments on commit 677a6d3

Please sign in to comment.