Subject: bug#22407: Better support external completion tools

From: Dmitry Gutov <[email-masked]>
Date: Wed, 20 Jan 2016 12:49:06 +0300

On 01/20/2016 05:31 AM, Stefan Monnier wrote:

> I was thinking of applying (within Emacs) the regexp/predicate to a list
> of candidate returned by the external tool.  Not passing it directly to
> the external tool

That would make it harder to use external tools that operate on large 
datasets. And since essentially, with this approach we're not delegating 
filtering to the external tool, it seems like it should work with the 
current completion-styles mechanism. No need to allow overriding 
completion-all-completions.

>> As an aside, I wonder if the current completion styles, at least, could each
>> be automatically implemented on top of the input-to-regexp functions,
>> without loss in efficiency.
>
> "input-to-regexp"?  Sorry, doesn't ring a bell.

"a function which takes a user-input string and return a regexp".

Could we use that not just as "description", but as definition for 
existing styles. And maybe keep the current mechanism for the trickier ones.