From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel 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 Message-ID: References: <20190213212413.868.40960@vcs0.savannah.gnu.org> <20190213212415.148B9209D7@vcs0.savannah.gnu.org> <0ba3ca47-c7d6-a608-536e-94784ba3384b@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="23703"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 16 14:14:09 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h598b-00064g-LZ for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 14:14:09 +0100 Original-Received: from localhost ([127.0.0.1]:41908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h598a-0002Yk-GD for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 09:14:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h596R-0001cH-07 for emacs-devel@gnu.org; Sat, 16 Mar 2019 09:11:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h58xx-00077q-NU for emacs-devel@gnu.org; Sat, 16 Mar 2019 09:03:10 -0400 Original-Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]:35875) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h58xx-00073V-Dr for emacs-devel@gnu.org; Sat, 16 Mar 2019 09:03:09 -0400 Original-Received: by mail-qt1-x829.google.com with SMTP id y36so3384363qtb.3 for ; Sat, 16 Mar 2019 06:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=KssF2ZdeHEMfbLexDAjePThyiqHKxftAD9n/0KlIaOw=; b=K3eg5WYIk2wgzKgqT5nXMW5v1OVRa6eI+M57kXVe/9GuBXwPtRbARGG5KvDYf6FL1k Xm81tjmuHMITAvggnN6JThkUZzX8ZkEBRFSQ2ojhTsvI24z84Kup+D+zZh/6R3jqkkDY YD6ryr5CxeEc7NClsH3GJxXZGFjz2whfyM2DJZiPxCtlVVUZ1xjoF7O+W4tdLcwG+I7b pn5YqpDlEa1wQ8HtC/rI+BPH1VhBiAYetYmqHP1ea356SB3Mbu1uRBfpjemJX9AvWY1z 5w9q6kUKf10CscQ71Scp2P9lztulB2aNnkarsPsEKaGKcDsfjk79GF47ZqXCoVHMnku2 6bcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=KssF2ZdeHEMfbLexDAjePThyiqHKxftAD9n/0KlIaOw=; b=ee5Bw+PJV1I0mjmIsfLPOSpTvS8htOMGd36i05GKHhMmvGZhM2pnz1ReNjMohmNWVN CulGtFkV9oT6B5g+kVhhrpLfZe6zcwDL2WFs0gR5UXLQ1jfAoXrlmauJG66xEaLzP5yg 1NaA8ezjssaOx0ppejsbmvEGJpeE86PVg2devXnhyXHrUSzyi1F/CeIdJ9q+XAmLlKcs DQuAuIDeJzShEeWF2cTn0ThC2gs8JBWZGeX8G162q9tlyqAlahg9WCdtAfj31EtHUTEl rgD2XbpWemYDcxN55WACHZzeoAifciWZIAzlWPXpHcPVNz+g6Fa8j4dYDI8hlUBvMThj hzmA== X-Gm-Message-State: APjAAAV+vkwu3QfNFlbgGpCoH5k6RTqGpiBufoZ4QBjwW+Dyj700m65e tRB+G7DTXw3KGRrAM0kR+QeFtLPiS3Hue5eMA5k= X-Google-Smtp-Source: APXvYqx/xbn6DLtJd0UgDr+idOoJCFrZlsXRBwqatS7zhZaj5z9ICJlbdhgbjxSqYJvyXPRxbRrwnH8Jb61VWA+ANbU= X-Received: by 2002:ac8:1aec:: with SMTP id h41mr6521027qtk.345.1552741384776; Sat, 16 Mar 2019 06:03:04 -0700 (PDT) In-Reply-To: <0ba3ca47-c7d6-a608-536e-94784ba3384b@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::829 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234213 Archived-At: On Sat, Mar 16, 2019 at 1:13 AM Dmitry Gutov 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 candi= date. 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). --=20 Jo=C3=A3o T=C3=A1vora