Subject: bug#16334: 24.3.50; company-capf eats the first char in IELM filename completions

From: Stefan Monnier <[email-masked]>
Date: Thu, 09 Jan 2014 11:00:10 -0500

>>> On the other hand, the backend is free to try all completion styles it
>> The backends know nothing about completion styles.
> Yes, but is this the best approach? I see you're taking advantage of
> completion-regexp-list' and the fact that `all-completions' is implemented
> in C in `completion-pcm--all-completions', but if one would
> implement a completion function using an external service, in many cases
> this would mean a non-optimal amount of data to have to be transferred.

That's true.  That function could make use of completion-regexp-list,
but maybe it can't support full regexps (and even if it can, it then
requires translating Emacs regexps to the format used by the external
tool).

This is a limitation inherited from the "original" completion
infrastructure.  We could easily introduce a replacement for
completion-regexp-list which specifies a "pattern" (in a format to be
defined).

This said, even if the external service can't just take an Emacs regexp,
the completion function can parse the regexp from completion-regexp-list
and turn it into a different/simpler pattern.

> And a service's implementation of different completion styles could be just
> as fast, if not faster.

Of course, it's only interesting if it's faster, otherwise, why bother?

        Stefan