From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el Date: Sun, 30 May 2021 05:23:05 +0200 Message-ID: <2b242520-323b-366d-39b5-cb759f346cfb@daniel-mendler.de> References: <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7221"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48572@debbugs.gnu.org, joaotavora@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 30 05:24:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lnC3j-0001fi-C4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 May 2021 05:24:15 +0200 Original-Received: from localhost ([::1]:47852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnC3h-0006Wx-Ft for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 May 2021 23:24:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnC3W-0006WY-Fy for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 23:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnC3W-0004oY-8h for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 23:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnC3W-0006J4-46 for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 23:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 May 2021 03:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48572 X-GNU-PR-Package: emacs Original-Received: via spool by 48572-submit@debbugs.gnu.org id=B48572.162234499824192 (code B ref 48572); Sun, 30 May 2021 03:24:02 +0000 Original-Received: (at 48572) by debbugs.gnu.org; 30 May 2021 03:23:18 +0000 Original-Received: from localhost ([127.0.0.1]:58030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnC2n-0006I8-S2 for submit@debbugs.gnu.org; Sat, 29 May 2021 23:23:18 -0400 Original-Received: from server.qxqx.de ([178.63.65.180]:53845 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnC2k-0006Ht-Fq for 48572@debbugs.gnu.org; Sat, 29 May 2021 23:23:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FFh+l3sKvhKQqmV5l9Z74VctYWS1YV0hqmEaJu1zwvo=; b=UHgNHRrWBcsp5Eqg6XzBOPsuJ2 0U3DWN6a/4v1YZul6TpsZr7oR6PAALz+JCDdEwsk3IgdSLq1YHEtZnTCbODzEzlAV9YXBhvPn8jev 3kdy5lb6vZEcRAEVyGUIPB8AUZy87rvJNKnkpNIKXfJKmagKV4iSw95GJM3HAyz1a1Ws=; In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207564 Archived-At: On 5/26/21 11:28 PM, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: >>> The "passthrough" (elsewhere called "backend") completion-style is >>> definitely something we need to add, yes. But what it should do is pass >>> all the args from `completion-all/try-completions` to the table and let >>> the table do *all* the work, i.e. let the completion table implement the >>> completion-style methods. But we shouldn't call `all-completions` or >>> `try-completions` for that. Instead we should call the completion-table >>> directly, as is done for the `completion-boundaries` method. >> But `all-completions` and `try-completion` already calls the table >> directly if the table is indeed a table. > > Yes, they do, but if you call them, then *you* don't: they call the table in > their own way for their own purpose (e.g. for `all-completions` they > call it to get all the completions matching a given prefix and that's > it, whereas the whole point of `passthrough` is to be able to fetch > matches based on other criteria (defined by the completion table)). Sorry, I don't get it. What is the difference in calling the backend between the two cases: (1) passthrough-all-completions -> all-completions -> backend versus (2) passthrough-all-completions -> backend? In case (2) you call the backend directly but then you also have to handle completion tables which are not functions and you end up reimplementing parts of `all-completions` in elisp. `all-completions` convers non-function completion tables to lists. >> Basically `all-completions/try-completion` themselves are already >> "passthrough" modulo some calling convention. >> Am I missing something? > > Passthrough is about passing the completion-style API directly to > the backend. `all-completions` is part of the backend API, not the > completion-style API. Yes, I am aware that `all-completions` is the backend API. Is anything lost when going through `all-completions`? From what I've seen the arguments are passed on directly to the backend table. Daniel