From unknown Fri Jun 20 07:16:54 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#60411 <60411@debbugs.gnu.org> To: bug#60411 <60411@debbugs.gnu.org> Subject: Status: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil Reply-To: bug#60411 <60411@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:16:54 +0000 retitle 60411 29.0.60; minibuffer-next-completion skips first candidate whe= n completions-header-format and completion-show-help are nil reassign 60411 emacs submitter 60411 Knut Anders Hatlen severity 60411 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 29 16:25:18 2022 Received: (at submit) by debbugs.gnu.org; 29 Dec 2022 21:25:18 +0000 Received: from localhost ([127.0.0.1]:33038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pB0Or-0000Y3-MQ for submit@debbugs.gnu.org; Thu, 29 Dec 2022 16:25:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:33088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pB0Oq-0000Xs-8m for submit@debbugs.gnu.org; Thu, 29 Dec 2022 16:25:16 -0500 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 1pB0Op-0008Fx-Vg for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 16:25:15 -0500 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pB0Oo-0007DI-2m for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 16:25:15 -0500 Received: by mail-lf1-x12c.google.com with SMTP id f34so29148642lfv.10 for ; Thu, 29 Dec 2022 13:25:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=J9NON1zz5zsTydWHarF+yvirPd3LFEmqI0RP0h0zs7c=; b=MgOkS8fbMbJE8hGJ5A3JdjSxyRvo4j5f/RDKwNWPWLHPPCAGDwFMnV4T5EAXb3fHaw GzThrj45aiRKs4BwiGpiCujeGjbNnSGLY8FmvuWNkMu6wYBn/lYRwp6kNaTyGFHePpMo zJ6TCDtgXI4m9zSxBCvOvujsrc7dmOuPgqvqbjkVLZyB+qJUH2hd31rMYIkVP2n1LWAy 5Y5lV7yM4Bx8Zq7rBq+1TvC0KkzFXmRZUUyyz8Zu+0iqdKfIB46X5S9jIjhEpjbpH0fA K3ZelYcLgqllJ2OcGNpM2y3z9bQk2wBY+d1GkB2X0vqUIyL/dtxUw0+sDSuWMfiiDU7k NqVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=J9NON1zz5zsTydWHarF+yvirPd3LFEmqI0RP0h0zs7c=; b=oUozvipDhbWW4DpsnYsz5EYdpz2uUlp6ehNeeNmm9erAlgK7dLJifOXH3/QyBVTv3k DnTTPrberX64qFpHEsIqxMoWeCZ9sIaBvT5bbKZ+objO+5HCBbM/0nMGltrp5oV7HR09 8nqt0TBytpuQa3JdYhHUAAa6GauI59MR1J5eGcHUqwXBcYy/6v4etucFeQpgLSjyevBD GOABVfTc+A2sjK31jFgJfyoViTjXZ29mOqIlyNApMoRuapcDNoA7ssq+OkQOtPY76gZ8 EuSGoM9ULQzKb5XPiHS9ed0/DZ0pMLqyZi+Bi62+BMqcvvG/tRcUO8YF6lEJAjWgFUPc DxQg== X-Gm-Message-State: AFqh2kp7vjHrQRgdTX/wRavrkaBxKeNyWnQHcME2Dnm32A9CR0FU5F2f LqXxW0lI0RtTQZfGAXQW4qfGtgaavA== X-Google-Smtp-Source: AMrXdXug49LyQmhvO5tNilAEAR+ts8yPJ4Xnd98NzKfdZajdMkhKQ4/c5MS//Lbl7ypASNetrLHfbg== X-Received: by 2002:a05:6512:b27:b0:4b6:eaed:f18f with SMTP id w39-20020a0565120b2700b004b6eaedf18fmr9116250lfu.38.1672349111275; Thu, 29 Dec 2022 13:25:11 -0800 (PST) Received: from dell ([2a02:1660:692e:dd00::44c]) by smtp.gmail.com with ESMTPSA id n4-20020ac242c4000000b004b0a1e77cb2sm3212511lfl.137.2022.12.29.13.25.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 13:25:10 -0800 (PST) From: Knut Anders Hatlen To: bug-gnu-emacs@gnu.org Subject: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil Date: Thu, 29 Dec 2022 22:25:09 +0100 Message-ID: <87zgb5lx6y.fsf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=kahatlen@gmail.com; helo=mail-lf1-x12c.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) 1. Evaluate: (setopt completions-header-format nil completion-show-help nil) 2. Type M-x followed by TAB. The *Completions* buffer pops up and shows all available commands. 3. Type M-. Expected result: The first candidate in *Completions* is selected. Actual result: The second candidate in *Completions* is selected. In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.16.0) of 2022-12-29 built on dell Repository revision: 909091d7578b7225601b202fb9257dedae879e9a Repository branch: emacs-29 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --with-json --with-xml2 --with-modules --prefix=/usr/local/stow/emacs --with-pgtk --without-x --with-native-compilation --with-tree-sitter' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $LANG: nn_NO.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: flyspell-mode: t hl-line-mode: t electric-pair-mode: t display-line-numbers-mode: t elide-head-mode: t flymake-mode: t winner-mode: t windmove-mode: t server-mode: t which-function-mode: t savehist-mode: t save-place-mode: t repeat-mode: t recentf-mode: t minibuffer-depth-indicate-mode: t marginalia-mode: t global-so-long-mode: t global-auto-revert-mode: t dynamic-completion-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/kah/.emacs.d/elpa/29/transient-0.3.7/transient hides /usr/local/stow/emacs/share/emacs/29.0.60/lisp/transient Features: (shadow sort ecomplete mail-extr emacsbug nndraft nnmh format-spec nnml utf-7 epa-file network-stream nsm nnfolder nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util mail-prsvr add-log comp comp-cstr flyspell ispell hl-line elec-pair display-line-numbers elide-head time-date checkdoc lisp-mnt flymake-proc flymake project compile text-property-search comint ansi-osc ansi-color warnings thingatpt cus-edit pp rx winner ring windmove disp-table server icons cl-extra help-mode which-func imenu savehist saveplace repeat recentf tree-widget wid-edit mb-depth marginalia magit-autorevert magit-git magit-section magit-utils crm dash so-long autorevert filenotify completion cus-load embark-autoloads boxquote-autoloads slime-autoloads marginalia-autoloads orderless-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 268356 18660) (symbols 48 20764 2) (strings 32 67439 3954) (string-bytes 1 2195945) (vectors 16 37980) (vector-slots 8 699322 30627) (floats 8 291 38) (intervals 56 389 0) (buffers 984 15)) -- Knut Anders From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 03:11:58 2022 Received: (at 60411) by debbugs.gnu.org; 30 Dec 2022 08:11:58 +0000 Received: from localhost ([127.0.0.1]:33486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBAUg-0007wG-BY for submit@debbugs.gnu.org; Fri, 30 Dec 2022 03:11:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBAUd-0007w1-HN for 60411@debbugs.gnu.org; Fri, 30 Dec 2022 03:11:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBAUX-0005ii-St; Fri, 30 Dec 2022 03:11:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=W3r/W/FbkuBIPMdFSwf1ycUzpn+UNOtaDd+gpZojATo=; b=NTjp7K5i3cT9 v6iwM4CHxeu00qhwz58m+DvsNKsbg7O5h4qJI9N2/pZOfNrmYGfVePTK+f4JOYm7CoSgCFVsmt8Ru GmUy2u8D2Oj3qM0Ho0HDi6urLJbkoBTk5G5l2yEENGmWnwm/ZANNlbDBT7ZTN9fRbUMKKJCIDh3fP F0XXgQGQm06uw2CoQRvEX0/WSEuPF2alVMtGmdZUjCXGRFWDEUj3gHTevi/7u+HrtKPg598kAnMzH gdfMi45kRGba3HeDYbJFnFQt6tgTacQpcjH5WuwxF8FQrZKgy0Tj4MoioULlXecJ/+5HhwnKNTOFe xDYEx0rhTBMFXV2NviKXew==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBAUV-0005O7-Bo; Fri, 30 Dec 2022 03:11:48 -0500 Date: Fri, 30 Dec 2022 10:11:44 +0200 Message-Id: <83o7rl71kv.fsf@gnu.org> From: Eli Zaretskii To: Knut Anders Hatlen In-Reply-To: <87zgb5lx6y.fsf@oracle.com> (message from Knut Anders Hatlen on Thu, 29 Dec 2022 22:25:09 +0100) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil References: <87zgb5lx6y.fsf@oracle.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: 60411@debbugs.gnu.org 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: -3.3 (---) > From: Knut Anders Hatlen > Date: Thu, 29 Dec 2022 22:25:09 +0100 > > 1. Evaluate: (setopt completions-header-format nil completion-show-help nil) > > 2. Type M-x followed by TAB. The *Completions* buffer pops up and shows > all available commands. > > 3. Type M-. > > Expected result: The first candidate in *Completions* is selected. > > Actual result: The second candidate in *Completions* is selected. M- runs the command minibuffer-next-completion, so I'm unsure why you expect what you expect. It looks like Emacs behaves as documented here. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 06:04:58 2022 Received: (at 60411) by debbugs.gnu.org; 30 Dec 2022 11:04:58 +0000 Received: from localhost ([127.0.0.1]:33602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBDC6-0003zh-Dn for submit@debbugs.gnu.org; Fri, 30 Dec 2022 06:04:58 -0500 Received: from mail-lf1-f48.google.com ([209.85.167.48]:35767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBDC4-0003zQ-Cv for 60411@debbugs.gnu.org; Fri, 30 Dec 2022 06:04:56 -0500 Received: by mail-lf1-f48.google.com with SMTP id b3so31313260lfv.2 for <60411@debbugs.gnu.org>; Fri, 30 Dec 2022 03:04:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=13qdt8SRLAdvnLmOKF37iB9xDBbtMIvnAHEGxyTyyRo=; b=ARtu9dGMGcDQakG9FJV+pIsQxtzV9SUTg/I8rQToChq1WhCsGVWTRBs7GDoxv4kS8T Hm0dOtrD8OWOyC7Z3bZ+uRrXtT3Mv4Tke79TmervcqT5CGH8F55lA81IStS3cGRTtwrO PhG746C6YRXVz3yFfVYUEEYp5BMsvwJT1ITKg6Bo4RdXs9p9HYidTmH8HJ/HlSUmi1IV wRisx/wlJHAfuFr0nQbDR72PSplZo+nqrg+6yDvYJ+WSHsWSnOVR0YzDBf1oB4gF2ylo GzjNBpnfHArm99Od8fE75RzgUrXTR7Hi3uN8N8Re+pPTZgtVyimlXySjMGTv1rgdO3eB FZFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=13qdt8SRLAdvnLmOKF37iB9xDBbtMIvnAHEGxyTyyRo=; b=3La9yYDfkz0KCu17vgS93gk6c02xRtFiJJdt+FcxQinHoRf6M6ZtnZ6PKLLyKUTheQ Xe/H1pt2kJlwfukgFA1dRcgMHMRsRHYGMnxuTjjxOOpuQ+3zHwf54UN8An8WjK1gFHJn RdtWkusQJaY5qxYObmbe7Ik3LTcpvbc+Z6DugyDsQLCVcdF07iWh3mXIb04fEh2/CUq9 sq20fJYML0wMxi9zq/v+qilwgS9Aa9mpI2sRFS/J6OIGiOX+52/jHDIynZYi7Nw6acKA FmoWss9ExWzsF9WBjzrbNEYMq0ObNjcMsrLu5xZ48JMbeSAv35WSCAMbZDiCGfXCuKFL PnYQ== X-Gm-Message-State: AFqh2komGGBhipcoGpta3EWgCs4RXBufv5NtUP2/Oq/RoVUfM5JEGJKU J8WIdk7iFGfMi7I+04aF8GKZZ1W+2XUr X-Google-Smtp-Source: AMrXdXuhEY3UylDy6Fqf6f/q8VXtrJ+zwSEfp3ZSTowLvlEXDCnbFwHfGFjcWkSUqWJhRiBC6RoZdA== X-Received: by 2002:ac2:4ac3:0:b0:4b5:7e4c:dcea with SMTP id m3-20020ac24ac3000000b004b57e4cdceamr11072193lfp.51.1672398289931; Fri, 30 Dec 2022 03:04:49 -0800 (PST) Received: from dell ([2a02:1660:692e:dd00::44c]) by smtp.gmail.com with ESMTPSA id q3-20020a056512210300b004b5323639d8sm3416453lfr.155.2022.12.30.03.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Dec 2022 03:04:49 -0800 (PST) From: Knut Anders Hatlen To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83o7rl71kv.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Dec 2022 10:11:44 +0200") References: <87zgb5lx6y.fsf@oracle.com> <83o7rl71kv.fsf@gnu.org> Date: Fri, 30 Dec 2022 12:04:48 +0100 Message-ID: <87ilhtduen.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: 60411@debbugs.gnu.org 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: -1.0 (-) Eli Zaretskii writes: >> From: Knut Anders Hatlen >> Date: Thu, 29 Dec 2022 22:25:09 +0100 >> >> 1. Evaluate: (setopt completions-header-format nil completion-show-help nil) >> >> 2. Type M-x followed by TAB. The *Completions* buffer pops up and shows >> all available commands. >> >> 3. Type M-. >> >> Expected result: The first candidate in *Completions* is selected. >> >> Actual result: The second candidate in *Completions* is selected. > > M- runs the command minibuffer-next-completion, so I'm unsure > why you expect what you expect. It looks like Emacs behaves as > documented here. If I don't touch the completions-header-format and completion-show-help options, M- selects the first candidate first, not the second candidate. I find that behaviour reasonable. I didn't expect that setting those two options would have any impact on which candidate minibuffer-next-completion selected first. I expected that it only affected whether or not the header and the help text was printed in the *Completions* buffer, and that the navigation worked as before. To select the first candidate when those two options are nil, I have to do M- followed by M-. My expectation was that it should be fewer (or at least not more) keystrokes to select the first candidate than the second candidate. -- Knut Anders From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 16:54:27 2022 Received: (at 60411) by debbugs.gnu.org; 30 Dec 2022 21:54:27 +0000 Received: from localhost ([127.0.0.1]:36212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBNKc-0004Eb-OI for submit@debbugs.gnu.org; Fri, 30 Dec 2022 16:54:27 -0500 Received: from heytings.org ([95.142.160.155]:52278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBNKZ-0004EQ-IV for 60411@debbugs.gnu.org; Fri, 30 Dec 2022 16:54:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672437262; bh=cWLvIe0iYa939piUgL3THJQo6lGshX95IyTa/XmdWp8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=P3ZN8iNS4hfU+5z8HRHLmEWppu5AofwatVyEi7AU4RKsWcbcnlgFgUt6tKjQOV+z3 s8U6/FUsrCaNi3F2m67YdVpKjfxoYxnqbLeYp/CH+Wp5DdUU7vXOTidz/HYclUCPne B/aV/iinVWJ+Y6qPDVnV+43GCPOqzvcCFVJcGTivC5VPtledZw4FZm/niAraYCcLhZ bcFIoND9IubMyxB51/IugaSKCXD3cZPtx31M8uFnhe8EzAQSFTfwj2RZxVfRmXZ5fU HnNgQwP/aOGUSBmlKiEo5E77SpjI5pWBhttLApqxPFF31RChDlSWOY1ZbOXI8S6KEZ Jer6d5Rff2G8Q== Date: Fri, 30 Dec 2022 21:54:21 +0000 From: Gregory Heytings To: Knut Anders Hatlen Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <87zgb5lx6y.fsf@oracle.com> Message-ID: <6c9d91cffcdbff97f034@heytings.org> References: <87zgb5lx6y.fsf@oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="aP0bTLCMYw" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: 60411@debbugs.gnu.org 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: -1.0 (-) --aP0bTLCMYw Content-Type: text/plain; charset=us-ascii; format=flowed > > 1. Evaluate: (setopt completions-header-format nil completion-show-help > nil) > > 2. Type M-x followed by TAB. The *Completions* buffer pops up and shows > all available commands. > > 3. Type M-. > > Expected result: The first candidate in *Completions* is selected. > > Actual result: The second candidate in *Completions* is selected. > Thanks for your bug report. I attach a patch to fix that bug, can you please try it? It's a workaround, but it's the cleanest fix I can think of. --aP0bTLCMYw Content-Type: text/x-diff; name=Fix-selection-of-completions-with-completions-header.patch Content-Transfer-Encoding: base64 Content-ID: <6c9d91cffcf5fa6fdddc@heytings.org> Content-Disposition: attachment; filename=Fix-selection-of-completions-with-completions-header.patch RnJvbSAxMGQ4NmM4MDI1YjMzODc2NDQwODlmYTM3NzRiMmM5ODgzZmFiZjM2 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBGcmksIDMwIERl YyAyMDIyIDIxOjQ1OjI0ICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIEZpeCBz ZWxlY3Rpb24gb2YgY29tcGxldGlvbnMgd2l0aCBjb21wbGV0aW9ucy1oZWFk ZXItZm9ybWF0DQogbmlsDQoNCiogbGlzcC9taW5pYnVmZmVyLmVsIChkaXNw bGF5LWNvbXBsZXRpb24tbGlzdCk6IEluc2VydCBhbg0KaW52aXNpYmxlIGxp bmUgd2hlbiBjb21wbGV0aW9ucy1oZWFkZXItZm9ybWF0IGlzIG5pbC4NCkZp eGVzIGJ1ZyM2MDQxMS4NCi0tLQ0KIGxpc3AvbWluaWJ1ZmZlci5lbCB8IDgg KysrKysrLS0NCiAxIGZpbGUgY2hhbmdlZCwgNiBpbnNlcnRpb25zKCspLCAy IGRlbGV0aW9ucygtKQ0KDQpkaWZmIC0tZ2l0IGEvbGlzcC9taW5pYnVmZmVy LmVsIGIvbGlzcC9taW5pYnVmZmVyLmVsDQppbmRleCA3YTcyMGNmMmMwLi45 NWI4OTYyNzU5IDEwMDY0NA0KLS0tIGEvbGlzcC9taW5pYnVmZmVyLmVsDQor KysgYi9saXNwL21pbmlidWZmZXIuZWwNCkBAIC0yMjc1LDggKzIyNzUsMTIg QEAgZGlzcGxheS1jb21wbGV0aW9uLWxpc3QNCiANCiAgICAgKHdpdGgtY3Vy cmVudC1idWZmZXIgc3RhbmRhcmQtb3V0cHV0DQogICAgICAgKGdvdG8tY2hh ciAocG9pbnQtbWF4KSkNCi0gICAgICAod2hlbiBjb21wbGV0aW9ucy1oZWFk ZXItZm9ybWF0DQotICAgICAgICAoaW5zZXJ0IChmb3JtYXQgY29tcGxldGlv bnMtaGVhZGVyLWZvcm1hdCAobGVuZ3RoIGNvbXBsZXRpb25zKSkpKQ0KKyAg ICAgIChpZiBjb21wbGV0aW9ucy1oZWFkZXItZm9ybWF0DQorICAgICAgICAg IChpbnNlcnQgKGZvcm1hdCBjb21wbGV0aW9ucy1oZWFkZXItZm9ybWF0IChs ZW5ndGggY29tcGxldGlvbnMpKSkNCisgICAgICAgIDs7IEluc2VydCBhbiBp bnZpc2libGUgbGluZSwgb3RoZXJ3aXNlIHRoZSBmaXJzdCBjYWxsIHRvDQor ICAgICAgICA7OyAnbWluaWJ1ZmZlci1uZXh0LWNvbXBsZXRpb24nIG1pZ2h0 IHNlbGVjdCB0aGUgc2Vjb25kDQorICAgICAgICA7OyBjb21wbGV0aW9uIGNh bmRpZGF0ZS4gIFNlZSBidWcjNjA0MTEuDQorICAgICAgICAoaW5zZXJ0IChw cm9wZXJ0aXplICJcbiIgJ2ludmlzaWJsZSB0KSkpDQogICAgICAgKGNvbXBs ZXRpb24tLWluc2VydC1zdHJpbmdzIGNvbXBsZXRpb25zIGdyb3VwLWZ1bikp KQ0KIA0KICAgKHJ1bi1ob29rcyAnY29tcGxldGlvbi1zZXR1cC1ob29rKQ0K LS0gDQoyLjM5LjANCg0K --aP0bTLCMYw-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 31 01:27:23 2022 Received: (at 60411) by debbugs.gnu.org; 31 Dec 2022 06:27:23 +0000 Received: from localhost ([127.0.0.1]:36388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBVL1-0000jr-B6 for submit@debbugs.gnu.org; Sat, 31 Dec 2022 01:27:23 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:35576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBVKz-0000jc-R6 for 60411@debbugs.gnu.org; Sat, 31 Dec 2022 01:27:22 -0500 Received: by mail-lj1-f175.google.com with SMTP id s25so24045901lji.2 for <60411@debbugs.gnu.org>; Fri, 30 Dec 2022 22:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=QEvyJpHQlL9r88V6y/45UBOQ7qMEezmYQ9syPu14A1E=; b=Rqou4KSMs2alCMjxRSpyqzGNgYSq8ACWzKnFE8G7LKxVhkCS/7fnx1n/SGQYNhUJgg TWJ0zqq2Jq4TlXJEfZfCI6nR5Euz9DIbMthepf5NXAQXUpAcn7fg+4LrkzrftswaNTQA 8uJVwMoTyvMn6OxSVGFz5MGYktqGGnN0uF/K+RtMoZfsX9gCBZRGcUFFHBWaNCKgp3+f hItcfX4f/70OLA2AA3wHUZzEMoB9mMPiIY9/K0ey06GGcki3cmBFGPJg9Utqmc8c5aC+ Ljl1Bo0a+GObRO7JBSAEAe94qNfmOh5idWW9KgEzHCLkcMH1oSzYdEKnAqYB+bwC8qVW kItA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QEvyJpHQlL9r88V6y/45UBOQ7qMEezmYQ9syPu14A1E=; b=j5tsbIvgjnGJnFxemxW0YxufgWXNGEo1LhaI1yQ+DKqUGTHx109A6/0yNwsHPNztFl N47iXcY5uI4B3kuonccKtva+N7R/DV8DkE70213nTQ+DVh+6XKCKSUHykdRuUo06P3xi gYjnOGHXszi5UdKicvjx+vlqygz1w6b87oKqmYKJhO2hX4LqmCDtVtwy+FdQupkTByRS ruLfOVbPSjy3cK/Nm6hKuCONJNlNZ6jGvz7w+RGjojTVbI5SrNgOnisUMr/oEubpY6NJ WK6B0DBqdtVDVjS4sr5vnophxk34w++PSIn1pAwE9o5ouktHtKeUEiLHb+7/7RfeOzW7 /xKg== X-Gm-Message-State: AFqh2kpD7cQku1MsDBDtXO28A79PFojvHX8cvJrmJCjoVicTG7pjXmZj rJtMoQr6Sc6nt7t6d6Nz6FGW/ait+Q== X-Google-Smtp-Source: AMrXdXt0fshkNgb9lE0WLtLAOH7Q6DuqIupLAPEzgFtaGRVPZb/mqiforiOR5Bdx+NehfFsOT8Bfig== X-Received: by 2002:a05:651c:168e:b0:279:2ab:709e with SMTP id bd14-20020a05651c168e00b0027902ab709emr9182610ljb.37.1672468035262; Fri, 30 Dec 2022 22:27:15 -0800 (PST) Received: from dell ([2a02:1660:692e:dd00::44c]) by smtp.gmail.com with ESMTPSA id r11-20020a2e8e2b000000b0027b54ff90c0sm2846304ljk.139.2022.12.30.22.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Dec 2022 22:27:14 -0800 (PST) From: Knut Anders Hatlen To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <6c9d91cffcdbff97f034@heytings.org> (Gregory Heytings's message of "Fri, 30 Dec 2022 21:54:21 +0000") References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> Date: Sat, 31 Dec 2022 07:27:15 +0100 Message-ID: <87lemot7ek.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: 60411@debbugs.gnu.org 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: -1.0 (-) Gregory Heytings writes: >> >> 1. Evaluate: (setopt completions-header-format nil >> completion-show-help nil) >> >> 2. Type M-x followed by TAB. The *Completions* buffer pops up and >> shows all available commands. >> >> 3. Type M-. >> >> Expected result: The first candidate in *Completions* is selected. >> >> Actual result: The second candidate in *Completions* is selected. >> > > Thanks for your bug report. > > I attach a patch to fix that bug, can you please try it? > > It's a workaround, but it's the cleanest fix I can think of. This seems to work. Thanks! For completeness, you may consider also handling the case where completions-header-format is an empty string, which is another not too unreasonable way to disable the header. minibuffer-next-completion still skips the first candidate for that case. -- Knut Anders From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 31 10:03:02 2022 Received: (at 60411) by debbugs.gnu.org; 31 Dec 2022 15:03:02 +0000 Received: from localhost ([127.0.0.1]:39612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBdO1-00050n-MS for submit@debbugs.gnu.org; Sat, 31 Dec 2022 10:03:02 -0500 Received: from heytings.org ([95.142.160.155]:53178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBdNz-00050c-E8 for 60411@debbugs.gnu.org; Sat, 31 Dec 2022 10:02:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672498978; bh=jEUqydakEQl0su27iuG/fpTc6gxQ6bpTv8xTyLh0uyA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=SjaDPezlodVVUhbTCqYGiwaOfNa5NcUNc0HyZaBIlLKIxN8uH+rQo9YhYzuLj54uy JsuITcINygaa7jmAsuiXTsumO3ANQYakX69AUQPXbY2v0co9Ivwfm97zAGNyvtkJqO OoQMtPBhkHz4C2+u6/nGBVD1HCRn62Wk1L0ARCy+ecJRNn6TnQDyEOPa5GBW5UIZa2 tyJBbxPwhoflFV04XcwgdNtsJKK6KqXKfmA4GBNUUWYtFtR2+e/o2k5RX6nwrAXGII RoqC3zpL3E/Ux6MCXU6f6REaIodfGWjs6U/P4u2nPV2VGRMk8XRBe2sWnSDaMsDnE2 5SmnVMd31kSrA== Date: Sat, 31 Dec 2022 15:02:57 +0000 From: Gregory Heytings To: Knut Anders Hatlen Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <87lemot7ek.fsf@gmail.com> Message-ID: <0a62cbaeff1ee0497715@heytings.org> References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="JrZC5PZDQX" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: 60411@debbugs.gnu.org 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: -1.0 (-) --JrZC5PZDQX Content-Type: text/plain; charset=us-ascii; format=flowed > > For completeness, you may consider also handling the case where > completions-header-format is an empty string, which is another not too > unreasonable way to disable the header. minibuffer-next-completion still > skips the first candidate for that case. > Thanks for your feedback! Indeed, that's another bug, which makes a fix elsewhere in the code even less likely. It is fixed in the attached patch. Can you try it? Eli, do you have objections to that patch? --JrZC5PZDQX Content-Type: text/x-diff; name=Fix-handling-of-completions-header-format.patch Content-Transfer-Encoding: base64 Content-ID: <0a62cbaeffd696e1d8c7@heytings.org> Content-Disposition: attachment; filename=Fix-handling-of-completions-header-format.patch RnJvbSBkMDQ0M2UwMjE1MTk2YjE1NzY4MDBhZTFkNWYwZjUzNTdhOGE4ZGFk IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBTYXQsIDMxIERl YyAyMDIyIDE0OjUwOjEzICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIEZpeCBo YW5kbGluZyBvZiBjb21wbGV0aW9ucy1oZWFkZXItZm9ybWF0DQoNCiogbGlz cC9taW5pYnVmZmVyLmVsIChkaXNwbGF5LWNvbXBsZXRpb24tbGlzdCk6IElu c2VydCBhbg0KaW52aXNpYmxlIGxpbmUgd2hlbiBjb21wbGV0aW9ucy1oZWFk ZXItZm9ybWF0IGlzIG5vdCBhIHN0cmluZyAoaW4NCnBhcnRpY3VsYXIsIG5p bCkgb3IgaXMgYW4gZW1wdHkgc3RyaW5nLiAgRml4ZXMgYnVnIzYwNDExLg0K QWxzbywgZG8gbm90IHVzZSBjb21wbGV0aW9ucy1oZWFkZXItZm9ybWF0IHdo ZW4gaXQgaXMgbm90IGENCnN0cmluZy4NCi0tLQ0KIGxpc3AvbWluaWJ1ZmZl ci5lbCB8IDggKysrKysrKy0NCiAxIGZpbGUgY2hhbmdlZCwgNyBpbnNlcnRp b25zKCspLCAxIGRlbGV0aW9uKC0pDQoNCmRpZmYgLS1naXQgYS9saXNwL21p bmlidWZmZXIuZWwgYi9saXNwL21pbmlidWZmZXIuZWwNCmluZGV4IDdhNzIw Y2YyYzAuLjZjNzQxM2M1NTUgMTAwNjQ0DQotLS0gYS9saXNwL21pbmlidWZm ZXIuZWwNCisrKyBiL2xpc3AvbWluaWJ1ZmZlci5lbA0KQEAgLTIyNzUsOCAr MjI3NSwxNCBAQCBkaXNwbGF5LWNvbXBsZXRpb24tbGlzdA0KIA0KICAgICAo d2l0aC1jdXJyZW50LWJ1ZmZlciBzdGFuZGFyZC1vdXRwdXQNCiAgICAgICAo Z290by1jaGFyIChwb2ludC1tYXgpKQ0KLSAgICAgICh3aGVuIGNvbXBsZXRp b25zLWhlYWRlci1mb3JtYXQNCisgICAgICAod2hlbiAoc3RyaW5ncCBjb21w bGV0aW9ucy1oZWFkZXItZm9ybWF0KQ0KICAgICAgICAgKGluc2VydCAoZm9y bWF0IGNvbXBsZXRpb25zLWhlYWRlci1mb3JtYXQgKGxlbmd0aCBjb21wbGV0 aW9ucykpKSkNCisgICAgICAod2hlbiAob3IgKG5vdCAoc3RyaW5ncCBjb21w bGV0aW9ucy1oZWFkZXItZm9ybWF0KSkNCisgICAgICAgICAgICAgICAgKHN0 cmluZz0gY29tcGxldGlvbnMtaGVhZGVyLWZvcm1hdCAiIikpDQorICAgICAg ICA7OyBJbnNlcnQgYW4gaW52aXNpYmxlIGxpbmUsIG90aGVyd2lzZSB0aGUg Zmlyc3QgY2FsbCB0bw0KKyAgICAgICAgOzsgJ21pbmlidWZmZXItbmV4dC1j b21wbGV0aW9uJyBtaWdodCBzZWxlY3QgdGhlIHNlY29uZA0KKyAgICAgICAg OzsgY29tcGxldGlvbiBjYW5kaWRhdGUuICBTZWUgYnVnIzYwNDExLg0KKyAg ICAgICAgKGluc2VydCAocHJvcGVydGl6ZSAiXG4iICdpbnZpc2libGUgdCkp KQ0KICAgICAgIChjb21wbGV0aW9uLS1pbnNlcnQtc3RyaW5ncyBjb21wbGV0 aW9ucyBncm91cC1mdW4pKSkNCiANCiAgIChydW4taG9va3MgJ2NvbXBsZXRp b24tc2V0dXAtaG9vaykNCi0tIA0KMi4zOS4wDQoNCg== --JrZC5PZDQX-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 31 10:33:16 2022 Received: (at 60411) by debbugs.gnu.org; 31 Dec 2022 15:33:16 +0000 Received: from localhost ([127.0.0.1]:39638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBdrI-0005mC-DV for submit@debbugs.gnu.org; Sat, 31 Dec 2022 10:33:16 -0500 Received: from mail-lf1-f43.google.com ([209.85.167.43]:40770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBdrG-0005ly-Ct for 60411@debbugs.gnu.org; Sat, 31 Dec 2022 10:33:15 -0500 Received: by mail-lf1-f43.google.com with SMTP id g13so35604914lfv.7 for <60411@debbugs.gnu.org>; Sat, 31 Dec 2022 07:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=7Yt+sKjyUqdHHPobqhUUjBrIq3oklwHjQNJZSLD4pBY=; b=iQsdd7DkzULfkmUpZy88gjP8c2QS8TuRqU2ifnvKLuqJ7vOKpgUJ1l1aXaUSMzWXGk JK4X78ZjEQ2zl0aw7tzWCf0YvMEYtcswhkh3+EA3brXm/O/eItMuLkkzEbfqI6tB9EWk Dmb/ZOGkaE+Jy96kvKyoKd3lQpsxat4DM7QaYM0XdIllZpIVtckzga0rb6qQg8YF6WqV 4xgmgtBZHVrqtC7hgyF50UtLiLOPnpwT5PI4LQjPCcqCWLy6XC6D3T+3bLfVeiTFDDd6 aARlvFMW2ZX6XT7qECEzuwFx8vjy4jLgi/0EwyEvDnXaj1St6W/sm7yE0EuHZ5JZYZLq FSog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7Yt+sKjyUqdHHPobqhUUjBrIq3oklwHjQNJZSLD4pBY=; b=CrgJjUAe8lytEyA/5WRMPNsabHxcb4L5R1JMUngNLJoTjEMZi/eWz76mUkWms5RCpv 8MG0/0eFGlJefcj0gO0tG9tv9qnS0YCzUY7jZ4lqO3Vb12lUMDRMUlYB8Ao9N4XAJAmI 8Rwk4M7/LqXumgY6OEKcbUR9JKNLq8l57FnV6SAH5nLxTFdz4oY8pw36nlnUHbYut0RA 4SlS6KOoAYqSaLKUpnAD2hHBVjdZtJqx9thqGnQzzDyUzD+GM/VqlHNk3EUTBkT0bgCg dKnnNq3+JgDAyJmr8iQsmcEeumz0a+/JBFzA+Nx/K5rfszPaqxBrElL7zd2mua8SUFSj WAww== X-Gm-Message-State: AFqh2krTJKK4SFkVKh6aPbc4dt1DSbiXjAxmlWduWHp7er2HaI+0HFSw dvhPOzeumOAzSpzEXsS7oF7FUVZCVg== X-Google-Smtp-Source: AMrXdXuPyZw44KEcPK51u2n5Gk5ovtH6aziYZ1jg1z8vHx5dCz65hokI4/Ej3tDhbdzQXziB1OerdQ== X-Received: by 2002:ac2:5479:0:b0:4a4:68b9:66f3 with SMTP id e25-20020ac25479000000b004a468b966f3mr9066423lfn.62.1672500787919; Sat, 31 Dec 2022 07:33:07 -0800 (PST) Received: from dell ([2a02:1660:692e:dd00::44c]) by smtp.gmail.com with ESMTPSA id u20-20020a05651220d400b004949f7cbb6esm3895793lfr.79.2022.12.31.07.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Dec 2022 07:33:07 -0800 (PST) From: Knut Anders Hatlen To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <0a62cbaeff1ee0497715@heytings.org> (Gregory Heytings's message of "Sat, 31 Dec 2022 15:02:57 +0000") References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> Date: Sat, 31 Dec 2022 16:33:08 +0100 Message-ID: <87h6xbtwp7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: 60411@debbugs.gnu.org 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: -1.0 (-) Gregory Heytings writes: >> >> For completeness, you may consider also handling the case where >> completions-header-format is an empty string, which is another not >> too unreasonable way to disable the header. >> minibuffer-next-completion still skips the first candidate for that >> case. >> > > Thanks for your feedback! Indeed, that's another bug, which makes a > fix elsewhere in the code even less likely. It is fixed in the > attached patch. Can you try it? Yes, this patch works fine in the scenarios that I have found problematic. Thank you! From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 31 10:35:12 2022 Received: (at 60411) by debbugs.gnu.org; 31 Dec 2022 15:35:12 +0000 Received: from localhost ([127.0.0.1]:39642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBdt9-0005pB-Ql for submit@debbugs.gnu.org; Sat, 31 Dec 2022 10:35:12 -0500 Received: from heytings.org ([95.142.160.155]:53218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBdt8-0005p3-C3 for 60411@debbugs.gnu.org; Sat, 31 Dec 2022 10:35:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672500909; bh=kyjOgffv080Bnkj8xwwQ/4z3Clp0a+lDZbv0qGtD/AE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=vlbzYu+hiGBhIANbAHRGGXOuKjgfSDQEyh1HbNLmwlVzvh83KeuVAwu5cR+BEgox+ 6X67JpkFUYou/OFluqH2HJgNcHMByrPZPnPPm/miC25h5I7yEny7izvgi2jIa49Xyc JVvZsPX2D21cVDXrxS7QHu3SCvkiHdsivNAVAFUglR5ddYpX879l8NPJEGNpjcnLS2 w8Wb8o1lVdVFqfgeKPTy8w3FUADUGJ3HL2KJ1lcICxOjm0gOTPcXwJvVpyDD8eHtff ZN2nIKSQOTDOpT+K9niFtU0/uKtKx/gZz50FjlYSOD7hY0Mh37nJZJxEcxrFp2ho/C FK1eUtr9w+d/Q== Date: Sat, 31 Dec 2022 15:35:08 +0000 From: Gregory Heytings To: Knut Anders Hatlen Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <87h6xbtwp7.fsf@gmail.com> Message-ID: <0a62cbaeff72d19b5927@heytings.org> References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> <87h6xbtwp7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: 60411@debbugs.gnu.org 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: -1.0 (-) >>> For completeness, you may consider also handling the case where >>> completions-header-format is an empty string, which is another not too >>> unreasonable way to disable the header. minibuffer-next-completion >>> still skips the first candidate for that case. >> >> Thanks for your feedback! Indeed, that's another bug, which makes a >> fix elsewhere in the code even less likely. It is fixed in the >> attached patch. Can you try it? > > Yes, this patch works fine in the scenarios that I have found > problematic. Thank you! > Great! Thanks again. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 31 11:40:08 2022 Received: (at 60411) by debbugs.gnu.org; 31 Dec 2022 16:40:08 +0000 Received: from localhost ([127.0.0.1]:39712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBeu0-0007T3-Bu for submit@debbugs.gnu.org; Sat, 31 Dec 2022 11:40:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBety-0007SM-9L for 60411@debbugs.gnu.org; Sat, 31 Dec 2022 11:40:06 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBets-0008HU-FJ; Sat, 31 Dec 2022 11:40:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iGUKuIq1RGomlRnQHClb/QPC/cGGm64qKBO/VpMwR6Y=; b=U4tGqfjMsfHe pggujvESRHM8n81xSpljhdWszJDjyfxs38z3dKq2+jvukWGrZ3eq8mLpL+ksVd/tiTIQ3NKSwrvff FWXS94uw8utBbr8vNAQHTiJ/IqkS08+nWO27Lk1xLo0fylG11Q5jtSlJV0iwbGonDOzayO5bMAURa GrkgzQ7I7KNJTtOqk50fDgXAOFbQGbuORwVy2CaJ5FxrFfE9DI/dDezOlw/DTuk0mVRtSiXtKUZT6 sJqEcY5RnPCJj25AzoEM7WN2jstobrt4JddYkiucZsWKIMupSqy+cr+S7oP9BFABXoltW4ujutm89 3ZmLGCgBZGycD25hhez45g==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBetr-0001ho-Nr; Sat, 31 Dec 2022 11:40:00 -0500 Date: Sat, 31 Dec 2022 18:40:02 +0200 Message-Id: <83k0274jdp.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings , Stefan Monnier , Juri Linkov In-Reply-To: <0a62cbaeff1ee0497715@heytings.org> (message from Gregory Heytings on Sat, 31 Dec 2022 15:02:57 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org 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: -3.3 (---) > Cc: 60411@debbugs.gnu.org > Date: Sat, 31 Dec 2022 15:02:57 +0000 > From: Gregory Heytings > > > For completeness, you may consider also handling the case where > > completions-header-format is an empty string, which is another not too > > unreasonable way to disable the header. minibuffer-next-completion still > > skips the first candidate for that case. > > > > Thanks for your feedback! Indeed, that's another bug, which makes a fix > elsewhere in the code even less likely. It is fixed in the attached > patch. Can you try it? > > Eli, do you have objections to that patch? It becomes less and less to my liking, TBH: too much ad-hocery. Juri, Stefan, WDYT? is this safe enough for the release branch? From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 12:00:36 2023 Received: (at 60411) by debbugs.gnu.org; 1 Jan 2023 17:00:36 +0000 Received: from localhost ([127.0.0.1]:41605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC1hL-0003Cz-UK for submit@debbugs.gnu.org; Sun, 01 Jan 2023 12:00:36 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC1hJ-0003Cm-NU for 60411@debbugs.gnu.org; Sun, 01 Jan 2023 12:00:34 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id ED46080937; Sun, 1 Jan 2023 12:00:27 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 48A5880820; Sun, 1 Jan 2023 12:00:26 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672592426; bh=8vFtgiZW+nco9vtPc7uJAClaaaS455uAY6r0VhtdgPg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=X5WcXdiw7P4JTi4mxykRACx42Hy5DGBeQ50zdJx8i5E/qC3taRWRlbVk1BpCg9Rgd NZe57yNp/HDEt1spKho0zsH6YGpBvqYS5mswW+yPe1dbLBaCZjAXo+al1lWrxIe0CI 3d556hFbVcTTzqGelzbnjkERHmEB1R1ydsASq4rYsDRdi30D70k6ui8cywdDOwwVz4 TExSwD5TMWRleODfzMchCUb9FN+XrjSdqNNSgWD3yEZiScxWm/Cqdxy1llqCy1seBq P7aEd/Q1vD2yRWUOFkDXm+G8/8kTLs6EwvWmSGY3o0vwHmMXD3lrjsTlxYBGJqaEg0 ako82uPCQ0/wg== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1C04C1200FC; Sun, 1 Jan 2023 12:00:26 -0500 (EST) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <0a62cbaeff1ee0497715@heytings.org> (Gregory Heytings's message of "Sat, 31 Dec 2022 15:02:57 +0000") Message-ID: References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> Date: Sun, 01 Jan 2023 12:00:25 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.339 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: Knut Anders Hatlen , 60411@debbugs.gnu.org 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: -3.3 (---) > @@ -2275,8 +2275,14 @@ display-completion-list > > (with-current-buffer standard-output > (goto-char (point-max)) > - (when completions-header-format > + (when (stringp completions-header-format) > (insert (format completions-header-format (length completions)))) > + (when (or (not (stringp completions-header-format)) > + (string= completions-header-format "")) > + ;; Insert an invisible line, otherwise the first call to > + ;; 'minibuffer-next-completion' might select the second > + ;; completion candidate. See bug#60411. > + (insert (propertize "\n" 'invisible t))) > (completion--insert-strings completions group-fun))) > > (run-hooks 'completion-setup-hook) Yuck. I get the impression that it would be cleaner to fix "the first call to `minibuffer-next-completion`" instead. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 12:05:21 2023 Received: (at 60411) by debbugs.gnu.org; 1 Jan 2023 17:05:21 +0000 Received: from localhost ([127.0.0.1]:41615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC1lx-0003L8-26 for submit@debbugs.gnu.org; Sun, 01 Jan 2023 12:05:21 -0500 Received: from heytings.org ([95.142.160.155]:54590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC1lv-0003Kx-TQ for 60411@debbugs.gnu.org; Sun, 01 Jan 2023 12:05:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672592718; bh=m/Tfr8+bmlIyfSBg/9zuZfjwRgVL+TKIlCep5rPF5lM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=MRuMXKR+yHL8GSEK3BR/UTd80cD0vbS6/Ue0sQL5xZYaqTVOwUDf1PxThSNWMohWk HdXgWOQtvcZYOJX5h+oiKhI6GmziOkxFafNzNiGkXfmDXdNfMvAKrPbpfL+J2OoO54 Xodj8tkFOf7GiFK/nnotBXmh235aMuSco9lMLnkzImPYdD729+LIalneENJJyBqrxp SzB2KX60hZVs8y2I0a2sIfTr10uileOYBg5gzfCARL7+/Fo2dSoZiReE8lsSNR2xuB CJ1gXAsKnil7w2npg31ON69gOU74RAXV/1AS3RXdEg0BrDblrhAHi5bjx6qZZ0/jGA Xv6oJXMNxxMoA== Date: Sun, 01 Jan 2023 17:05:18 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: Message-ID: <226b32f79f7db2be1bbe@heytings.org> References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: Knut Anders Hatlen , 60411@debbugs.gnu.org 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: -1.0 (-) > > Yuck. I get the impression that it would be cleaner to fix "the first > call to `minibuffer-next-completion`" instead. > That was my impression, too. Until I tried to fix "the first call to `minibuffer-next-completion`". But I may have missed something, of course. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 12:55:38 2023 Received: (at 60411) by debbugs.gnu.org; 1 Jan 2023 17:55:38 +0000 Received: from localhost ([127.0.0.1]:41671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC2Yb-0004mU-MZ for submit@debbugs.gnu.org; Sun, 01 Jan 2023 12:55:37 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC2YZ-0004mG-Ld for 60411@debbugs.gnu.org; Sun, 01 Jan 2023 12:55:36 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DB744441347; Sun, 1 Jan 2023 12:55:29 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1708B44133F; Sun, 1 Jan 2023 12:55:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672595724; bh=WRX07NVNutL+MtHlPxudjtxrSqoW2WxG+p+5JH7O4mA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aORY89OhW4OaxmoqfmHQZL8yS67C9CpqRLlUrDGOx9ETPecuqhXKQ+3xTfQehLX2z WI2qf+3gqVorqbrRQx3hDH41IjEuCjqkSRXnacRb2RnuTfkXEBa0sM2e5mmem+VPjZ HHMN21cg7db/ouEIou5YPv/JvfeaoctMzvp+bOEe7hgEaxINcIZ2m0tawvtWRDqIIY 2TM1LJmHEbf8FDVM+6KexuRx9mUHAux2Chxle5RB7GCEry7FhenWnxCqU1T0OrpK3J HtiBlDDPnPo/5Wb79RcU8TwLvHpHuG1DbqQnRfj7EmwzJF6yyQc1w0RI3hDmlb9E+U 4nRAXet2Nfs5w== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C21591201D0; Sun, 1 Jan 2023 12:55:23 -0500 (EST) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <226b32f79f7db2be1bbe@heytings.org> (Gregory Heytings's message of "Sun, 01 Jan 2023 17:05:18 +0000") Message-ID: References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> <226b32f79f7db2be1bbe@heytings.org> Date: Sun, 01 Jan 2023 12:55:22 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.331 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: Knut Anders Hatlen , 60411@debbugs.gnu.org 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: -3.3 (---) >> Yuck. I get the impression that it would be cleaner to fix "the first >> call to `minibuffer-next-completion`" instead. > That was my impression, too. Until I tried to fix "the first call to > `minibuffer-next-completion`". But I may have missed something, of course. Hmm... I think the crux of the matter is that the state in which we are at the beginning (when creating the *Completions* buffer) is unclear/accidental (is the first completion already selected or not?). This is made more muddy by (when completions-highlight-face (setq-local cursor-face-highlight-nonselected-window t)) which changes the behavior of *Completions* depending on whether `minibuffer-next-completion` has been used or not since the *Completions* buffer was setup. [ "Fixing" this might require extending `cursor-face-highlight-nonselected-window` so that it can indicate whether to highlight when either *Completion* or the minibuffer is selected). ] It's not clear to me how to "make this right", but maybe a "better ugly hack" is to work with the above `setq-local`, i.e. if `cursor-face-highlight-nonselected-window` is still nil (in which case, the cursor-face hilighting should be currently off), consider that `minibuffer-next-completion` should move to the *first* completion rather than to the next. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 13:56:34 2023 Received: (at 60411) by debbugs.gnu.org; 1 Jan 2023 18:56:34 +0000 Received: from localhost ([127.0.0.1]:41770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC3Va-0006OR-0b for submit@debbugs.gnu.org; Sun, 01 Jan 2023 13:56:34 -0500 Received: from heytings.org ([95.142.160.155]:54790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC3VY-0006OI-B5 for 60411@debbugs.gnu.org; Sun, 01 Jan 2023 13:56:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672599391; bh=KEOaS8mAbLFGqGnZOG68o3L6thMRG3koiac3kqqhm/k=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=uEd+U81yUm0Yr7eNYXHEdJQN3P+vHRKoU/ecoif4fnkbnN7EMeiT44/gQbYkJATUE pbSw7iSIDKA7M7J09umj8VdsWC4Mjp4sejEiC3iAPibIYnKYU+5cvTsDQoAp1gXx5f cudyktI1X1t57i9Ga7ucXp5f/oVVKl/lxizKQqiLVXOSihEJyDQcJ9MwPmd3gz8JWq i2zzuqO0uZu9ZMxaH+YoXHeAoriP/KTyBIFcDc7nQlOSNWNMkj4NhTF9ExMOmnuR4b w4QRkoS7zgdj4O0wpsT3jwOZShvZxI9CPX7Sarm/ogkT9KgTyM23Q2uLy0INxvDWxQ xmWilN4c/aOQg== Date: Sun, 01 Jan 2023 18:56:30 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: Message-ID: <226b32f79f65b964c636@heytings.org> References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> <226b32f79f7db2be1bbe@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: Knut Anders Hatlen , 60411@debbugs.gnu.org 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: -1.0 (-) > > I think the crux of the matter is that the state in which we are at the > beginning (when creating the *Completions* buffer) is unclear/accidental > (is the first completion already selected or not?). > Exactly. > > (when completions-highlight-face > (setq-local cursor-face-highlight-nonselected-window t)) > > It's not clear to me how to "make this right", but maybe a "better ugly > hack" is to work with the above `setq-local`, i.e. if > `cursor-face-highlight-nonselected-window` is still nil (in which case, > the cursor-face hilighting should be currently off), consider that > `minibuffer-next-completion` should move to the *first* completion > rather than to the next. > I thought about that solution, but what if someone sets completion-highlight-face to nil? I also tried to add another buffer-local variable to distinguish the first and later calls to minibuffer-next-completion, but that didn't work in all cases either. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 12:56:12 2023 Received: (at 60411) by debbugs.gnu.org; 5 Jan 2023 17:56:12 +0000 Received: from localhost ([127.0.0.1]:52805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDUTL-0008Bd-PB for submit@debbugs.gnu.org; Thu, 05 Jan 2023 12:56:12 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDUTK-0008B7-4Q for 60411@debbugs.gnu.org; Thu, 05 Jan 2023 12:56:10 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 3E4402000A; Thu, 5 Jan 2023 17:56:00 +0000 (UTC) From: Juri Linkov To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <226b32f79f65b964c636@heytings.org> (Gregory Heytings's message of "Sun, 01 Jan 2023 18:56:30 +0000") Organization: LINKOV.NET References: <87zgb5lx6y.fsf@oracle.com> <6c9d91cffcdbff97f034@heytings.org> <87lemot7ek.fsf@gmail.com> <0a62cbaeff1ee0497715@heytings.org> <226b32f79f7db2be1bbe@heytings.org> <226b32f79f65b964c636@heytings.org> Date: Thu, 05 Jan 2023 19:37:34 +0200 Message-ID: <86sfgp5ihl.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60411 Cc: Knut Anders Hatlen , 60411@debbugs.gnu.org, Stefan Monnier 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: -1.7 (-) >> I think the crux of the matter is that the state in which we are at the >> beginning (when creating the *Completions* buffer) is unclear/accidental >> (is the first completion already selected or not?). > > Exactly. > >> It's not clear to me how to "make this right", but maybe a "better ugly >> hack" is to work with the above `setq-local`, i.e. if >> `cursor-face-highlight-nonselected-window` is still nil (in which case, >> the cursor-face hilighting should be currently off), consider that >> `minibuffer-next-completion` should move to the *first* completion rather >> than to the next. > > I thought about that solution, but what if someone sets > completion-highlight-face to nil? I also tried to add another buffer-local > variable to distinguish the first and later calls to > minibuffer-next-completion, but that didn't work in all cases either. Then I guess your insert-invisible-\n patch is the simplest way to enforce such a long-standing rule that no candidate is selected in the completions buffer initially, even when it has no visible header. And definitely this is the safest solution for the release branch. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 16:04:06 2023 Received: (at 60411) by debbugs.gnu.org; 5 Jan 2023 21:04:06 +0000 Received: from localhost ([127.0.0.1]:53084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDXPB-0004yy-U6 for submit@debbugs.gnu.org; Thu, 05 Jan 2023 16:04:06 -0500 Received: from heytings.org ([95.142.160.155]:60462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDXPA-0004yq-DR for 60411@debbugs.gnu.org; Thu, 05 Jan 2023 16:04:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672952643; bh=3PqQWpQJRR3GjN430XLirIU0RUJc6jaTAqcayb+dNHw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=OegNUSwoibbCMD6d2mZAAUmAX7A+25IFWPHjoMilVhc2Iqj0cZli+laz/7TuQ4fUm qdPoBpmrgFMfTedeWDo4un3TCLbiH9YRedNmq4eHHE1jNecown87pooLOarDBIC3Hs WZkY5EECVKU4ArMqzHQCHPaG/eBv2+LLBeWxXtVThOzxwj28QOFgdHZaOCPGy3o/Ff EY4GxeGWj4EV2kLyD83OK4i0EhGlhqCX96ZDzRzp1lMS4cOKAd2w0HtWYTTOf5vy+m 4gGTb0QzIVh4EStJbdpXqOKQ8Un/8So+8Y5B8vdEGqgHl0X4yJuyf5KGg9qlPDDIvL QyM5hAW1Fm15g== Date: Thu, 05 Jan 2023 21:04:03 +0000 From: Gregory Heytings To: Juri Linkov Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <86sfgp5ihl.fsf@mail.linkov.net> Message-ID: <8dea9f3e0e993e0bd0a9@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: Knut Anders Hatlen , 60411@debbugs.gnu.org, Stefan Monnier 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: -1.0 (-) > > Then I guess your insert-invisible-\n patch is the simplest way to > enforce such a long-standing rule that no candidate is selected in the > completions buffer initially, even when it has no visible header. And > definitely this is the safest solution for the release branch. > Stefan and Eli, do you agree with that conclusion? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 01:43:32 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 06:43:32 +0000 Received: from localhost ([127.0.0.1]:53610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDgRw-0002GJ-7h for submit@debbugs.gnu.org; Fri, 06 Jan 2023 01:43:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDgRv-0002G6-DT for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 01:43:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDgRo-0004xt-N9; Fri, 06 Jan 2023 01:43:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Sz8iHCgA/TIFGJ8MGsDR7/kFKUgPRKbBE0O46Janp+E=; b=r7j8mb8bXcoj DaIBy0GYeKwbLiVhMMQJqUBd0Wg+EeDJvx6nwoCwAnhjiDZLSscnIYLyjfdZSv2F6/G+HeDke9PuF cfCUt46jHufatBgho5WMMV2B/PKM7Y/AL3MykOtXxc6IexdTG3RiTowbjz1BQJgaQ2zjCYeP3V7m1 ygpcY5EjhH1PvrvN6yqu8cat0ZiZR8e4hFwt0dac7IwNtypn45uNHiFRi/JS/JrEi9Tk2uOFu7jmb DdrN3g9Vi7usHkCCm+T3zEhbYja4NBKENmBeua7A0GBfoNJ9+YEkGpC0bo/XrmOBOyVMGk02WVH+1 f9qQKlxMmb1BmEwqVmhNFw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDgRm-0002qG-5h; Fri, 06 Jan 2023 01:43:22 -0500 Date: Fri, 06 Jan 2023 08:43:39 +0200 Message-Id: <83a62ww4bo.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <8dea9f3e0e993e0bd0a9@heytings.org> (message from Gregory Heytings on Thu, 05 Jan 2023 21:04:03 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -3.3 (---) > Cc: Knut Anders Hatlen , 60411@debbugs.gnu.org, > Stefan Monnier > Date: Thu, 05 Jan 2023 21:04:03 +0000 > From: Gregory Heytings > > > Then I guess your insert-invisible-\n patch is the simplest way to > > enforce such a long-standing rule that no candidate is selected in the > > completions buffer initially, even when it has no visible header. And > > definitely this is the safest solution for the release branch. > > > > 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? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 03:22:42 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 08:22:42 +0000 Received: from localhost ([127.0.0.1]:53740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDhzu-0004ro-27 for submit@debbugs.gnu.org; Fri, 06 Jan 2023 03:22:42 -0500 Received: from heytings.org ([95.142.160.155]:32834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDhzs-0004rf-Jl for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 03:22:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672993360; bh=YdR1tOp1vbPVN6mhDdXajHEJ8ATPJt4z2UA5V8dnQPM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=xq5GcRMXCgCgByS9wC27wlUOaE1fPdYAZGminWxmBs6isElUY/Ej4jz6oMC4htQtP C64Q0C2ufWTmeq7wvq/SwlpHV6NXqFnmSs2w7cPP/ArEcWt5H1/D4mo2M9ln25q5Hn TS4u89rLfmi2ruRHMQQifB6nYnVhqA+4MJy87uCmj3DhyC85LAAcUsFIpWmdGgbzZO XNpMX7E5xAG8ScKKfRJeSUzWxRP51Z1vfZsHLmnmnsLY95b++dBwzTzX5po/nttFD2 ZdDkBM0mtNiG1hL6/5e5F2OAeronKGKKZ9r1NhWmcBt2apyXVgMMPUuH5yf3NFFlZj +n+MD25GdUINg== Date: Fri, 06 Jan 2023 08:22:39 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83a62ww4bo.fsf@gnu.org> Message-ID: <371ba1d0be9671d4a3a4@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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="lXpaL7arRg" Content-ID: <371ba1d0beb50e0e53ba@heytings.org> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -1.0 (-) --lXpaL7arRg Content-Type: text/plain; charset=us-ascii; format=flowed Content-ID: <371ba1d0befc55108614@heytings.org> >> 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. --lXpaL7arRg Content-Type: text/x-diff; name=Fix-handling-of-completions-header-format.patch; charset=us-ascii Content-Transfer-Encoding: base64 Content-ID: <371ba1d0be737714dc0a@heytings.org> Content-Disposition: attachment; filename=Fix-handling-of-completions-header-format.patch RnJvbSBkMDQ0M2UwMjE1MTk2YjE1NzY4MDBhZTFkNWYwZjUzNTdhOGE4ZGFk IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBTYXQsIDMxIERl YyAyMDIyIDE0OjUwOjEzICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIEZpeCBo YW5kbGluZyBvZiBjb21wbGV0aW9ucy1oZWFkZXItZm9ybWF0DQoNCiogbGlz cC9taW5pYnVmZmVyLmVsIChkaXNwbGF5LWNvbXBsZXRpb24tbGlzdCk6IElu c2VydCBhbg0KaW52aXNpYmxlIGxpbmUgd2hlbiBjb21wbGV0aW9ucy1oZWFk ZXItZm9ybWF0IGlzIG5vdCBhIHN0cmluZyAoaW4NCnBhcnRpY3VsYXIsIG5p bCkgb3IgaXMgYW4gZW1wdHkgc3RyaW5nLiAgRml4ZXMgYnVnIzYwNDExLg0K QWxzbywgZG8gbm90IHVzZSBjb21wbGV0aW9ucy1oZWFkZXItZm9ybWF0IHdo ZW4gaXQgaXMgbm90IGENCnN0cmluZy4NCi0tLQ0KIGxpc3AvbWluaWJ1ZmZl ci5lbCB8IDggKysrKysrKy0NCiAxIGZpbGUgY2hhbmdlZCwgNyBpbnNlcnRp b25zKCspLCAxIGRlbGV0aW9uKC0pDQoNCmRpZmYgLS1naXQgYS9saXNwL21p bmlidWZmZXIuZWwgYi9saXNwL21pbmlidWZmZXIuZWwNCmluZGV4IDdhNzIw Y2YyYzAuLjZjNzQxM2M1NTUgMTAwNjQ0DQotLS0gYS9saXNwL21pbmlidWZm ZXIuZWwNCisrKyBiL2xpc3AvbWluaWJ1ZmZlci5lbA0KQEAgLTIyNzUsOCAr MjI3NSwxNCBAQCBkaXNwbGF5LWNvbXBsZXRpb24tbGlzdA0KIA0KICAgICAo d2l0aC1jdXJyZW50LWJ1ZmZlciBzdGFuZGFyZC1vdXRwdXQNCiAgICAgICAo Z290by1jaGFyIChwb2ludC1tYXgpKQ0KLSAgICAgICh3aGVuIGNvbXBsZXRp b25zLWhlYWRlci1mb3JtYXQNCisgICAgICAod2hlbiAoc3RyaW5ncCBjb21w bGV0aW9ucy1oZWFkZXItZm9ybWF0KQ0KICAgICAgICAgKGluc2VydCAoZm9y bWF0IGNvbXBsZXRpb25zLWhlYWRlci1mb3JtYXQgKGxlbmd0aCBjb21wbGV0 aW9ucykpKSkNCisgICAgICAod2hlbiAob3IgKG5vdCAoc3RyaW5ncCBjb21w bGV0aW9ucy1oZWFkZXItZm9ybWF0KSkNCisgICAgICAgICAgICAgICAgKHN0 cmluZz0gY29tcGxldGlvbnMtaGVhZGVyLWZvcm1hdCAiIikpDQorICAgICAg ICA7OyBJbnNlcnQgYW4gaW52aXNpYmxlIGxpbmUsIG90aGVyd2lzZSB0aGUg Zmlyc3QgY2FsbCB0bw0KKyAgICAgICAgOzsgJ21pbmlidWZmZXItbmV4dC1j b21wbGV0aW9uJyBtaWdodCBzZWxlY3QgdGhlIHNlY29uZA0KKyAgICAgICAg OzsgY29tcGxldGlvbiBjYW5kaWRhdGUuICBTZWUgYnVnIzYwNDExLg0KKyAg ICAgICAgKGluc2VydCAocHJvcGVydGl6ZSAiXG4iICdpbnZpc2libGUgdCkp KQ0KICAgICAgIChjb21wbGV0aW9uLS1pbnNlcnQtc3RyaW5ncyBjb21wbGV0 aW9ucyBncm91cC1mdW4pKSkNCiANCiAgIChydW4taG9va3MgJ2NvbXBsZXRp b24tc2V0dXAtaG9vaykNCi0tIA0KMi4zOS4wDQoNCg== --lXpaL7arRg-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 03:52:07 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 08:52:07 +0000 Received: from localhost ([127.0.0.1]:53782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDiSM-0005f1-R9 for submit@debbugs.gnu.org; Fri, 06 Jan 2023 03:52:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDiSL-0005eY-9P for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 03:52:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDiSE-0006H8-VO; Fri, 06 Jan 2023 03:51:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=swqXK8xfOC3VPDMzyze26gEfktL7AGiQQb3jRVRI9sc=; b=eESNaWpIA+Zp HYtZUDR8uPizYeNfYVzMJ9dZ40Msq915u+mgaNZ7A6mHO4Om/ag5P9Uvhvkesh+KU8iYmhM+s8ZWp Nx0eD+jmrRip4JHg/s4GGsEnIF+1845ftv7FUjOYb6DyqcpBQQ/q38GcUkeWZlw9CSZmNtryMiKfe L+0af+l9gU+WeQHc5Ma25VuEQQvplmOhw3ZO2CvfQGO3cEtJwlWNfN1FHpDkRK42cGn/ewxnqmmvf CZPa9MSUDw5iF6MHY1XPT/ikNWMn5L71ugrPZeAmlHU4vhMhlGpzUvFhqM2mtqimaiqTJjyR3RUmo RHs2afW7aIrEf9BUh+iavA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDiSC-0007lQ-W7; Fri, 06 Jan 2023 03:51:57 -0500 Date: Fri, 06 Jan 2023 10:52:11 +0200 Message-Id: <83v8lkujt0.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <371ba1d0be9671d4a3a4@heytings.org> (message from Gregory Heytings on Fri, 06 Jan 2023 08:22:39 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -3.3 (---) > Date: Fri, 06 Jan 2023 08:22:39 +0000 > From: Gregory Heytings > cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > > >> 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? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 04:01:13 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 09:01:13 +0000 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 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== Date: Fri, 06 Jan 2023 09:01:08 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83v8lkujt0.fsf@gnu.org> 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 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -1.0 (-) >>>> 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 06:40:10 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 11:40:10 +0000 Received: from localhost ([127.0.0.1]:53893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDl4z-0003vV-N2 for submit@debbugs.gnu.org; Fri, 06 Jan 2023 06:40:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDl4x-0003vD-7E for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 06:40:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDl4q-0001C9-Q9; Fri, 06 Jan 2023 06:40:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ATlhkQpDeCHCfmqSZSe58CoibV56xlNCGweE+Rjw1Lg=; b=ElgGYnPMRWlw kpd+P6Z7Yirxu8ldmW/u9STyXqY6ExHUJuTwpdnuvSVpFFy09s1FFi+mfBPrsoFV5IizBt1Kl5GzP 5pALlfsyux2Xku7qobdNmS00+6Hg3JOFgK8yIOo49Ps8srBoxRq/7d9iHXUfSgc8T/ZQRKPzEzpXb RRqZPNUzzWYDVgNEJf85gEfN27fnsSrL3T7B5o5Un0ldmJt21meWTNCkF2vmDbAW4a2w35l8Ri9g+ r388eXYETYjUjTdIu3latBdJFleK0B4j74jhHa6tNL0ravOmNP5aHz95JPYzH+r4tLfGnE/mgxFg3 AnmLuaz21vR/vquxHWbAQw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDl4q-0007TX-Ak; Fri, 06 Jan 2023 06:40:00 -0500 Date: Fri, 06 Jan 2023 13:40:16 +0200 Message-Id: <83tu13vqlb.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <371ba1d0be87d64ed419@heytings.org> (message from Gregory Heytings on Fri, 06 Jan 2023 09:01:08 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -3.3 (---) > Date: Fri, 06 Jan 2023 09:01:08 +0000 > From: Gregory Heytings > cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > > > >>>> 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. Then why not change that logic in minibuffer-next-completion to be smarter about this? What you suggest is too ad-hoc-ish, and any future change to the possible values of completions-header-format will risk breaking the condition you propose. Or maybe what minibuffer-next-completion does should be rethought? Why does it assume that the first candidate is on the second line? what if it's on the third line instead? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 07:13:57 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 12:13:57 +0000 Received: from localhost ([127.0.0.1]:53959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDlbh-0004ua-GJ for submit@debbugs.gnu.org; Fri, 06 Jan 2023 07:13:57 -0500 Received: from heytings.org ([95.142.160.155]:33142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDlbf-0004uR-Pz for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 07:13:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673007234; bh=Rcn/rjvPPSE4zHns3eEkhukENlPyO+VPtYToMwXyauE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=UtwZx/58lEu5wqJYJwrVe8/qyAqvAxQvbyTvF+1fRuHdvUSmOcMVgNkr3Aj6iIgW8 37QPLqRSmu51ZZr9wrdhCy1BFbs82c2zn4JoUO5QeTXYSnk925ddbVWhdZlezcB8qs ZYuKN6oyl4d2emvF//LynhQOjuaF4OQ/rLa8sGgfHdMx12xVUx8FlrE5QSkGtv77iT MsMgX1tBj1dBbPeWOJAaySyCAvrvCS4Y20WNpBa5FFtZxlMg05Bq6TbFh66+Io/3rf yGGsWt08emwVtiy2d0JpNICszutu6qWWJb3H2YLzFO0Q9ZNX5MDoi7pNslF27jp/WT wdKEJ7onM6tHg== Date: Fri, 06 Jan 2023 12:13:54 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83tu13vqlb.fsf@gnu.org> Message-ID: <371ba1d0bed233c2fbd3@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> <371ba1d0be87d64ed419@heytings.org> <83tu13vqlb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -1.0 (-) > > 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. > > What you suggest is too ad-hoc-ish, and any future change to the > possible values of completions-header-format will risk breaking the > condition you propose. > I agree about the adhocishness, but I don't see how it could be done differently. > > Or maybe what minibuffer-next-completion does should be rethought? Why > does it assume that the first candidate is on the second line? what if > it's on the third line instead? > It does not need to be on the second line, it's only that it cannot be at BOB. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 07:21:48 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 12:21:48 +0000 Received: from localhost ([127.0.0.1]:53965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDljI-000576-BU for submit@debbugs.gnu.org; Fri, 06 Jan 2023 07:21:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDljF-00056s-Kt for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 07:21:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDlj9-0005Xn-BP; Fri, 06 Jan 2023 07:21:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=wpVmVo/9SDLCxUIvFSzvCsl0818Yge9Tw0mA0GDF/24=; b=TRv27vBu8nC9 hxiNh7/gVqSnGT2r3HWbNUF3k2nWkzRxjRoVdWuOgmaFHITVJBrvX9PFff78YePEIL1ScxvHFv2/k TTKi/0p3nNaTp9b0MtxSOKViqa/sTvh4THPmtsfiPOvMllOmZ69c8m6+n7d5uFijs6qu2kDYq9+Km Zdq8RJfpVy77DNUxn+IyKR9X30udtStvcXdwFKZTSkudTgGssWo8Oi+9MhjHQCkzHhWAaoOo3cKYU hDxs8h9LwuX04GJYC+PcClmx4yGrLZ0Ko1eTiEjfJgIAacHwl0AkP1HpLYDo1KYj6jv4DY3FywTAL 38PTaeirEKuiEKZybdP3iw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDlj8-0000n4-43; Fri, 06 Jan 2023 07:21:38 -0500 Date: Fri, 06 Jan 2023 14:21:54 +0200 Message-Id: <83pmbrvonx.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <371ba1d0bed233c2fbd3@heytings.org> (message from Gregory Heytings on Fri, 06 Jan 2023 12:13:54 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -3.3 (---) > Date: Fri, 06 Jan 2023 12:13:54 +0000 > From: Gregory Heytings > cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > > > 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 07:39:50 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 12:39:50 +0000 Received: from localhost ([127.0.0.1]:53978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDm0j-0007qm-T2 for submit@debbugs.gnu.org; Fri, 06 Jan 2023 07:39:50 -0500 Received: from heytings.org ([95.142.160.155]:33196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDm0i-0007qe-HO for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 07:39:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673008787; bh=siZbTrMO6DQ4O6RJYcJrb1oD//wikUtpo8z6hvY8/tw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Lp8kVqhGHSNP1Th/4PPXmr0Y+zWQseQU742wQPRSBBIk55QNHbsc2MJhtU6Z6ESbJ CUCFSJNMMiOgbr2qMBC8QyDo0MncdT9kEoU2cXjLlkTeyWXhAaRQe4sg+MJlKjchw1 tdkHn7prY2IkcEIu9pfsbTwYMH/aXE8jK4Yt8yR1guAb9qtIGTykuwW6eW1knL7c5i 7yumYr8b7F9qcMP9Bzpda4eJfxpLsgz29A9HE5+0J7+1ZCNWqxmnS4N9E42eCcS3pY 5mYxhSpJ7bO2ZqIZFOifwx1EDZ/b9cDPuwfiC6Plgo/x8GzEN+EuvXEWe8Mfga0Rui 0q1WLo+vievjw== Date: Fri, 06 Jan 2023 12:39:46 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83pmbrvonx.fsf@gnu.org> Message-ID: <371ba1d0becbcd718fdb@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> <371ba1d0be87d64ed419@heytings.org> <83tu13vqlb.fsf@gnu.org> <371ba1d0bed233c2fbd3@heytings.org> <83pmbrvonx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -1.0 (-) > > 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 that minibuffer-next-completion is supposed to move to the first completion when it is called for the first time, to the next completion when it is called for the Nth time, and to the first completion again when it is called for the Mth time (where M is the number of completion candidates). If point is at BOB, and if there is nothing before the first completion, next-completion finds that there is a text property there, and therefore moves to the end of the current completion (the first one) and to the beginning of the next completion, with the two calls to next-single-property-change. There is nothing in the current logic of the code with which it is possible to make a distinction between "this is the first call" and "this is not the first call". From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 07:59:05 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 12:59:06 +0000 Received: from localhost ([127.0.0.1]:54001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDmJN-0008NW-JL for submit@debbugs.gnu.org; Fri, 06 Jan 2023 07:59:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDmJL-0008N0-Dw for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 07:59:03 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDmJF-0000Iw-Lq; Fri, 06 Jan 2023 07:58:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=PaddRk7oEFlWBj6nYSRfckt8jcA94FDDDk5ct6T67Ms=; b=sg/YPxV8Ikki PGVyu9pdwLKulid7zT4o2aq7z6NlO7V3J+z9GK5UUabthZfr0UcoxjSwqSm+2AZfnmPbipAFwEjA9 xDSMNW+SOWbuDgbG+Kcsjz7ts5za5F9REUX2X8dXNn151k3dU9aj1RxPrn+rcAU2/mviEhskUZQHF A3eyLKOCcqHgOMmAm/mqisWTRE2Gq6Gux8DklT3AqvN6vOtbU3dO4vOv/yeoRU2kmdvYkPa2KkfRq ViQ9rZJbktrJ41aAGsUdxOr2Mu7kiqqBAzc8cIvfu7OSgcRZ0aqAmLvEV8I9mDEqfUbCrpyQwbXVN 3Wm7nTBSxmvtAKymkoTphA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDmJ8-0006Uj-7V; Fri, 06 Jan 2023 07:58:57 -0500 Date: Fri, 06 Jan 2023 14:59:08 +0200 Message-Id: <83mt6vvmxv.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <371ba1d0becbcd718fdb@heytings.org> (message from Gregory Heytings on Fri, 06 Jan 2023 12:39:46 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> <371ba1d0becbcd718fdb@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -3.3 (---) > Date: Fri, 06 Jan 2023 12:39:46 +0000 > From: Gregory Heytings > cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > > > > > > 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 that minibuffer-next-completion is supposed to move to the > first completion when it is called for the first time, to the next > completion when it is called for the Nth time, and to the first completion > again when it is called for the Mth time (where M is the number of > completion candidates). Right. > If point is at BOB, and if there is nothing before the first completion, > next-completion finds that there is a text property there, and therefore > moves to the end of the current completion (the first one) and to the > beginning of the next completion, with the two calls to > next-single-property-change. > > There is nothing in the current logic of the code with which it is > possible to make a distinction between "this is the first call" and "this > is not the first call". Didn't you just say that the difference between "first" and "next" is "the first call"? Can't we make the logic be based on that instead of assuming that the format produces an empty string under certain conditions? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 08:10:21 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 13:10:21 +0000 Received: from localhost ([127.0.0.1]:54031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDmUH-0002Xf-8i for submit@debbugs.gnu.org; Fri, 06 Jan 2023 08:10:21 -0500 Received: from heytings.org ([95.142.160.155]:33262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDmUF-0002XX-Kh for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 08:10:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673010618; bh=ICNLU+BN0Y2X1BmGTCbXIgvBIoSEJCkYPrVkyduYYek=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=1ZYPIuDqtTEKF4sc4yt6xi8NZ6D53ufn0jZnvs05U5SdxA24RRuT0eSiz4byYG16E cn8tTCGNUEzSGNXNgpGjtC1L0jRKGiWTD5NvfWuSsor0zDei/HUPehb+pgcIwcFacE 5CchKSzNGpIXTlu0Xp3/jDYOy4FOoAYxMg5ThnjUn8DLBlcdcM11jwhvu/h6I0w2IM 7tpHihqFUoBez81QIzalNoyaXiBH+Ori8uTIQ4WrschsQNBCrw9P35xxyBgRM1R6V9 o/mnAkQpJj/4NLr2+DbOxUscyXJWPK8xO0gL220B9ELwM+H7ckzHYg/rxzGZBAjt5p DJTfKUmeb8Umw== Date: Fri, 06 Jan 2023 13:10:18 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83mt6vvmxv.fsf@gnu.org> Message-ID: <371ba1d0be78fd6c921f@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> <371ba1d0be87d64ed419@heytings.org> <83tu13vqlb.fsf@gnu.org> <371ba1d0bed233c2fbd3@heytings.org> <83pmbrvonx.fsf@gnu.org> <371ba1d0becbcd718fdb@heytings.org> <83mt6vvmxv.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -1.0 (-) > > Didn't you just say that the difference between "first" and "next" is > "the first call"? Can't we make the logic be based on that instead of > assuming that the format produces an empty string under certain > conditions? > As far as I can see, no. What is also possible, if it's the condition that you don't like, is to insert that invisible line unconditionally, like this: diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index f47299bd0d..09125772f3 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2275,6 +2275,10 @@ display-completion-list (with-current-buffer standard-output (goto-char (point-max)) + ;; Insert an invisible line, otherwise the first call to + ;; 'minibuffer-next-completion' might select the second + ;; completion candidate. See bug#60411. + (insert (propertize "\n" 'invisible t)) (when completions-header-format (insert (format completions-header-format (length completions)))) (completion--insert-strings completions group-fun))) From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 08:26:23 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 13:26:24 +0000 Received: from localhost ([127.0.0.1]:54075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDmjn-0002xM-Km for submit@debbugs.gnu.org; Fri, 06 Jan 2023 08:26:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDmjl-0002x1-0V for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 08:26:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDmjf-0003YQ-36; Fri, 06 Jan 2023 08:26:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dH7GhB5AOz513lDgjSNKxCmzNWW927QmUz55MBe7Jxk=; b=nMC+XSyAbo8W ultiycbQS/lWiyhqNcMDRGGeie9edObUu0Esv1lbFRWmET4K7qwlMlsDBtBjZ82CI4NBgFfeZAovl vjLDJMIBhWHqMoFBvp0jbVhd6YEThygMlnKoX8SU6NpdnKQhX1oE89h7ICHDtAXUTPZ8ir0b5PGIX AJ67/OduqsZ0xH4VN8ZcklTyEfrmwqwslnDyGJ8wKmBH/wKMOCBN2PMtat3QHI2PxlTPxrowwGOpu Ys6oUi8QYGobreCiKxG2/fjEz1b2G+KHnXCzgSHnrPzgQ/h9Iqu92omHvySjFGw+Tqy++3nVmby5O AfJ0lxShcUUSnqz64TntSw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDmje-0002ob-Fh; Fri, 06 Jan 2023 08:26:14 -0500 Date: Fri, 06 Jan 2023 15:26:32 +0200 Message-Id: <83h6x3vlo7.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <371ba1d0be78fd6c921f@heytings.org> (message from Gregory Heytings on Fri, 06 Jan 2023 13:10:18 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> <371ba1d0becbcd718fdb@heytings.org> <83mt6vvmxv.fsf@gnu.org> <371ba1d0be78fd6c921f@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -3.3 (---) > Date: Fri, 06 Jan 2023 13:10:18 +0000 > From: Gregory Heytings > cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > > > Didn't you just say that the difference between "first" and "next" is > > "the first call"? Can't we make the logic be based on that instead of > > assuming that the format produces an empty string under certain > > conditions? > > > > As far as I can see, no. What is also possible, if it's the condition > that you don't like, is to insert that invisible line unconditionally, > like this: If we cannot come up with any better ideas (which again surprises me), then unconditionally adding such a newline is better. But let's wait for Stefan to chime in. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 12:07:25 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 17:07:25 +0000 Received: from localhost ([127.0.0.1]:55727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDqBh-0002sZ-9Y for submit@debbugs.gnu.org; Fri, 06 Jan 2023 12:07:25 -0500 Received: from heytings.org ([95.142.160.155]:33556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDqBf-0002sL-7a for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 12:07:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673024841; bh=Xg5+Q6eql3YnNVpTPt10FLj4XW6ZYQh0zgDFv55xI0w=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=7ZZIsrwNKcx0JWJq/fMZ9+dRi/3lMMP6I5OdHIyvPIMo89rOQ4xHAAdV2VlqPh+FI paljwYWlnNa2NLvPBubPJWkupTdqEqFy3sFbR3umcv0q72oRhvfycay1i/ln1EeknX ZZEeM+0RK68XwExtLZ9zvqNWlYI6P0fSbjvPhsjMjMafpoGf83bJvNGhr67vl9/wL+ AsQ0+oSSPMszyrkYxHJbLFKYmONoFtr6lBbRyoDrb0K7dnf4laDsAexcm6jhe62uSf HQoAin0fvyGk/2DmTILNkig6aTwwElCr6LzKm6guAzHO2Lym9f5CluQMYwUfehuX9V 4mIVQ4WrN18DA== Date: Fri, 06 Jan 2023 17:07:21 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83h6x3vlo7.fsf@gnu.org> Message-ID: <371ba1d0be0c526521cb@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> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -1.0 (-) >>> Didn't you just say that the difference between "first" and "next" is >>> "the first call"? Can't we make the logic be based on that instead of >>> assuming that the format produces an empty string under certain >>> conditions? >> >> As far as I can see, no. What is also possible, if it's the condition >> that you don't like, is to insert that invisible line unconditionally, >> like this: > > If we cannot come up with any better ideas (which again surprises me), > then unconditionally adding such a newline is better. > Okay. I just had another look at this bug, and the patch below seems to work, too. I find it much trickier and adhocish, though. diff --git a/lisp/simple.el b/lisp/simple.el index 63479e9ce0..75f9956548 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 (= n 1) + (= (point) (point-min)) + (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 0)) + (while (> n 0) (setq pos (point)) ;; If in a completion, move to the end of it. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 12:51:52 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 17:51:52 +0000 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 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 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) 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== 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) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <83pmbrvonx.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Jan 2023 14:21:54 +0200") 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> Date: Fri, 06 Jan 2023 12:51:41 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.176 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Gregory Heytings , 60411@debbugs.gnu.org, juri@linkov.net 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: -3.3 (---) >> > 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 13:05:06 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 18:05:06 +0000 Received: from localhost ([127.0.0.1]:55803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDr5W-0006sP-8W for submit@debbugs.gnu.org; Fri, 06 Jan 2023 13:05:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDr5U-0006ro-97 for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 13:05:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDr5N-0008MV-Hu; Fri, 06 Jan 2023 13:04:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4UtqR97P+Y6F+HJ5nk0ds2FzFyINtZQfjtf4HVuu74Q=; b=WC2ff4AeiEYS h8ydF7bFW1wLem3SdTQvJNEPA3zBXY9kU3QjjpWmgohlmBBMIlpx+VryIlpMb8n3yuFvJOZVEw5Sy vUV09s/VSl7blXZ4AFriiz9k1/BGgGp/XxS4SivLbz6OIvbpxrjrFODPcY2kkM6HVZGha/iw78os1 pe3nlFXYC7RZ5YF31F/aSfcCu/4iQnNtwLoTZWpZ+qb3RwaNqBABJGool2MM6YC5z/j0qcCJ1eFC5 i3ZUG4nPCwMEA0T9w4NbXRAyIX2glw8PjA/iC8X1Lns1vJJOSyKP4+y5v8Lp5O3qS/LesTuVo7YhB CEBQHvLJiM6u1Bu67q1k+A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDr5N-0006X2-1E; Fri, 06 Jan 2023 13:04:57 -0500 Date: Fri, 06 Jan 2023 20:05:14 +0200 Message-Id: <834jt3v8rp.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <371ba1d0be0c526521cb@heytings.org> (message from Gregory Heytings on Fri, 06 Jan 2023 17:07:21 +0000) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> <371ba1d0becbcd718fdb@heytings.org> <83mt6vvmxv.fsf@gnu.org> <371ba1d0be78fd6c921f@heytings.org> <83h6x3vlo7.fsf@gnu.org> <371ba1d0be0c526521cb@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net 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: -3.3 (---) > Date: Fri, 06 Jan 2023 17:07:21 +0000 > From: Gregory Heytings > cc: kahatlen@gmail.com, 60411@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > > > If we cannot come up with any better ideas (which again surprises me), > > then unconditionally adding such a newline is better. > > > > Okay. I just had another look at this bug, and the patch below seems to > work, too. I find it much trickier and adhocish, though. I find it way better than the alternatives. Stefan? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 13:11:01 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 18:11:01 +0000 Received: from localhost ([127.0.0.1]:55812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrBF-00072G-FI for submit@debbugs.gnu.org; Fri, 06 Jan 2023 13:11:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrBE-000720-1g for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 13:11:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDrB7-00032k-1T; Fri, 06 Jan 2023 13:10:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Kus2+YQHBKdO+FVSCBW7feppuJbMzzars8Ja6a2htXY=; b=Bz189jRCxtWW e5P6LokkoSXIvOOVgQIO8TkYWI15emnlbYgm8Is++PxrfkOhTlmwn45hAXurvbG7R2fcE0FS73GQZ zAmZD0gjEcxSZG9/8wBTGO5Ly9KzbELBAvdboDrPeFUTAbIPHQYKfJEdKBPzZAEx0eJCKFIjF8iM6 39W4icjxMfm85DYoanXmmq55+dQpNOovJhAqDAHROcDNDpTuYC+u6Fk7OG+q7AklFz2oejLQpmmpR 8RsZJffR1OmmsRXbcoSCb2Gyr28+fRn2+GBgGPOyjc2EFGYl8ExzkMMDRSDDkZuZYwG/QwK4qRr8p 8tYqbiB6od8O4mjfL90ahA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDrB6-0007Ad-Hn; Fri, 06 Jan 2023 13:10:52 -0500 Date: Fri, 06 Jan 2023 20:11:10 +0200 Message-Id: <831qo7v8ht.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Fri, 06 Jan 2023 12:51:41 -0500) Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, gregory@heytings.org, 60411@debbugs.gnu.org, juri@linkov.net 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: -3.3 (---) > From: Stefan Monnier > Cc: Gregory Heytings , kahatlen@gmail.com, > 60411@debbugs.gnu.org, juri@linkov.net > Date: Fri, 06 Jan 2023 12:51:41 -0500 > > >> > 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). Gregory just suggested a patch which does that in a fairly simple and straightforward way. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 13:23:43 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 18:23:43 +0000 Received: from localhost ([127.0.0.1]:55835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrNW-0007Qn-PU for submit@debbugs.gnu.org; Fri, 06 Jan 2023 13:23:43 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrNV-0007QW-DY for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 13:23:41 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 97F1880172; Fri, 6 Jan 2023 13:23:34 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C05308006F; Fri, 6 Jan 2023 13:23:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673029408; bh=qF6z3JYcR3zkwB+FlO31UC84Kxt3yOueC9g//fKo2js=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=oQgJFY40m6IcPVrLvTUnrkSiGv399k2LqOZGMjXzPIWtj63SbYSUZSFMyKefzLA5R DtsmcWm5Wk8ykr6G4d35O4tdqUUk0uzQYlC08Klfxc2Tq4sToY4hYPziCKZK5p/qiv 4MSe4TN0RPQ5SewkrhGkxxeN8ayfzVVL0naoR0++zxYtI+Xe1BwPvvucl7OfYuSQMO wq1GHTIXMRAqDPIzeVFeHpm6mAtXKa5fT+Q5T02zQXpCiOchZqkbyV9m0M8/wfxqOs wGo3WoXdnLovqE5tnQWJ1Evi8Tj5pzkzd2cWXXHSASOqR+e+EoXNCbFBdX7/rC1t0L OdnIuSLHi/+nQ== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AA56C1208F8; Fri, 6 Jan 2023 13:23:28 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <834jt3v8rp.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Jan 2023 20:05:14 +0200") Message-ID: 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> <834jt3v8rp.fsf@gnu.org> Date: Fri, 06 Jan 2023 13:23:27 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Gregory Heytings , 60411@debbugs.gnu.org, juri@linkov.net 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: -3.3 (---) >> Okay. I just had another look at this bug, and the patch below seems to >> work, too. I find it much trickier and adhocish, though. > I find it way better than the alternatives. Stefan? The code is more complex than the alternative but it solves the problem where it occurs, so I like it better as well. (I'd replace (= (point) (point-min)) with (bobp), tho). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 13:49:24 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 18:49:25 +0000 Received: from localhost ([127.0.0.1]:55845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrmO-0008AP-Hd for submit@debbugs.gnu.org; Fri, 06 Jan 2023 13:49:24 -0500 Received: from heytings.org ([95.142.160.155]:33690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrmM-0008AG-EO for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 13:49:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673030961; bh=O//y4a1z3w9SLX4i7eg86nu4+Zw40IYdLDSKiYSXwJw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=NJYTsOYUP6N33zEH/mRA90KWX45WIZQyjlRvB6FPk90PAERByDa2VNSBfZ4CLqfDE FMYpk1rSrFrF51tJYejbw6h/rkksjaZEixYgudhafdZRtWj/Ka7r/HT7l1QqRLWWbK NRbUv8bCpDphrLYQzlj6IalcBk5LH8V2Xb+OzfXcgbTUFZQWLShVSv15ldUOPDZ2Vn jRgXzMFmCxjXjPOuPjPE2hkKW7FVdgtMj31eJynaehXjEhRNvaUi20HL2ocf9KBtIR jnJvkcoDeMkubwTTm3SJtNGBADwpipwO7WBmb+uyS70KSTcX5NgXVOwa6X6Guw/gax eDLRjtNCX3jsA== Date: Fri, 06 Jan 2023 18:49:20 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: Message-ID: <371ba1d0be0b1fe712e2@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> <371ba1d0be87d64ed419@heytings.org> <83tu13vqlb.fsf@gnu.org> <371ba1d0bed233c2fbd3@heytings.org> <83pmbrvonx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, juri@linkov.net 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: -1.0 (-) > > 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. > In fact, the problem is that buffer-local is not local enough in this case, because *Completions* can be reused. Somehow I did not think of a "text-local" variable earlier. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 13:51:23 2023 Received: (at 60411) by debbugs.gnu.org; 6 Jan 2023 18:51:23 +0000 Received: from localhost ([127.0.0.1]:55849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDroJ-0008DT-1C for submit@debbugs.gnu.org; Fri, 06 Jan 2023 13:51:23 -0500 Received: from heytings.org ([95.142.160.155]:33708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDroG-0008DK-RN for 60411@debbugs.gnu.org; Fri, 06 Jan 2023 13:51:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673031080; bh=zIDPmgD2sSbaRyPDLjiGfiLPrNWIyH9EvAJ/GQDOfxA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=vSCzB2e6FSkf+U6fcUD9UE2/Isn4ob64qqnvqZWHZ/mnY0Kjj7ujmbZkzVbTVrBfq mjAJagS54acLTLveRiOcT1AtgiBV6wX9VRWbM5PhYiBC7+bd6poIfqIu/h4bnI195f yeOO0z3g/nP2BzDyhgjofHEapQbaoVuPehY/RKucEr0oz11sTteG8P3Pb7Nt1DlBeC 98ju2Pc70NM/M4fxtWmhMR7kSsCYCj+sLGmOf6s33GslP/UlGnnokCedGAhOpw6r+b YvMCmYAo2zlUs4jjzxD/nOZpuJlRsKzxMvWc1Hsmle0UWvrLqarf/cs74Pnu0MnHtF vioU+JJcoJIng== Date: Fri, 06 Jan 2023 18:51:19 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: Message-ID: <371ba1d0bec2a6785b9b@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> <834jt3v8rp.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, juri@linkov.net 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: -1.0 (-) >>> Okay. I just had another look at this bug, and the patch below seems >>> to work, too. I find it much trickier and adhocish, though. >> >> I find it way better than the alternatives. Stefan? > > The code is more complex than the alternative but it solves the problem > where it occurs, so I like it better as well. > > (I'd replace (= (point) (point-min)) with (bobp), tho). > Okay, so I'll install that patch in a day or two, unless someone objects. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 13:12:12 2023 Received: (at 60411) by debbugs.gnu.org; 7 Jan 2023 18:12:12 +0000 Received: from localhost ([127.0.0.1]:58855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEDfw-0001Ch-Bb for submit@debbugs.gnu.org; Sat, 07 Jan 2023 13:12:12 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:46721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEDfv-0001CT-5O for 60411@debbugs.gnu.org; Sat, 07 Jan 2023 13:12:11 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 5D3E9240009; Sat, 7 Jan 2023 18:11:59 +0000 (UTC) From: Juri Linkov To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <371ba1d0be0c526521cb@heytings.org> (Gregory Heytings's message of "Fri, 06 Jan 2023 17:07:21 +0000") Organization: LINKOV.NET References: <87zgb5lx6y.fsf@oracle.com> <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> <371ba1d0becbcd718fdb@heytings.org> <83mt6vvmxv.fsf@gnu.org> <371ba1d0be78fd6c921f@heytings.org> <83h6x3vlo7.fsf@gnu.org> <371ba1d0be0c526521cb@heytings.org> Date: Sat, 07 Jan 2023 20:11:20 +0200 Message-ID: <86cz7qi5ez.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.7 (-) > Okay. I just had another look at this bug, and the patch below seems to > work, too. I find it much trickier and adhocish, though. Indeed. But I'm not opposed to this patch. > + (when (and (= n 1) > + (= (point) (point-min)) > + (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 0)) Please remove (= n 1) and replace (setq n 0) with (setq n (1- n)) to support the prefix arg with ‘M-N M-n’. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 13:15:46 2023 Received: (at 60411) by debbugs.gnu.org; 7 Jan 2023 18:15:46 +0000 Received: from localhost ([127.0.0.1]:58860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEDjN-0001Hw-Tp for submit@debbugs.gnu.org; Sat, 07 Jan 2023 13:15:46 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:54437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEDjM-0001Hh-IV for 60411@debbugs.gnu.org; Sat, 07 Jan 2023 13:15:44 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 6EC02240004; Sat, 7 Jan 2023 18:15:35 +0000 (UTC) From: Juri Linkov To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <86cz7qi5ez.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 07 Jan 2023 20:11:20 +0200") Organization: LINKOV.NET 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> Date: Sat, 07 Jan 2023 20:15:02 +0200 Message-ID: <867cxyi53t.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.7 (-) >> + (when (and (= n 1) >> + (= (point) (point-min)) >> + (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 0)) > > Please remove (= n 1) and replace (setq n 0) with (setq n (1- n)) > to support the prefix arg with ‘M-N M-n’. When n > 0. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 17:35:37 2023 Received: (at 60411) by debbugs.gnu.org; 7 Jan 2023 22:35:37 +0000 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 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== Date: Sat, 07 Jan 2023 22:35:33 +0000 From: Gregory Heytings To: Juri Linkov Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <867cxyi53t.fsf@mail.linkov.net> 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" Content-ID: <6538f58eb50e41ef6983@heytings.org> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 03:49:42 2023 Received: (at 60411) by debbugs.gnu.org; 8 Jan 2023 08:49:42 +0000 Received: from localhost ([127.0.0.1]:59823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pERN8-0000qA-LI for submit@debbugs.gnu.org; Sun, 08 Jan 2023 03:49:42 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:51107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pERN7-0000pk-K8 for 60411@debbugs.gnu.org; Sun, 08 Jan 2023 03:49:41 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 62E0A240002; Sun, 8 Jan 2023 08:49:32 +0000 (UTC) From: Juri Linkov To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <6538f58eb5b248571e28@heytings.org> (Gregory Heytings's message of "Sat, 07 Jan 2023 22:35:33 +0000") Organization: LINKOV.NET References: <87zgb5lx6y.fsf@oracle.com> <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> <6538f58eb5b248571e28@heytings.org> Date: Sun, 08 Jan 2023 10:42:10 +0200 Message-ID: <86tu11v2ep.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.7 (-) >>> Please remove (= n 1) and replace (setq n 0) with (setq n (1- n)) to >>> support the prefix arg with ‘M-N M-n’. >> >> When n > 0. > > You mean this, right? Exactly. > It took me a few minutes to understand what you meant by "support the > prefix arg" in this case. And indeed with the previous version of the > patch, M-x M-2 M- selects the third completion candidate (2C-split), > whereas with this patch the second one (2C-command) is selected. Sorry for two mistakes in one message. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 17:43:09 2023 Received: (at 60411) by debbugs.gnu.org; 8 Jan 2023 22:43:09 +0000 Received: from localhost ([127.0.0.1]:34946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEeNh-0007KF-JX for submit@debbugs.gnu.org; Sun, 08 Jan 2023 17:43:09 -0500 Received: from heytings.org ([95.142.160.155]:36822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEeNf-0007K5-Cj for 60411@debbugs.gnu.org; Sun, 08 Jan 2023 17:43:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673217786; bh=uQVFgDOnb2BsqU4OinlbvU4FFEJc+CPhmpp1xSIGcow=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=DLVZFsWMF6uZMgB+DZSk13lfC5JM+vff/UM8EelYSXFydKoV3VbgSwDaVwDhdJ0FA 2Cu8vWZ0tUIKMEq6kYAa3kBHKHxAA6MisT7//iAsdD5xNbfr3RapA/C55GGXxbuRiq 0kaVWo4t7b5M8sIhANpKqxBYWWjwqvpbABvVqK1xs84oPLKeLgryGP9CXYRFsQ9dIF yzOHaRGMw9Tq5nI2/ptFB1JdawqWkBXlcrxj61TXy0l03WuAsgroi8fQPdDLpPdzxb KPP3r0xqMM3vd+WXJKQRzDQdxbHPqvzlS3KcNffqcY2hz7tH8qQv5SelaRdkgzTre1 03dSTE8iV9m/Q== Date: Sun, 08 Jan 2023 22:43:05 +0000 From: Gregory Heytings To: Juri Linkov Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <86tu11v2ep.fsf@mail.linkov.net> Message-ID: <3f4b5c59727011c4b1cf@heytings.org> References: <87zgb5lx6y.fsf@oracle.com> <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> <6538f58eb5b248571e28@heytings.org> <86tu11v2ep.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.0 (-) >> You mean this, right? > > Exactly. > Thanks! > > Sorry for two mistakes in one message. > No worries (of course)! From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 12:49:07 2023 Received: (at 60411) by debbugs.gnu.org; 12 Jan 2023 17:49:07 +0000 Received: from localhost ([127.0.0.1]:48541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pG1hK-0002tf-Sj for submit@debbugs.gnu.org; Thu, 12 Jan 2023 12:49:07 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:60513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pG1hJ-0002t6-AJ; Thu, 12 Jan 2023 12:49:05 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 4187B1BF204; Thu, 12 Jan 2023 17:48:53 +0000 (UTC) From: Juri Linkov To: Gregory Heytings Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil In-Reply-To: <6538f58eb5b248571e28@heytings.org> (Gregory Heytings's message of "Sat, 07 Jan 2023 22:35:33 +0000") Organization: LINKOV.NET References: <87zgb5lx6y.fsf@oracle.com> <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> <6538f58eb5b248571e28@heytings.org> Date: Thu, 12 Jan 2023 19:48:17 +0200 Message-ID: <86v8lbfxum.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60411 Cc: kahatlen@gmail.com, Eli Zaretskii , 60411@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.7 (-) close 60411 29.0.60 thanks > 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. Thanks, now pushed to emacs-29 and closed. From unknown Fri Jun 20 07:16:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 10 Feb 2023 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator