From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings 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 18:37:54 +0000 Message-ID: <86ce0848031a81ca4ddb@heytings.org> References: <87sfh0ydpf.fsf@posteo.net> <314db4a90e78b4a7714d@heytings.org> <86bknmdqzm.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34722"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60359@debbugs.gnu.org, Philip Kaludercic To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 29 20:04:13 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 1pAyCJ-0008p5-G7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Dec 2022 20:04:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAxn3-0006lg-Ta; Thu, 29 Dec 2022 13:38:05 -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 1pAxn2-0006iy-9O for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:38:04 -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 1pAxn0-0003sa-M6 for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:38:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAxn0-00080r-40 for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Dec 2022 18:38: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.167233907830790 (code B ref 60359); Thu, 29 Dec 2022 18:38:02 +0000 Original-Received: (at 60359) by debbugs.gnu.org; 29 Dec 2022 18:37:58 +0000 Original-Received: from localhost ([127.0.0.1]:32848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAxmw-00080X-Dy for submit@debbugs.gnu.org; Thu, 29 Dec 2022 13:37:58 -0500 Original-Received: from heytings.org ([95.142.160.155]:50456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAxmu-00080P-IQ for 60359@debbugs.gnu.org; Thu, 29 Dec 2022 13:37:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672339075; bh=rfuvU9fE2BcfFBYQqHs88wsH4CFF4x3kQtZnVFkzP3M=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=TyG5DzgPybKGn9jspw+T31YZ3tPQA54vxdG6yHMb/oDYAcoO0aQwAYeE+N9YgRiMg rgrPbICDy9FxJU7trbKsLPttm0tOWOozAevjCObNW1Ln7gs4zIlsFJ3JHwEsZ706ya Nks0gfNSKthJDPf/glhLCKloh6xrEI5Ite+McUqaHYvRTQ41SDn+DI4BCNdxKQz3PI 3lYybY2JIMq8cwVHgcltPHQmclUDCgvN+jjE9JsJ0vg9+8yCvb1iWUtL5EOTEsa9Vh Sh0Bv7yPtTaFu8l/g0MIBYGpYOlFpvGfDYaPDvGNJq2HTQ55qxLMDJJT9odf7JA0pj 3uCqEntBiT2dQ== In-Reply-To: <86bknmdqzm.fsf@mail.linkov.net> 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:252053 Archived-At: >> Thanks for your bug report. If I set completion-auto-select in emacs >> -Q, C-x C-f C TAB (or TAB TAB, depending on the value of >> completion-auto-select) in the Emacs repository behaves as expected. >> However, C-x C-f src/ TAB does not. Is the latter case what you have >> in mind, or do I misunderstand what you mean? If not, the attached >> patch should fix that bug. > > 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))))))))