From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: scratch/backend-completion 9a62da21c2 1/2: Integrate Stefan suggestions but rename it to "external-completion.el" Date: Sun, 4 Dec 2022 20:04:27 +0000 Message-ID: References: <167007345844.23701.8454474119701440468@vcs2.savannah.gnu.org> <20221203131739.2A601C004BA@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a1456005ef0614c0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 04 21:05:23 2022 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 1p1vEp-000ATG-0T for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Dec 2022 21:05:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1vEC-0006tX-70; Sun, 04 Dec 2022 15:04:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1vEA-0006t6-4Y for emacs-devel@gnu.org; Sun, 04 Dec 2022 15:04:42 -0500 Original-Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1vE8-000108-2r for emacs-devel@gnu.org; Sun, 04 Dec 2022 15:04:41 -0500 Original-Received: by mail-ot1-x333.google.com with SMTP id t19-20020a9d7753000000b0066d77a3d474so6114932otl.10 for ; Sun, 04 Dec 2022 12:04:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9q4tWSWuHxr4PvDk0cWRf8+PfowGtgxke4lVDsEH7oo=; b=lSVt9Fitc/H/XArPN/9EVXIGBAQIQ3H2KegNOgzxfH5ejMwor3fYWPMcmUBY3qrI2V lTLhXOBWH8UXUlrZnA6nspiuBWNyOBd+/ul92skqiybeEWpCpWp2cvekqo99UfrVoR1w 1VCSg4PJyt6r8o56tv7R5pbbM7r1PBfrD4bPaXuqEmB5n0knWHm1AYnV2kawEZS550bk owRuX4ZfnHawVjwoWzWp5cfkyx1zbgvRNMx+FS4qCti28c77qKTYYcSe7STV0KXYX3pM mQypULJNzvDu/QrBlzi2HU7JrI8ed7hLDTh6k64KnfKMlHW9fNz3LtM7MjfYZBC8OmCq NZ0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9q4tWSWuHxr4PvDk0cWRf8+PfowGtgxke4lVDsEH7oo=; b=yZU9D7pKjxuFdRErYSuIs6gwNTdW05xiN+6JMMeX5Dg0obzYRQrUZXn5YoHoDWZLBX YQM9IZyUDxEnFkUJA7ateIup0s6vPxZ2eHKSpSGkNxSvaMnVowuv4NHLShV4paszFqbf E3pW2a901HBgVi/Koy7yFMt3r9zIvVuzcddn09OppZ0rN1iFcewMRD+4bLsz7MjvCKBP G0xKnzqyno6T3asHI6mVgcRsQowCgL0u66Umqv/a6FYhirBeV/A/au1kvDZ5PI0oCFZ0 ZY79HNtJ2GporMG0ctSFzZdJTsbPDA5Yj+VrV6jThQI1mfuPdzlGzULNSuVvq0unfKEY UZKw== X-Gm-Message-State: ANoB5plVl1nMI9zVF4RCSXt8G2aAsG+1X1FmXuNgyOliwJGd5F4o3mg2 QEG5qkFlKei5QBpgBLoro1cqcuqxdq7hvYkIfD0= X-Google-Smtp-Source: AA0mqf7bWVNXpwAZWnBP5jtShxs8xxtBN/z9FgDV5a4M+GL2+V4RT3H00sNn0qYKKm+FklhcPLy2sJRak802htPJnGc= X-Received: by 2002:a9d:61ca:0:b0:66e:6d59:b2df with SMTP id h10-20020a9d61ca000000b0066e6d59b2dfmr10007507otk.201.1670184278507; Sun, 04 Dec 2022 12:04:38 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::333; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300910 Archived-At: --000000000000a1456005ef0614c0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Dec 4, 2022, 16:54 Stefan Monnier wrote: There's one I can think of: SLY, because there external tool's > completion code can be tweaked to fit the needs of Emacs :-) > > For most others it's probably difficult, indeed, which is why > I suggested to make it optional (unless you know how the tool > does its matching in which case you may be able to re-use > `completion-pcm--merge-try` or to implement something similar). > Yup, this rhymes exactly with what I wrote in the docstring in the latest version. I understand how it could be used now. Another question is if I as SLY author would use it. I don't think so, to be honest, seems to much hassle for not a lot of benefit. But others may want to, of course. > Else, I think we end up contacting the external tool one too many times > for > > the same PATTERN. That's at least with the popular completion front-end= s > > such as fido/vertico who probably go for the 'allc' immediately. > > The default UI uses either tryc (when you hit TAB) or allc (when you > ask the see *Completions*) not both. Yes and eventually if you hit TAB twice that's two requests. So we need caching. But that's fine, I've implemented that already. Have a look at the latest commit when you find the time. Jo=C3=A3o --000000000000a1456005ef0614c0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Dec 4, 2022, 16:54 Stefan Monnier <monnier@iro.umontreal.ca> wrote:


Yup, this rh= ymes exactly with what I wrote in the docstring in the latest version.=C2= =A0 I understand how it could be used now. Another question is if I as SLY = author would use it. I don't think so, to be honest, seems to much hass= le for not a lot of benefit. But others may want to, of course.

> Else, I think we end up contacting the external tool one too many time= s for
> the same PATTERN. That's at least with the popular completion fron= t-ends
> such as fido/vertico who probably go for the 'allc' immediatel= y.

The default UI uses either tryc (when you hit TAB) or allc (when you
ask the see *Completions*) not both.

Yes and eventually if you hit TAB twice tha= t's two requests. So we need caching. But that's fine, I've imp= lemented that already. Have a look at the latest commit when you find the t= ime.

Jo=C3=A3o
--000000000000a1456005ef0614c0--