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#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil Date: Fri, 06 Jan 2023 09:01:08 +0000 Message-ID: <371ba1d0be87d64ed419@heytings.org> References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> <226b32f79f7db2be1bbe@heytings.org> <226b32f79f65b964c636@heytings.org> <86sfgp5ihl.fsf@mail.linkov.net> <8dea9f3e0e993e0bd0a9@heytings.org> <83a62ww4bo.fsf@gnu.org> <371ba1d0be9671d4a3a4@heytings.org> <83v8lkujt0.fsf@gnu.org> 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="33317"; mail-complaints-to="usenet@ciao.gmane.io" Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 06 10:02:31 2023 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 1pDicR-0008Rs-Cr for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Jan 2023 10:02:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDic3-0003jt-C6; Fri, 06 Jan 2023 04:02:07 -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 1pDiby-0003i1-Ve for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2023 04:02: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 1pDiby-0003F2-Gn for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2023 04:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDiby-0005uh-2n for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2023 04:02: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: Fri, 06 Jan 2023 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60411 X-GNU-PR-Package: emacs Original-Received: via spool by 60411-submit@debbugs.gnu.org id=B60411.167299567322675 (code B ref 60411); Fri, 06 Jan 2023 09:02:02 +0000 Original-Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 09:01:13 +0000 Original-Received: from localhost ([127.0.0.1]:53786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDibA-0005tf-UQ for submit@debbugs.gnu.org; Fri, 06 Jan 2023 04:01:13 -0500 Original-Received: from heytings.org ([95.142.160.155]:32878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDib8-0005tV-Bn for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 04:01:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672995669; bh=5r+J5oMuHshoxviTHLpei8av1Ioa4E97Tr9BBeUnKeE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=BVCjTOIAHJYLvBiqHD1t1Tk4WGImT+7Xvxx5jzIUIg1U6oi4O+My6HjX2rzTOGDiK O1Oh91QoU4S4n3Quxrzpv6LCNjAOWXcbwKl6wTpjoU+LfaJcydyzNijUYkxn34/J9H or7XfsIwC2xUp4vaLTqA5q8l4PRAazKkcMavKQUgXds+yiIZ+R39RcS+9Z4NQ7rQUu DVmJPuf/abaF5Jdv/cfxwYCzVe6fS6FCsRI89OpYjs8y8jXc/NpzzXAeE3VbklUsG7 1rsU+jWDsAIItfONPy3QQokwb17qjno9dEY5Y7RyV0JQULOlUrZkQVHtpOs0MPak2B aP3uoxk2Noc7w== In-Reply-To: <83v8lkujt0.fsf@gnu.org> 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:252679 Archived-At: >>>> Stefan and Eli, do you agree with that conclusion? >>> >>> I admit that I've lost the line of reasoning here (too much of the >>> previous context is being elided, forcing me to re-read the entire >>> discussion). Which code is proposed for the release branch, and how >>> will Emacs behave with that code in this particular use case? >> >> It's this patch. It adds an invisible empty line at the beginning of >> *Completions* when completions-header-format is not a string (in >> particular, nil) or an empty string. > > What is the significance of these two special values of > completions-header-format? Is it that you want to test whether the > first candidates starts at buffer position 1 in the *Completions* > buffer? Then why not test for that explicitly? > When completions-header-format is nil or an empty string, no completion header "NNN possible completions:\n" is inserted in *Completions*. Because of this, minibuffer-next-completion (bound to M- by default), which is supposed to select the first completion when it is called for the first time, erroneously selects the second completion. The fact that "something" (the completion header and/or the help text "Click on a completion to select it...") must exist in *Completions* before the first completion candidate is more or less hardcoded in the logic of minibuffer-next-completion.