unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel <emacs-devel@gnu.org>
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	[thread overview]
Message-ID: <CALDnm53-7bkf0+c_pf1JNzkiRpfyuowONXXChTEfuzW_Ln7aXA@mail.gmail.com> (raw)
In-Reply-To: <0ba3ca47-c7d6-a608-536e-94784ba3384b@yandex.ru>

On Sat, Mar 16, 2019 at 1:13 AM Dmitry Gutov <dgutov@yandex.ru> 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	other threads:[~2019-03-16 13:02 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190213212413.868.40960@vcs0.savannah.gnu.org>
     [not found] ` <20190213212414.D6F4C209C6@vcs0.savannah.gnu.org>
2019-02-14 12:38   ` master e4896fc 1/2: Add a new 'flex' completion style Robert Pluim
2019-02-14 13:50     ` João Távora
2019-02-14 14:37       ` Eli Zaretskii
2019-02-14 14:40         ` João Távora
2019-02-14 14:47       ` Robert Pluim
2019-02-14 14:50         ` João Távora
2019-02-14 15:12           ` Robert Pluim
2019-02-14 15:22           ` Drew Adams
2019-02-14 14:29     ` Eli Zaretskii
2019-02-14 14:39       ` João Távora
     [not found] ` <20190213212415.148B9209D7@vcs0.savannah.gnu.org>
2019-03-16  1:13   ` [Emacs-diffs] master b0e318d 2/2: Score flex-style completions according to match tightness Dmitry Gutov
2019-03-16 13:02     ` João Távora [this message]
2019-03-16 13:19       ` Stefan Monnier
2019-03-16 14:25         ` João Távora
2019-03-17 18:06         ` Dmitry Gutov
2019-03-17 19:22           ` João Távora
2019-03-17 20:32             ` Dmitry Gutov
2019-03-17 21:46               ` João Távora
2019-03-18 14:26                 ` Dmitry Gutov
2019-03-18 14:42                   ` Dmitry Gutov
2019-03-18 14:49                     ` Stefan Monnier
2019-03-18 14:52                       ` Dmitry Gutov
2019-03-18 16:20                         ` Stefan Monnier
2019-03-18 15:13                       ` Who uses Icomplete-mode? " João Távora
2019-03-18 16:44                         ` Stefan Monnier
2019-03-18 21:08                         ` Who uses Icomplete-mode? Juri Linkov
2019-03-18 14:54                     ` [Emacs-diffs] master b0e318d 2/2: Score flex-style completions according to match tightness João Távora
2019-03-18 14:51                   ` João Távora
2019-03-18 17:18                     ` Dmitry Gutov
2019-03-20  9:59                       ` João Távora
2019-03-20 12:09                         ` Stefan Monnier
2019-03-20 21:00                           ` João Távora
2019-03-20 21:58                             ` Dmitry Gutov
2019-03-20 23:25                               ` João Távora
2019-03-21  1:14                                 ` Stefan Monnier
2019-03-21  1:20                                 ` Dmitry Gutov
2019-03-21  1:08                             ` Stefan Monnier
2019-03-17 17:51       ` Dmitry Gutov
2019-03-17 19:09         ` João Távora
2019-03-17 20:22           ` Dmitry Gutov
2019-03-17 21:27             ` João Távora
2019-03-18  0:38               ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALDnm53-7bkf0+c_pf1JNzkiRpfyuowONXXChTEfuzW_Ln7aXA@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).