bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61479: 28.2; icomplete-in-buffer --- Error in post-command-hook: arg


From: Fernando de Morais
Subject: bug#61479: 28.2; icomplete-in-buffer --- Error in post-command-hook: args-out-of-range
Date: Sat, 25 Feb 2023 09:15:51 -0300
User-agent: Gnus/5.13 (Gnus v5.13)

Hello Juri,

Juri Linkov <juri@linkov.net> writes:

> This shows that C-M-i bound to icomplete-force-complete needs the same
> treatment:
>
> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
> index f7a91599f3b..b0b55dd1e7e 100644
> --- a/lisp/icomplete.el
> +++ b/lisp/icomplete.el
> @@ -215,7 +215,11 @@ icomplete-force-complete-and-exit
>         ;; calculated, This causes the first cached completion to
>         ;; be taken (i.e. the one that the user sees highlighted)
>         completion-all-sorted-completions)
> -      (minibuffer-force-complete-and-exit)
> +      (if (window-minibuffer-p)
> +          (minibuffer-force-complete-and-exit)
> +        (minibuffer-force-complete (icomplete--field-beg)
> +                                   (icomplete--field-end)
> +                                   'dont-cycle))
>      ;; Otherwise take the faster route...
>      (minibuffer-complete-and-exit)))
>  
> @@ -223,7 +227,11 @@ icomplete-force-complete
>    "Complete the icomplete minibuffer."
>    (interactive)
>    ;; We're not at all interested in cycling here (bug#34077).
> -  (minibuffer-force-complete nil nil 'dont-cycle))
> +  (if (window-minibuffer-p)
> +      (minibuffer-force-complete nil nil 'dont-cycle)
> +    (minibuffer-force-complete (icomplete--field-beg)
> +                               (icomplete--field-end)
> +                               'dont-cycle)))
>  
>  ;; Apropos `icomplete-scroll', we implement "scrolling icomplete"
>  ;; within classic icomplete, which is "rotating", by contrast.

I've tested it and it worked perfectly!  Thank you once more.

> Thanks for finding another way to reproduce the problem.

You're welcome.  🤝

-- 
Regards,
Fernando de Morais.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]