The problem is probably more evident when using Vertico, but I suspect the behavior is present in completing-read-multiple itself.

If I've got the following form:

 "Choose your pain! "
 (seq-map (lambda (n) (format "Option %d" n))
          (number-sequence 1 3)))

I can use completion to enter Option 1. When I add a comma to start another completion (Option 1,), I can select Option 1 again.

I'm not sure what use-case there is for such behavior, but assuming there is, how can I make it such that the available completion table 'shrinks' as elements are selected?

Reading the definition of completing-read-multiple, I feel like both PREDICATE and crm--collection-fn could be relevant, but I'm not really following the implementation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.