emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master b0e318d 2/2: Score flex-style completions accor


From: João Távora
Subject: Re: [Emacs-diffs] master b0e318d 2/2: Score flex-style completions according to match tightness
Date: Sat, 16 Mar 2019 13:02:53 +0000

On Sat, Mar 16, 2019 at 1:13 AM Dmitry Gutov <address@hidden> wrote:
>
> Hi Joao,
>
> Now that I've been seeing company-capf test failures mentioning
> completion-score for a while (e.g. see
> https://travis-ci.org/company-mode/company-mode/jobs/507061364),

I didn't read the test fully, but it seems you (or I? did I write it?)
are asserting
that there can only be a specific set of properties in the completion candidate.
This is wrong: there can be more unrelated to your package's use of those
candidate's properties, completion-score being one of them.

Though I do think `company.el` should start making use of
`completion-score` somehow.

> Why does a completion-pcm--??? function add the scores?

It adds them in the hope that they would be useful in the near future.
When I added this bit, I thought it would be a matter of days until we
found a suitable place for a sorting function to use those properties.
But it's been two months and a decision hasn't yet been reached.
So  there are currently no users of that functionality, and it
could very well be removed.  I put it in a separate commit so it could just
be "git revert"ed.  But since it is master, I encourage you to not
do it and find a solution that uses the scoring.

Regardless of the decision of where to put sorting function based
on flex scores, completion-pcm--... is a most suitable place to add the
scoring, since this is where the string is propertized (and the scoring
is closely related to that.

So my suggestion would be to fix the test in company not to make
those unreasonable assumptions and invest some effort in reaching
a consensus for where to associate flex's sorting function. (I suggested
earlier in the completion style, but I haven't followed the discussion
in-depth).

-- 
João Távora



reply via email to

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