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] scratch/new-flex-completion-style 2c75775 2/2: Score, sort and annotate flex-style completions according to match tightness Date: Mon, 11 Mar 2019 08:47:08 +0000 Message-ID: References: <20190202232827.27331.87300@vcs0.savannah.gnu.org> <20190202232828.4AE452159A@vcs0.savannah.gnu.org> <556bfb2e-4720-c86a-c964-f057b50041b6@yandex.ru> <87va1xw7ms.fsf@gmail.com> <212f7cc9-c0c6-bcf8-f200-ea74db261dc3@yandex.ru> <2733dee8-f5a6-396f-228a-84f225d43a1c@yandex.ru> <407232ad-b1ef-7338-5fd2-735da9721562@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a8d0d30583cd9ec4" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="235974"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stefan Monnier , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 11 09:47:28 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 1h3Gal-000zIc-Uf for ged-emacs-devel@m.gmane.org; Mon, 11 Mar 2019 09:47:28 +0100 Original-Received: from localhost ([127.0.0.1]:57472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Gak-0003Mz-W6 for ged-emacs-devel@m.gmane.org; Mon, 11 Mar 2019 04:47:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Gad-0003Mi-12 for emacs-devel@gnu.org; Mon, 11 Mar 2019 04:47:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3Gab-0000Ju-VX for emacs-devel@gnu.org; Mon, 11 Mar 2019 04:47:18 -0400 Original-Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:39524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3Gab-0000JO-Oe for emacs-devel@gnu.org; Mon, 11 Mar 2019 04:47:17 -0400 Original-Received: by mail-qt1-x832.google.com with SMTP id t28so472051qte.6 for ; Mon, 11 Mar 2019 01:47:17 -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; bh=Vv5TGC7D9iGYdSA+nCQykz7dIGirIvCMqxJjhz9LuU4=; b=hqlkTBVYAnjykbko4Oko3o5aOjAHC5aUp7eS6IdnqyjPLDJBj5hKmAD1jGVL/qJnpq G3fBHIcF0jJMggVpStwQ0JH3CLP8ZZ695OS9TTg3wnZOgexjsG5OUizhXyQb3Qzhy0lK dI6PgqlySbsLOf4zNUr6SyLAyBt1JfkmUmAhqpA0oiQF/n1Ydtou64dfWvWwcSuoCE86 mu9c4dnNRWHWVnXBNwCG9jkMeosb9XSzU9A9nFLrxw+6ZLNTLJt0F6GFkus4wyR6pvLi 9XSmueKp5lL9AECGlOxuHfzVJKubQo0LgZ6EGCvRrs4spbZhKIDBZquwi4IfCLCc8iYK OaAg== 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; bh=Vv5TGC7D9iGYdSA+nCQykz7dIGirIvCMqxJjhz9LuU4=; b=C7LrLGI7BatLXl1OFr9djR1CFN2VGFhEJYfaALOBUTfZm+aimjTN+hFt+clHrbUtka Ep8/JaSyels07AJLt7mw4rSN0TIr50mLKr+ZlaliTRjrQqUeKuLM6ps69DRF2ZL46WTb fe9lQWwKLgSQ03W0LWRXdRtIgxyCin09QmyBOxCAUJ2Oidx8xpvd6RI3k3pTPBwGDSaq z5uIp6iVZOXq92gfVWAYrL/2hq4jPQyV9YjwNVM01IwPBcb9e2XEtxSqzYawGCTx27i1 kT6xg8jsm3BX9Jl6bRMC1LEaZd1t/BtlgzYm4a2M8fRNfGoLAueSf4VQ6EAOIeNmCmZ9 isJA== X-Gm-Message-State: APjAAAWjINPG/ZNSxV5G7IkVQGhlmBZxCkq/APnIsxna+FuPIu8Vg9rO MqfCB0h4g99WOTYlJ5pIz0mDNhsG4OlnSTv5q4mFBQ== X-Google-Smtp-Source: APXvYqw9wpc4Tl4ndakTqqsL/8wWs8NWGWEzAutemGt5laXXx7HKxr3rlC3dAjG0/bLQxvHzEFmXoqT3EmF6lhRXlpw= X-Received: by 2002:a0c:c689:: with SMTP id d9mr5496366qvj.20.1552294036949; Mon, 11 Mar 2019 01:47:16 -0700 (PDT) In-Reply-To: <407232ad-b1ef-7338-5fd2-735da9721562@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::832 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:234057 Archived-At: --000000000000a8d0d30583cd9ec4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2019, 00:18 Dmitry Gutov wrote: > On 27.02.2019 19:12, Stefan Monnier wrote: > > > I see. I was taking the point of view of a generic `flex` method for > > use anywhere you like (I think the original motivation was to use it in > > conjunction with `icomplete-mode` to more closely match to `ido` > > behavior). > > That's a worthy goal as well, of course. Not sure it will be ideal for > e.g. eglot's completion table, but that's a separate discussion, I guess. > I've been very busy and just caught up with this discussion. I can't contribute much more right now other than confirming Stefan's intuition for the original motivation. I wanted, and want, icomplete to be as usable as ido.el (with the added advantage of being well behaved). But I also want eglot.el and elisp's completion-at-point to be able to flex-match like, i.e. Sly does. So basically I want to be able to flex match everywhere. Regarding sorting, after using it in icomplete, C-x b, C-x f, M-x for a while now, I can say this: There seems to be no case where I wouldn't like flex's scoring to be the dominant, but I haven't turned it on right now (mostly because there's no easy way yet due to this analysis-paralysis), and the table's scoring for those three seems sufficient in a reasonable number of the situations. When completing larger sets, such as company-completing all elisp symbols for writing code, flex scoring becomes indispensable, because the secondary sorting there is lexicographic. Not sure what you can make of this, but if you can, make something :), and thanks very much for working on this. Jo=C3=A3o --000000000000a8d0d30583cd9ec4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Mar 11, 2019, 00:18 Dmitry Gutov <dgutov@yandex.ru> wrote:
On 27.02.2019 19:12, Stefan Monnier wrote:

> I see.=C2=A0 I was taking the point of view of a generic `flex` method= for
> use anywhere you like (I think the original motivation was to use it i= n
> conjunction with `icomplete-mode` to more closely match to `ido`
> behavior).

That's a worthy goal as well, of course. Not sure it will be ideal for =
e.g. eglot's completion table, but that's a separate discussion, I = guess.

I've been very busy and just caught up with this discussion. I ca= n't contribute much more right now other than confirming Stefan's i= ntuition for the original motivation. I wanted, and want, icomplete to be a= s usable as ido.el (with the added advantage of being well behaved). But I = also want eglot.el and elisp's completion-at-point to be able to flex-m= atch like, i.e. Sly does. So basically I want to be able to flex match ever= ywhere.

Regarding sortin= g, after using it=C2=A0 in icomplete, C-x b, C-x f, M-x for a while now, I = can say this: There seems to be no case where I wouldn't like flex'= s scoring to be the dominant, but I haven't turned it on right now (mos= tly because there's no easy way yet due to this analysis-paralysis), an= d the table's scoring for those three seems sufficient in a reasonable = number of the situations. When completing larger sets, such as company-comp= leting all elisp symbols for writing code, flex scoring becomes indispensab= le, because the secondary sorting there is lexicographic.

Not sure what you can make of this, but i= f you can, make something :), and thanks very much for working on this.

Jo=C3=A3o


--000000000000a8d0d30583cd9ec4--