GNU bug report logs - #60411
29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil

Previous Next

Package: emacs;

Reported by: Knut Anders Hatlen <kahatlen <at> gmail.com>

Date: Thu, 29 Dec 2022 21:26:02 UTC

Severity: normal

Fixed in version 29.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: Knut Anders Hatlen <kahatlen <at> gmail.com>, 60411 <at> debbugs.gnu.org
Subject: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil
Date: Sun, 01 Jan 2023 12:00:25 -0500
> @@ -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





This bug report was last modified 2 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.