I am trying to accept user input for a command line utility in emacs. I have a few words that I can use on this command line (something like a possible make call target list), and I want to be able to autocomplete the words that I know allows the user to enter more than one entry in my dictionary , and also allows the user to write things not in my dictionary. Some library that allows you to complete a word in the minibuffer using a custom dictionary will be exactly that.
I do not require a complete solution, but a few pointers on where to start looking will be highly appreciated. In addition, I would prefer to avoid using intrusive libraries, such as iciclesor ido, if at all possible, I do not want users of this package to be limited in how they configure the rest of their settings.
My best solution so far is to use it completing-readseveral times for each purpose until the user enters an empty string.
Decision
event_jr the answer below did the trick. The last code I used looks like this:
(require 'crm)
(let ((crm-separator " ")
(crm-local-completion-map (copy-keymap crm-local-completion-map)))
(define-key crm-local-completion-map " " 'self-insert-command)
(completing-read-multiple "prompt: " '("foo" "foobar" "baz"))))
source
share