GNU bug report logs - #19032
24.4; icomplete cannot select matches with C-x b with no input

Previous Next

Package: emacs;

Reported by: Ole Laursen <olau <at> iola.dk>

Date: Wed, 12 Nov 2014 16:42:03 UTC

Severity: normal

Tags: fixed, patch

Found in version 24.4

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 19032 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Matthew Leach <matthew <at> mattleach.net>, 19032 <at> debbugs.gnu.org,
 Ole Laursen <olau <at> iola.dk>
Subject: Re: bug#19032: 24.4; icomplete cannot select matches with C-x b
 with no input
Date: Thu, 13 Aug 2020 09:43:41 -0400
> +(defvar completion-use-stored-completions-when-no-input nil)
>  (defvar completion-fail-discreetly nil
>    "If non-nil, stay quiet when there  is no match.")
> @@ -1510,8 +1511,15 @@ completion--complete-and-exit
>  COMPLETION-FUNCTION is called if the current buffer's content does not
>  appear to be a match."
>      (cond
> -     ;; Allow user to specify null string
> -   ((= beg end) (funcall exit-function))
> +     ;; Allow user to specify null string.  In the case that
> +     ;; `completion-use-stored-completions-when-no-input' is t, use
> +     ;; the car of `completion-all-sorted-completions' as the
> +     ;; candidate.
> +     ((= beg end)
> +      (when completion-use-stored-completions-when-no-input
> +        (completion--replace beg end (car completion-all-sorted-completions)))
> +      (funcall exit-function))

Would it be cleaner to have the following instead?

      ;; Allow user to specify null string.  Obey `completion-content-when-empty`.
      ((= beg end)
       (when completion-content-when-empty
         (completion--replace beg end completion-content-when-empty))
       (funcall exit-function))

So icomplete would be in charge of setting that var to the `car` of
`completion-all-sorted-completions`.


        Stefan





This bug report was last modified 4 years and 313 days ago.

Previous Next


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