Strip properties from mu4e-completing-read-function results.

Some completion engines (like "flx") decorate the strings that they
return.  If MU4E passes such a string down to MU, the "format" call
preserves the text properties in the generated S-expression, producing
an invalid query.  MU4E itself has no interest in those decorations,
so strip them out as early as possible from all prompts that use
mu4e-completing-read-function.
This commit is contained in:
Derek Upham
2020-05-18 08:01:52 -07:00
parent a998c20d48
commit bb865fd1af
2 changed files with 8 additions and 5 deletions

View File

@ -198,8 +198,9 @@ buffers found, compose a new message and then attach the file."
(if (= (length bufs) 1)
(get-buffer (car bufs))
(let ((prompt (mu4e-format "%s" "Attach to buffer")))
(funcall mu4e-completing-read-function prompt
bufs))))
(substring-no-properties
(funcall mu4e-completing-read-function prompt
bufs)))))
;; setup a new mail composition buffer
(if (y-or-n-p "Compose new mail and attach this file? ")
(progn (mu4e-compose-new)