GNU bug report logs -
#47711
27.1; Deferred highlighting support in `completion-all-completions', `vertico--all-completions`
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sun, 11 Apr 2021 20:52:01 UTC
Severity: normal
Found in version 27.1
Done: Daniel Mendler <mail <at> daniel-mendler.de>
Bug is archived. No further changes may be made.
Full log
Message #341 received at 47711 <at> debbugs.gnu.org (full text, mbox):
On 31/10/2023 12:55, João Távora wrote:
>> Which keys are those? I only know about one key - 'completion-score'.
>
> Yes, that's the one. I suppose adding this key to the property lists of
> large number of strings, which is only done once, is what's causing
> the anomaly.
Ah, I didn't realize that the text property/value pairs were stored as
plists internally as well. And that also triggers consing.
>>>> But if course it would be nice to avoid the wart, so if you have any
>>>> better ideas, they are welcome.
>>>
>>> I'm not saying it would necessarily spread even further, but if you want
>>> to do scoring "just in time" like I suggested -- presumably to
>>> completely avoid propertizing strings -- that particular wart spreads a
>>> little more and thus becomes something that is slightly harder to remove
>>> later on.
>>
>> Could you describe the other places you think it might spread to? Other
>> completion styles like Orderless?
>
> Maybe, I don't know. But here I just meant that to do that idea it spreads
> only one further degree. I'm not saying it would necessarily spread even
> further.
It seems like the only code that would be concerned with it are
completion styles that also do sorting, or completion tables that would
do similar things to this "with quoting" business. But I'm not aware of
any other examples of the latter aside from what is inside Emacs itself.
>> Anyway, have you looked into what it would take to solve it?
>
> No, naively, I just think it's a similar situation of display and business
> logic being mixed up. Presumably the quoted stuff is just for insertion
> (and display?), and the unquoted stuff is what patterns/scoring should
> operate on.
Apparently it's good for insertion, but according to that comment inside
the function, the unquoted stuff might actually be better for display.
I'm not 100% clear which of the versions is better for
scoring/highlighting, but apparently the unquoted one.
> But, IMO, there's no need to tackle it right now.
>
> If the thing holding you back from the lazy-hilit-2023-v4.patch is the
> completion-score propertization, I can move it to the sorting step
> in a future v5 and add spread the completion--unquoted thing a little
> bit more.
I think that's the main blocker, yes.
This bug report was last modified 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.