From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: new-flex-completion-style Date: Thu, 14 Feb 2019 23:50:22 -0500 Message-ID: References: <20190202232827.27331.87300@vcs0.savannah.gnu.org> <871s4czm5n.fsf@gmail.com> <1f4513ab-cd39-4543-9b1a-743e1307dd54@default> <23b6cda2-0f37-4c41-b664-5353505c0cd1@default> <35dac269-3666-45cb-b6ea-09cf5864841a@default> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="46591"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 05:51:34 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 1guVTI-000Bxu-R8 for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 05:51:32 +0100 Original-Received: from localhost ([127.0.0.1]:60143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guVTH-0002au-T9 for ged-emacs-devel@m.gmane.org; Thu, 14 Feb 2019 23:51:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guVSb-0002ab-TL for emacs-devel@gnu.org; Thu, 14 Feb 2019 23:50:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guVSR-0000Sf-0d for emacs-devel@gnu.org; Thu, 14 Feb 2019 23:50:44 -0500 Original-Received: from [195.159.176.226] (port=58276 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guVSQ-00007t-5B for emacs-devel@gnu.org; Thu, 14 Feb 2019 23:50:38 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1guVSI-000Amh-TA for emacs-devel@gnu.org; Fri, 15 Feb 2019 05:50:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:XiRZbmNjz5KC8tMBzRPc5DrJ6Vk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:233351 Archived-At: >> I guess one could consider `flx` scoring as just another kind of >> sorting, but I'm pretty sure that it can give odd results when used >> with (say) regexp-style completion. > Depends on the regexp. But sure, you wouldn't > want to sort based on scoring that privileges > substring match length for input that is a wild > regexp. My point is that flx scoring is usually based on the idea that the candidate does match using flx matching, whereas that might not be the case is the matching was done some other way. So the scoring result can be completely meaningless (or it could even signal an error). IOW matching and scoring can be intimately linked because the scoring is based on *how* the candidate matched the input. Stefan