Skip to content

Completing-read-multiple

The function completing-read-multiple is similar to completing-read but returns a list of completed strings. The strings are separated by crm-separator in the minibuffer. On Emacs 30 and older, completing-read-multiple does not indicate to the user that multiple strings can be completed. I have contributed a patch to Emacs 31, which fixes this issue. See the variable crm-prompt and bug#76028. On older Emacs versions you can use the following advice:

emacs-lisp
;; Prompt indicator for `completing-read-multiple'.
(when (< emacs-major-version 31)
  (advice-add #'completing-read-multiple :filter-args
              (lambda (args)
                (cons (format "[CRM%s] %s"
                              (string-replace "[ \t]*" "" crm-separator)
                              (car args))
                      (cdr args)))))