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

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

bug#43120: 28.0.50; fido-mode: M-j before completions appear selects wro


From: OGAWA Hirofumi
Subject: bug#43120: 28.0.50; fido-mode: M-j before completions appear selects wrong choice
Date: Wed, 09 Sep 2020 23:01:22 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

João Távora <joaotavora@gmail.com> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> I think something like this is the way to go for a behaviour change such
>>> as this.
>>
>> Looks fine to me.
>
> Thanks, pushed.
>
>>> +    (define-key map (kbd "RET") 'icomplete-ret)
>>
>> Maybe use a `remap`ping instead?
>
> I did that, too.

> +(defun icomplete-ret ()
> +  "Exit minibuffer for icomplete."
> +  (interactive)
> +  (if (and icomplete-show-matches-on-no-input
> +           (car completion-all-sorted-completions)
> +           (eql (icomplete--field-end) (icomplete--field-beg)))
> +      (icomplete-force-complete-and-exit)
> +    (exit-minibuffer)))

This changed the behavior of RET from `minibuffer-complete-and-exit' to
`exit-minibuffer'. Was that intention? What I noticed is the following.

[before]
        emacs -Q
        M-x icomplete-mode
        C-xd /usr
        C-xk u          ;; shows "Kill buffer (default usr): u(sr)"
        RET
        killed "usr" buffer

[after]
        emacs -Q
        M-x icomplete-mode
        C-xd /usr
        C-xk u          ;; shows "Kill buffer (default usr): u(sr)"
        RET
        No buffer named u

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>





reply via email to

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