You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently ivy does not handle calls to completing-read-multiple. On those calls Emacs default completion system is used and ivy is utilized only when the user presses the TAB key. But the user has to remember that completing-read-multiple uses , (comma) to separate multiple choices.
How about utilizing ivy (or maybe that belongs into counsel?) on calls to completing-read-multiple right from the start and using ivy-mark feature to let the user choose multiple candidates?
There is no variable to configure invocations of completing-read-multiple in Emacs, like it is done with completing-read and completing-read-function. So an advice is needed. to wrap calls.
A working setup could look like that:
(defun ivy-completing-read-multiple-wrapper (fun prompt table &optional predicate require-match initial-input history def inherit-input-method)
"a simple wrapper for advicing `completing-read-multiple'."
(let (choices
(new-prompt (concat "[multiple] " prompt))) ; just a hint for the user
(ivy-read new-prompt table
:predicate predicate
:require-match require-match
:initial-input initial-input
:history history
:def def
:action (lambda (x)
(if (consp x)
(push (car x) choices)
(push x choices))))
choices))
(advice-add 'completing-read-multiple :around #'ivy-completing-read-multiple-wrapper)
Test above functionality with (and compare it with unadviced completing-read-multiple):
Currently ivy does not handle calls to
completing-read-multiple
. On those calls Emacs default completion system is used andivy
is utilized only when the user presses theTAB
key. But the user has to remember thatcompleting-read-multiple
uses,
(comma) to separate multiple choices.How about utilizing ivy (or maybe that belongs into counsel?) on calls to
completing-read-multiple
right from the start and usingivy-mark
feature to let the user choose multiple candidates?There is no variable to configure invocations of
completing-read-multiple
in Emacs, like it is done withcompleting-read
andcompleting-read-function
. So an advice is needed. to wrap calls.A working setup could look like that:
Test above functionality with (and compare it with unadviced
completing-read-multiple
):Is there interest in an PR?
The text was updated successfully, but these errors were encountered: