From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: Re: Recommendation for CAPF setup when you don't know completion string in advance Date: Sun, 4 Apr 2021 11:29:51 -0400 Message-ID: <01699AE7-20A4-4E4C-AB06-283907ABE338@gmail.com> References: <4B051055-CC87-419A-A106-C5F2A7674869@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_B43D0F7F-942C-4666-90FF-B4B993B4930B" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7619"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 04 17:30:53 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 1lT4iD-0001uj-Im for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Apr 2021 17:30:53 +0200 Original-Received: from localhost ([::1]:44568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lT4iC-0002go-KY for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Apr 2021 11:30:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lT4hJ-00029z-3V for emacs-devel@gnu.org; Sun, 04 Apr 2021 11:29:57 -0400 Original-Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]:42914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lT4hH-0005PR-Jx for emacs-devel@gnu.org; Sun, 04 Apr 2021 11:29:56 -0400 Original-Received: by mail-qk1-x732.google.com with SMTP id y5so9481335qkl.9 for ; Sun, 04 Apr 2021 08:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=35foS7hYVVV5ZymzTQyB3F1cPswnAT+JeI2BPhxJiDI=; b=ez6h8hNRYwqyPprMoIFGrcw8+6DoaiFpF4pbCzrE1HyqIKHle1Ilw7MJ+NPRIz/Kmx LXJNWvT2W5eXG20ktUJIyLF7MFr6pM9Ljn6lFRsdOWeSHYVPDPu5pqe57YhJSuYDtcFj sZabL/+I0avZluNI4WopWjZ9o1g+YxWwKswXWNzaUnQpASRZGnLudXTounyaU2k+n/K8 g1G55R2cihFG+aOdQmCGfmfe5nPG0wOGTJKSZ0TqwZmyyMLOGNfimzIpoVzS8UEDwu+W n3s+ELTcfkEAggaPFx+sSzeYlpizlhmQ6FjrlMBDFbqZCSf5+b2MP0IgfjUCpyTvm8g5 s2Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=35foS7hYVVV5ZymzTQyB3F1cPswnAT+JeI2BPhxJiDI=; b=KcoGFjgDI4Z6yVUXY6pBj8H57RruFyCE3fWfG24rGSh6u2GqHLZYzpYmTl6vjvCWym cUYNqnBFGDk0vsqE4ewpQ0q56tAIUKNgsG4uG45/DHQG1s3e8vSi6QlmQe+11R/Q++oI etgjbAOnLoQDQIV4CcqoF7CatrV0TOyAwaO1wMJiXU+W4T4JYq0tBwddozNpbQo5+Mvg ZXkMBdGrBOXf0jNpijks2BG3CJZ8Yhg+GUpQn9oNEiWCboouIDnu4sQe93TK1diXxGSr uaSX5DEoZE6woBbOejrRIJlY9lDCxHYyCIVKWTPI8XDn1Of+VriNf+OlxyPbXTf8nUix LEnQ== X-Gm-Message-State: AOAM533TDMjsKO/4HqI4TNHuOPPR5smiy3RCeQLAqQ89W3MJq1IlFnev 0WkfBZjJmxMZmFG61k0/0nY3dj2y9sa9sQ== X-Google-Smtp-Source: ABdhPJz6RZT/6DT4GWO7Y+u/g+MRhgodTVGq2755Jww5By8Myi1uRHQ3b9z3/ynS4tAQYVKUJM6NWg== X-Received: by 2002:ae9:f818:: with SMTP id x24mr20789237qkh.101.1617550193734; Sun, 04 Apr 2021 08:29:53 -0700 (PDT) Original-Received: from [192.168.0.117] (cm-134-228-54-223.buckeyecom.net. [134.228.54.223]) by smtp.gmail.com with ESMTPSA id r7sm10410336qtm.88.2021.04.04.08.29.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Apr 2021 08:29:52 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=jdtsmith@gmail.com; helo=mail-qk1-x732.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.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:267390 Archived-At: --Apple-Mail=_B43D0F7F-942C-4666-90FF-B4B993B4930B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 3, 2021, at 11:20 PM, Stefan Monnier = wrote: >=20 >> I=E2=80=99m confused by why `completion-table-with-cache=E2=80=99 = needs to test: >>=20 >> (string-prefix-p last-arg arg ignore-case) >=20 > This was designef for completion-tables in general (rather than only > those used in a particular kind of situation). Furthermore, even > a single M-TAB completion may easily query the completion table = several > times with different prefix strings (because of `completion-styles`). Thanks, I get it. Since iPython=E2=80=99s suggestions will never change = for the same line of input, perhaps caching them =E2=80=9Conce and = forever=E2=80=9D in a given collection function will be OK. This = presumes of course that none of the possible cases for long term use of = a collection function will operate on distinct lines of input. I need = to work out some issues on iPython=E2=80=99s completer backend; will = revisit once that=E2=80=99s working well. --Apple-Mail=_B43D0F7F-942C-4666-90FF-B4B993B4930B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8


On Apr 3, 2021, at 11:20 PM, = Stefan Monnier <monnier@iro.umontreal.ca> wrote:

I=E2=80=99m confused by why `completion-table-with-cache=E2=80=99= needs to test:

= (string-prefix-p last-arg arg ignore-case)

This was designef for = completion-tables in general (rather than only
those used = in a particular kind of situation).  Furthermore, even
a single M-TAB completion may easily query the completion = table several
times with different prefix strings (because = of `completion-styles`).

Thanks, I get it.  Since iPython=E2=80=99s suggestions = will never change for the same line of input, perhaps caching = them =E2=80=9Conce and forever=E2=80=9D in a given collection = function will be OK.  This presumes of course that none of the = possible cases for long term use of a collection function will operate = on distinct lines of input.  I need to work out some issues on = iPython=E2=80=99s completer backend; will revisit once that=E2=80=99s = working well.

= --Apple-Mail=_B43D0F7F-942C-4666-90FF-B4B993B4930B--