From unknown Mon Jun 16 23:48:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#78746 <78746@debbugs.gnu.org> To: bug#78746 <78746@debbugs.gnu.org> Subject: Status: 31.0.50; ido-confirm-unique-completion has no effect Reply-To: bug#78746 <78746@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:48:23 +0000 retitle 78746 31.0.50; ido-confirm-unique-completion has no effect reassign 78746 emacs submitter 78746 Pip Cet severity 78746 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 10 10:58:42 2025 Received: (at submit) by debbugs.gnu.org; 10 Jun 2025 14:58:43 +0000 Received: from localhost ([127.0.0.1]:39108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uP0Qz-0008UE-CL for submit@debbugs.gnu.org; Tue, 10 Jun 2025 10:58:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41184) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uP0Qt-0008S9-PZ for submit@debbugs.gnu.org; Tue, 10 Jun 2025 10:58:37 -0400 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 1uP0Qn-0005uD-HI for bug-gnu-emacs@gnu.org; Tue, 10 Jun 2025 10:58:29 -0400 Received: from mail-24416.protonmail.ch ([109.224.244.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uP0Qk-0000Oj-Nl for bug-gnu-emacs@gnu.org; Tue, 10 Jun 2025 10:58:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1749567503; x=1749826703; bh=q+AcmXokmBxLHh+Hj3QvM6fQLZ2kvggXuAjGQSH3sOk=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=BC4ccAFP5yzGxN+KVCv553dtuNd7wqQEPu8jxuQlyZFjZfpNl9rRJhdRhJ1mjxSQc SfwKxuuAfEpKiS2T/wWqf1b2tU5eLtusK1pX9kqatm73dHOhBGWycff85YCodPUfCt VdBvsP+V3NDYi2tT4xDGgjc7OddbHilfEXrjcdveLqt6lNVCzTqHddZUKB+N/bd4V2 nu4pVNw+7gik35FLxdX6qrCSXrrmo4SnFaVnsLndiFMJO4aE8jG3C6IZxPFlKrtceP +gYL0ZXbl+3UEJli017vBtDMZHuY6xEqPvQDwAVJViWAxKKonqn+3yNfq1cSxe86Fb QLOWTWU8lKb5A== Date: Tue, 10 Jun 2025 14:58:16 +0000 To: bug-gnu-emacs@gnu.org From: Pip Cet Subject: 31.0.50; ido-confirm-unique-completion has no effect Message-ID: <87y0tz1w55.fsf@protonmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: dae5a8ad3ca7eee1b70defbdfb9f5e46dccef56f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=109.224.244.16; envelope-from=pipcet@protonmail.com; helo=mail-24416.protonmail.ch 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This bug was found by searching the Emacs .el files for misleading indentation automatically. This code in ido.el: ((and (=3D 1 (length ido-matches)) =09 (not (and ido-enable-tramp-completion =09=09 (string-equal ido-current-directory "/") =09=09 (string-match ".[@:]\\'" (ido-name (car ido-matches))))) =09=09 (not (ido-local-file-exists-p (ido-name (car ido-matches))))) ;; only one choice, so select it. (if (not ido-confirm-unique-completion) =09 (exit-minibuffer) =09(setq ido-rescan (not ido-enable-prefix)) =09(delete-region (minibuffer-prompt-end) (point)) =09(insert (ido-name (car ido-matches))))) is indented correctly, but the parentheses are wrong. It should be: ((and (=3D 1 (length ido-matches)) =09 (not (and ido-enable-tramp-completion =09=09 (string-equal ido-current-directory "/") =09=09 (string-match ".[@:]\\'" (ido-name (car ido-matches))) =09=09 (not (ido-local-file-exists-p (ido-name (car ido-matches))))))) ;; only one choice, so select it. (if (not ido-confirm-unique-completion) =09 (exit-minibuffer) =09(setq ido-rescan (not ido-enable-prefix)) =09(delete-region (minibuffer-prompt-end) (point)) =09(insert (ido-name (car ido-matches))))) This inverts the last condition and changes its priority: in effect, when completing file names in an ido buffer, ido-complete would never automatically select a single choice (unless that file was deleted unexpectedly), even when customized to do so, as it was by default. For buffers, however, ido-complete would complete the sole remaining buffer name and exit the minibuffer by default, unless a file named like the single matching buffer name existed in the current directory. So our options are: 1. change just the code and make it behave as documented for files as well as buffers 2. change the code and change the defcustom's default to t, retaining current behavior for files but not buffers 3. allow the defcustom to specify only files or buffers, and make it default to applying just to buffers, not files, retaining the current behavior I'd prefer the first option.