[Top][All Lists]

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

Re: [Emacs-diffs] scratch/new-flex-completion-style 2c75775 2/2: Score,

From: Dmitry Gutov
Subject: Re: [Emacs-diffs] scratch/new-flex-completion-style 2c75775 2/2: Score, sort and annotate flex-style completions according to match tightness
Date: Wed, 6 Feb 2019 21:54:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0

On 06.02.2019 13:09, João Távora wrote:

Perhaps.  But it only does so when the completion style explicitly
wanted it.  And even so, the sort order should be stable, i.e. if the
completion style puts numerically equal values in two completions, they
should retain the backend's order.  And, obviously, it it doesn't put
any values in that property, then the backend's order is also retained.

To put it simply, we already have a way to indicate the completions sorting: provide a particular property, or metadata. I'd prefer not to couple completion style with sorting, because someone somewhere might prefer to go without it (and use some other sorting options, e.g. by frequency of use or mentions in the buffer).

In my experience, at least for the "flex" (also called "scatter", by the
way) completion style, the frontend's sorting takes precedence

Not sure what you mean by frontend here.

It is already customizable: you don't have to use "flex" completion
style.  Let's first try it out and then see if we need _more_

I'd rather we start with the "more simply" alternative I've mentioned. But others are welcome to add their opinions.

Is this for debugging?

At the moment, yes mostly.  But it could not be.  In SLY, I give users
an indication of how the scoring algorithm is working.  See it in


It's kind of neat, but to be honest I don't see how these percentages help a random user.

Even if they do, there's no need to couple this annotation addition to the completion style. Just use a new annotation function that looks up the text properties that the style adds, and adds them on.

reply via email to

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