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: Sat, 07 Jan 2023 22:35:33 +0000 Message-ID: <6538f58eb5b248571e28@heytings.org> References: <87zgb5lx6y.fsf@oracle.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> <371ba1d0becbcd718fdb@heytings.org> <83mt6vvmxv.fsf@gnu.org> <371ba1d0be78fd6c921f@heytings.org> <83h6x3vlo7.fsf@gnu.org> <371ba1d0be0c526521cb@heytings.org> <86cz7qi5ez.fsf@mail.linkov.net> <867cxyi53t.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZREqCXpxcT" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38913"; mail-complaints-to="usenet@ciao.gmane.io" Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, monnier@iro.umontreal.ca To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 07 23:36:13 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 1pEHnR-0009sG-A1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Jan 2023 23:36:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEHnI-0006O0-9h; Sat, 07 Jan 2023 17:36:04 -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 1pEHnG-0006Nr-K2 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 17:36:02 -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 1pEHnG-0004wI-C4 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 17:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pEHnF-00043s-Ui for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 17:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2023 22:36: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.167313093715575 (code B ref 60411); Sat, 07 Jan 2023 22:36:01 +0000 Original-Received: (at 60411) by debbugs.gnu.org; 7 Jan 2023 22:35:37 +0000 Original-Received: from localhost ([127.0.0.1]:59122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEHmq-000439-Uh for submit@debbugs.gnu.org; Sat, 07 Jan 2023 17:35:37 -0500 Original-Received: from heytings.org ([95.142.160.155]:35360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEHmp-000431-CT for 60411@debbugs.gnu.org; Sat, 07 Jan 2023 17:35:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673130934; bh=qrJztI06Mc04KXXv7CaJxYcT1893fP1hFjtOQN6EFB0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=zf+3+QOqnQdn7si673cj87sdt2hP5MH0U64yGV2amWELFNMxMGJxLcGSq81SPpfIq tDmafI5A06ltUout54djJerxhhFf1KdS017Ph7aUxRBV2TdDjLA49tyxnuXx4fhN/X Gb0acwGVFybEhhXRyM3j6sRjVk4KiOT03y903g8VpmSE8CX3FbeVOTjGdiY7uCStaK jB6cvuMxaSarCufjkxMuTao/KTvp6yIaYy7kp/lYW/ZqX28BUEaWOB9eih0fmT9GrU bAqF9IvwvRUsDiPCoMDV4O161outXYkTm/mMh6zZO+FaEXI0HurDx11Wrg15aibK9v JJMFjCpllgpvQ== In-Reply-To: <867cxyi53t.fsf@mail.linkov.net> Content-ID: <6538f58eb50e41ef6983@heytings.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:252830 Archived-At: --ZREqCXpxcT Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-ID: <6538f58eb51982c48073@heytings.org> >> Please remove (=3D n 1) and replace (setq n 0) with (setq n (1- n)) to= =20 >> support the prefix arg with =E2=80=98M-N M-n=E2=80=99. > > When n > 0. > You mean this, right? diff --git a/lisp/simple.el b/lisp/simple.el index 63479e9ce0..0221881641 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -9698,6 +9698,14 @@ next-completion (let ((tabcommand (member (this-command-keys) '("\t" [backtab]))) pos) (catch 'bound + (when (and (bobp) + (> n 0) + (get-text-property (point) 'mouse-face) + (not (get-text-property (point) 'first-completion))) + (let ((inhibit-read-only t)) + (add-text-properties (point) (1+ (point)) '(first-completion t))= ) + (setq n (1- n))) + (while (> n 0) (setq pos (point)) ;; If in a completion, move to the end of it. It took me a few minutes to understand what you meant by "support the=20 prefix arg" in this case. And indeed with the previous version of the=20 patch, M-x M-2 M- selects the third completion candidate (2C-split),= =20 whereas with this patch the second one (2C-command) is selected. --ZREqCXpxcT--