From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60359: 29.0.60; completion-auto-select set to t skips first argument when completing files Date: Thu, 29 Dec 2022 20:48:35 +0200 Organization: LINKOV.NET Message-ID: <864jtedp18.fsf@mail.linkov.net> References: <87sfh0ydpf.fsf@posteo.net> <314db4a90e78b4a7714d@heytings.org> <86bknmdqzm.fsf@mail.linkov.net> <86ce0848031a81ca4ddb@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7727"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 60359@debbugs.gnu.org, Philip Kaludercic To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 29 20:15:21 2022 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 1pAyN7-0001uL-MN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Dec 2022 20:15:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAxyn-0001I3-08; Thu, 29 Dec 2022 13:50:13 -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 1pAxyd-0001Hb-43 for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:50:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAxyc-0007uF-Ns for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAxyc-0002DV-Bu for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Dec 2022 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60359 X-GNU-PR-Package: emacs Original-Received: via spool by 60359-submit@debbugs.gnu.org id=B60359.16723397488455 (code B ref 60359); Thu, 29 Dec 2022 18:50:02 +0000 Original-Received: (at 60359) by debbugs.gnu.org; 29 Dec 2022 18:49:08 +0000 Original-Received: from localhost ([127.0.0.1]:32864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAxxk-0002CJ-I4 for submit@debbugs.gnu.org; Thu, 29 Dec 2022 13:49:08 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:54811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAxxi-0002Bl-FI for 60359@debbugs.gnu.org; Thu, 29 Dec 2022 13:49:07 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 6EDF760002; Thu, 29 Dec 2022 18:48:57 +0000 (UTC) In-Reply-To: <86ce0848031a81ca4ddb@heytings.org> (Gregory Heytings's message of "Thu, 29 Dec 2022 18:37:54 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252054 Archived-At: >> Please omit the message only in case when the completions buffer is >> shown, then the user will see there are more completions. But after >> typing e.g. `M-x man TAB` that otherwise does nothing the user should see >> the message. IOW, in case of `completion-auto-help` please use the same >> condition `(and (eq this-command last-command) completion-auto-help)` as >> used to pop up the completions. > > You mean this, right? > > diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el > index 6e42296e7ba..7a720cf2c0a 100644 > --- a/lisp/minibuffer.el > +++ b/lisp/minibuffer.el > @@ -1474,7 +1474,10 @@ completion--do-completion > (if (and (eq this-command last-command) > completion-auto-help) > (minibuffer-completion-help beg end)) > (completion--done completion 'exact > - (unless expect-exact > + (unless (or expect-exact > + (and completion-auto-select > + (eq this-command last-command) > + completion-auto-help)) > "Complete, but not unique")))) > > (minibuffer--bitset completed t exact)))))))) Yep, this looks like the right thing to do.