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, 23 May 2021 12:21:33 +0200 Message-ID: <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@daniel-mendler.de> References: 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="26904"; 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 23 12:22:12 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 1lklFM-0006pM-1D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 May 2021 12:22:12 +0200 Original-Received: from localhost ([::1]:50950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lklFL-0007wq-4X for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 May 2021 06:22:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lklFC-0007wc-TB for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57320) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lklFC-0006QR-Lc for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lklFC-0006FR-Hk for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:22: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, 23 May 2021 10:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48572 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org, joaotavora@gmail.com Original-Received: via spool by submit@debbugs.gnu.org id=B.162176530623940 (code B ref -1); Sun, 23 May 2021 10:22:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 May 2021 10:21:46 +0000 Original-Received: from localhost ([127.0.0.1]:40633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lklEt-0006E1-C1 for submit@debbugs.gnu.org; Sun, 23 May 2021 06:21:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lklEq-0006Dr-Vl for submit@debbugs.gnu.org; Sun, 23 May 2021 06:21:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lklEq-0007tc-QA for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:21:40 -0400 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180]:51275 helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lklEo-0006C1-5d for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:21:40 -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=56ytnnNliGY0Xd2q+SXOGPyGf0E5t/TGUYNBv5eDhII=; b=aExBEM1HDCXGxc8ZwwrXy5Jvqh iGW3AEhsv0W6R9SM97Dyh3IrrEASrtjWQ0FDLAjCutAbuNJRuPMpkZSw/RMVmuw/h86TkwN7vWACb Av4xPwq2OGfM+c0FtJEclRH6GZklKmZJ4+rQoSv4E+/LrQachdleOnZxqpdFfRhvZ6Nk=; In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:207080 Archived-At: On 5/23/21 1:20 AM, Stefan Monnier wrote: >> (defun passthrough-all-completions (_str table pred _point) >> "Passthrough completion function. >> See `completion-all-completions' for the arguments STR, TABLE, PRED and >> POINT." >> (let ((completion-regexp-list)) >> (all-completions "" table pred))) > > Clearly, this is not right: passthrough completion should pass the `str` > and `point` info to the completion table. The completion table may opt > to ignore that information, but we shouldn't prevent them from using it. > I expect most passthrough uses will want to use `str`. I see what you mean. In my use case I didn't use an improperly implemented completion table which does not ignore . However the question is then if this "passthrough" style is really needed since if you don't ignore the input, it is mostly equivalent to the emacs21 style. It is at least good to discuss this. I think all use cases of the passthrough table are a bit of an edge case (or broken tables in the strict definition), e.g., my fuzzy finder or eglot. > Furthermore, `all-completions` and `try-completion` on a completion > table is defined as returning only the prefix completion, so the above > code would force `table` to be a "broken" completion table that doesn't > obey the normal completion table API. Well, it forces the table to return all candidates. Overall it seems that the passthrough you have in mind is already covered by the emacs21 style. I had considered something different which effectively disables the full completion infrastructure. Maybe these use cases are too special to be catered for by minibuffer.el? I have to think a bit more about this. Probably I can achieve the same in my fuzzy finder using the emacs21 style. Daniel