Subject: bug#47711: bug#48841: bug#47711: bug#48841: bug#47711: [PATCH VERSION 2] Add new `completion-filter-completions` API and deferred highlighting

From: Dmitry Gutov <[email-masked]>
Date: Fri, 27 Oct 2023 18:41:34 +0300

On 27/10/2023 16:46, Stefan Monnier wrote:
>> BTW, all-completion's docstring also says that a COLLECTION that is
>> a function should itself handle completion-regexp-list,
> The key here is "should": we know how well ELisp coders follow
> such recommendations.

We could, for example, have a period when we warn about returned 
non-matches. string-match-p is not free, but it's not very expensive either.

I think we should fix the discrepancy between the doc and the behavior, 
one way or another. If the function does obey the current phrasing, it 
seems like it's doing extra work if we post-filter anyway, producing 
extra cosing (though the result might still be beneficial if that 
filtering results in a much smaller list on the first try).

But third-party callers of all-completions might also see the doc and 
decide to use completion-regexp-list, with mixed results. That seems 
like a pure downside.