bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47711: bug#48841: bug#47711: bug#48841: bug#47711: [PATCH VERSION 2]


From: Dmitry Gutov
Subject: bug#47711: bug#48841: bug#47711: bug#48841: bug#47711: [PATCH VERSION 2] Add new `completion-filter-completions` API and deferred highlighting
Date: Fri, 27 Oct 2023 18:41:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]