Merge pull request #1931 from tsdh/query-completion-when-editing-bookmarks

mu4e-headers: Read query with completion also when editing a bookmark
This commit is contained in:
Dirk-Jan C. Binnema 2021-02-17 21:54:04 +02:00 committed by GitHub
commit 775498937d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 9 deletions

View File

@ -1647,15 +1647,9 @@ searching. If SHOW is non-nil, show the message with MSGID."
(interactive)
(let* ((prompt (mu4e-format (or prompt "Search for: ")))
(expr
(if edit
(read-string prompt expr)
(or expr
(minibuffer-with-setup-hook
(lambda ()
(setq-local completion-at-point-functions
#'mu4e~search-query-competion-at-point)
(use-local-map mu4e-minibuffer-search-query-map))
(read-string prompt nil 'mu4e~headers-search-hist))))))
(if (or (null expr) edit)
(mu4e-read-query prompt expr)
expr)))
(mu4e-mark-handle-when-leaving)
(mu4e~headers-search-execute expr ignore-history)
(setq mu4e~headers-msgid-target msgid