Multiword maildirs are not quoted when autocomplete is used (fixes #2389)

This commit is contained in:
Tassilo Horn 2023-01-15 14:31:46 +01:00
parent e86b2b7d5b
commit e88c869d6e
1 changed files with 7 additions and 1 deletions

View File

@ -389,7 +389,13 @@ status, STATUS."
((looking-back "maildir:\\([a-zA-Z0-9/.]*\\)" nil)
(list (match-beginning 1)
(match-end 1)
(mu4e-get-maildirs)))
(mapcar (lambda (dir)
;; Quote maildirs with whitespace in their name, e.g.,
;; maildir:"Foobar/Junk Mail".
(if (string-match-p "[[:space:]]" dir)
(concat "\"" dir "\"")
dir))
(mu4e-get-maildirs))))
((looking-back "prio:\\(\\w*\\)" nil)
(list (match-beginning 1)
(match-end 1)