From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico Date: Mon, 5 Apr 2021 13:55:19 -0700 Message-ID: <24683.31031.582779.986721@retriever.mtv.corp.google.com> References: <9c9af088-580f-9fb1-4d79-237a74ce605c@inventati.org> <874kgkxxs0.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5649"; mail-complaints-to="usenet@ciao.gmane.io" Cc: raman@google.com, manuel.uberti@inventati.org, emacs-devel@gnu.org To: philipk@posteo.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 05 22:56:41 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTWH2-0001Lg-W2 for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Apr 2021 22:56:41 +0200 Original-Received: from localhost ([::1]:53366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTWH2-0001TP-16 for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Apr 2021 16:56:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTWFy-0000gI-HX for emacs-devel@gnu.org; Mon, 05 Apr 2021 16:55:34 -0400 Original-Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:44883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTWFs-0004fS-Cd for emacs-devel@gnu.org; Mon, 05 Apr 2021 16:55:34 -0400 Original-Received: by mail-pf1-x42a.google.com with SMTP id m11so6291630pfc.11 for ; Mon, 05 Apr 2021 13:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:mime-version:content-transfer-encoding:message-id:date:to:cc :subject:in-reply-to:references; bh=sZoYqxLa7KzTYwSkkxASBiVhU/ZAcH4xTxe3k1iR2NY=; b=r6D4Y/G33V/0NEWCJ1j4SouV8PK0qzNRffe0W2tlVXo7C4Fq1bJIsUs9zTaT7iFDud UhYsTaKaq4w55FwgUOVOkFEWNraHW4tCM0KBTAqnOcFhkTGbBX/UFkL21LTyMsXd75C0 PvAY049WNV3q8/VAxUe68dT9R3ypBUjORftip1sfPK7CnmzmSxcMxM7nlPYU5QVgS/IR 2M0kjTmu81S/pkK8C7tvkB14VwMMDIsJEjauvL3fgyXiA7TaOLkrSj0YCQmhYkW/BUSe GOLnNu22MAJjelt0QlbG4H3RgQKwACvl2e0XKMKHIXIGxkTqcunSLRLdBJHZUtsATm0O rtpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:cc:subject:in-reply-to:references; bh=sZoYqxLa7KzTYwSkkxASBiVhU/ZAcH4xTxe3k1iR2NY=; b=pn8FXskROy0brdthlmE1HwmulF8GHPVaZz26wLD3P/gYfgzLR8VoGEWIiz2AhNNl6d lKjUzyzyHuPiDfp32s/f89ykSZ5LMXIe/mdiATQinAPlx0oRMsOnp0ARoCqFqAhEqcY6 4NPgGYVRLJdiHL1RFyOru+raRSlH++nE2NfIIdsjJaQPXL5xGSpPYgWwyJ747IwoMaha yWz3e6NxsCeGXdbzz171TUuhTeOGCCYUoS9BDaQNdeMVgzFa0YnmFwEAyo7grRL58+pr qv0Ae0lyAj44BMP3/6p+3KwpX3vtVarEdBGhGCdeb0WEzk3OAPTK/KHcrGpJHuV3mcwB nrjQ== X-Gm-Message-State: AOAM53087OAMySRnPxPnacgHXYd0P9TB4Ym9oET23BD3y8JJ2fN8ygmt pQxKGRlCE7GmVw3ME8lm40a6HcOqYX5ozg== X-Google-Smtp-Source: ABdhPJySiqKJCOhSZHYVd6/LKVf9S2jyKwdKcMrpkvNw3Ap0MsArdmrR7ewufTk2sjvOqckb/jaxOQ== X-Received: by 2002:aa7:8e0d:0:b029:214:a511:d88b with SMTP id c13-20020aa78e0d0000b0290214a511d88bmr25146316pfr.2.1617656121330; Mon, 05 Apr 2021 13:55:21 -0700 (PDT) Original-Received: from retriever.mtv.corp.google.com ([172.22.80.201]) by smtp.gmail.com with ESMTPSA id y189sm16309843pfy.8.2021.04.05.13.55.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Apr 2021 13:55:20 -0700 (PDT) Original-Received: by retriever.mtv.corp.google.com (Postfix, from userid 13930) id A209918001F3; Mon, 5 Apr 2021 13:55:19 -0700 (PDT) In-Reply-To: <874kgkxxs0.fsf@posteo.net> X-Mailer: VM 8.1.1 under 28.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=raman@google.com; helo=mail-pf1-x42a.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267436 Archived-At: That too:-) As I said, I think of all of this broadly as a collection of experiments, but we also need to harvest some long term results. In addition to all I cited earlier, consider company and auto-complete as added to the list. If you broaden further, then you also have lsp and eglot as two ways of bringing in lsp-servers as a backend, and again those help with completion, so we have a lot of lego blocks, many of which fit pairwise but at this point it's reaching a level of complexity that doesn't likely fit in any one brain, and when that happens, you usually see people creating more lego blocks ... Philip Kaludercic writes: >=20 > I guess I can bring up a point I've been meaning to raise here for a= > while, and have discussed on other forums. >=20 > > 1. Where invoked -- anywhere in emacs vs minibuffer. > > 2. When invoked -- as in find-file and friends vs everywhere > > something prompts in the minibuffer. > > 3. Using what=3F the various backends that populate the avai= lable > > choices. > > 4. How displayed: How the choices are displayed -- horizo= ntal, > > vertical, and perhaps 3-d in the future. > > 5. How completed: tab, vs prefix vs fuzzy completion = vs ... >=20 > I have the feeling all these completion systems are encouraging > confusion around how to use completing-read. That is the 0th point t= hat > is missing here: Are you completing (expanding text) or selecting > (narrowing options). >=20 > Most completion frameworks I have looked at seem to limit themselves= to > the latter. To simplify, they collect all the options of a collectio= n > using all-completions and then narrow it depending on user input. Id= o > and all it's descendents (Ivy, Helm, Selectrum and now vertico) seem= to > be based on that approach. >=20 > Try-completion for partial completion seems to only be used by the > default completion system, which I think is a shame. I noticed this = when > implementing a completion-style based on Peter Norvig's spell > checker[0], that would recognize minor typos such as M-x > evla-buffer. IIRC this kind of behaviour is not strictly correct for= a > completing style, but that is another matter. >=20 > The issue I see here is how packages (in and outside of Emacs) use > completing-read. When package developers that use these newer comple= tion > frameworks test their functions, they might tend to assume that > completing-read means "selecting-read", i.e. the user is presented a= > list of options that they can choose from. A personal example is a > package I created a while back to insert eastern emoticons[1] > (=C2=AF\=5F(=E3=83=84)=5F/=C2=AF, =C2=B4 =E2=96=BD ` )=EF=BE=89, =CE= =A3 =E2=97=95 =E2=97=A1 =E2=97=95, ...), that was convenient to use wit= h > Ivy but since I have stopped using it has become inconvenient, as I > don't have most of the letters on my keyboard to complete such an > emoticon. >=20 > Nevertheless completing-read seems to have satisfied an existing nee= d > for a simple mechanism to implement selection. There are packages in= > Emacs that do this, but they all have to re-implement selection > interfaces, as there is no default way of doing it (that I know > of). Think of recentf's menu or more complex examples such as reftex= 's > TOC, that includes hierarchical structures. >=20 > It might therefore be necessary to actually implement a "selecting-r= ead" > function, that could be used more or less like completing-read, but = that > provides a better default UI not based around completing text but > actually selecting objects/items. >=20 > [0] https://norvig.com/spell-correct.html > [1] https://git.sr.ht/~zge/kaomoji >=20 > --=20 > =09Philip K. > =20 --=20 =E2=99=89Id: kg:/m/0285kf1 =F0=9F=A6=AE=E2=99=89 -- ♉Id: kg:/m/0285kf1 🦮♉