From 9729e2bba88878d4adae7890b0c2e9e04f2cb8aa Mon Sep 17 00:00:00 2001 From: stardiviner Date: Fri, 26 May 2023 09:59:12 +0800 Subject: [PATCH] Fix asking maildir reading completing candidate is text-property Some packages like `vertico-prescient` adding text-property to vertico candidates will break `mu4e-ask-maildir` response. --- mu4e/mu4e-folders.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mu4e/mu4e-folders.el b/mu4e/mu4e-folders.el index e38a04e3..13470ab2 100644 --- a/mu4e/mu4e-folders.el +++ b/mu4e/mu4e-folders.el @@ -307,12 +307,13 @@ from all maildirs under `mu4e-maildir'." (mu4e-read-option prompt (append options '(("oOther..." . other))))))) - (if (eq response 'other) - (progn - (funcall mu4e-completing-read-function prompt - (mu4e-get-maildirs) nil nil - mu4e-maildir-initial-input)) - response))) + (substring-no-properties + (if (eq response 'other) + (progn + (funcall mu4e-completing-read-function prompt + (mu4e-get-maildirs) nil nil + mu4e-maildir-initial-input)) + response)))) (defun mu4e-ask-maildir-check-exists (prompt) "Like `mu4e-ask-maildir', PROMPT for existence of the maildir.