How to code auto-complete to immediately trigger when there is only one unique option?
(or, when there are several options, but they all have the same base)
(eval-exp_[point-is-here]_)
Autocomplete offers:
(eval-expression
(eval-expression-print-format)
Now when it hits a unique option, wouldn’t it be great if it would just immediately complete to (eval-expression, and then if we would type "-" that it would immediately choose print-format?
Even if there would be then 2 options, you can see in the following example that you would only need "-p" to complete:
(eval-expression-print-format)
(eval-expression-something-else)
Is this behavior possible in Emacs?
It realizes required behavior:
For deactivate:
EDIT:
I experimented with workflow and found one way to cancel miswritings. As an example you prints
lamand it is expanded aslambdabut you adds extrabdaccidentally and getslambdabd. So I setupand use it:
lambdabdbecomeslambdaand you can continue as usual.EDIT2:
There was one downside of the solution: “it slows down a bit when it does the fuzzy”. It is fixed by narrowing
ac-candidatestoeab-last-selected-candidateforac-fuzzy-complete. Now it’s fast!