From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 12:51:41 -0500 Message-ID: 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> <371ba1d0be87d64ed419@heytings.org> <83tu13vqlb.fsf@gnu.org> <371ba1d0bed233c2fbd3@heytings.org> <83pmbrvonx.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1445"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: kahatlen@gmail.com, Gregory Heytings , 60411@debbugs.gnu.org, 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 18:53:00 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 1pDqtn-00005v-A5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Jan 2023 18:52:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDqsx-0003q8-As; Fri, 06 Jan 2023 12:52: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 1pDqst-0003pT-2Q for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2023 12:52: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 1pDqss-0002Vg-ES for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2023 12:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDqss-0006Sg-18 for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2023 12:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jan 2023 17:52:01 +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.167302751224823 (code B ref 60411); Fri, 06 Jan 2023 17:52:01 +0000 Original-Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 17:51:52 +0000 Original-Received: from localhost ([127.0.0.1]:55771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDqsi-0006SI-Cb for submit@debbugs.gnu.org; Fri, 06 Jan 2023 12:51:52 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDqsg-0006S6-Sg for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 12:51:51 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A3895441D31; Fri, 6 Jan 2023 12:51:44 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F1AD5440F36; Fri, 6 Jan 2023 12:51:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673027503; bh=cOxjmzg6BEjBBczpS/PhBNv1o4gbbgNYYkjkmlBZ67g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=I3rXcRj9uJE/Se+GclaUBmtjQcoao32Yw/cDrG2mwNJWqN0XKP1E1B2mjlMwLfmQ+ Gf4u4tKkzGLZfHbe+h6AyJgN0+jHq4vEVl5ixKfFmBl7q3aAO6GMcEf3j+HP25huTJ u/wBnAApL37uHDs/pfpmTyNdtE+0lD5cyGosXvr8jjNfzDG1r9qKPovrmgUKsYt/hz OomVrWITBgKUgWWETKLPmSoiVoEZUoWyKP0iWWInN/3kSD86FrJPj+QactR/D50tgK 2fFmhHZZAsyYf9adR/Mdh226OoeQva5BZl54r7lsgG4nz0jjCBFv+i+IM7cy8GXj5e EvZJzD+tlxr6Q== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D2BE31204A3; Fri, 6 Jan 2023 12:51:42 -0500 (EST) In-Reply-To: <83pmbrvonx.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Jan 2023 14:21:54 +0200") 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:252735 Archived-At: >> > Then why not change that logic in minibuffer-next-completion to be >> > smarter about this? >> I (and Stefan) already tried this, it doesn't seem to be feasible with a >> small and safe change. > That's very surprising to hear. AFAIU, it just looks for some special > text property (in next-completion). So it sounds like a very simple > breakage of logic, where "next" means "the first one" when you are > exactly at BOB. The problem is how to determine "this is the first time". Currently we encode that information indirectly by the fact that point as at BOB (and is not on an actual completion). We could try and add a boolean buffer-local variable to remember if we've already used `minibuffer-next-completion`. Gregory said he tried and bumped into further problems. It would arguably be cleaner to do that (and fix whichever other problem shows up), but I haven't had the time to look into that. I suspect in the mean time Gregory's hack might be an OK workaround (invisible text tends to come with its own problems, so I'd prefer if we install it conditionally rather than unconditionally, BTW), but it should have a comment with a FIXME. Stefan