emacs-devel
[Top][All Lists]
Advanced

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

Re: Navigating completions from minibuffer


From: Spencer Baugh
Subject: Re: Navigating completions from minibuffer
Date: Fri, 10 Nov 2023 08:12:31 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Juri Linkov <juri@linkov.net> writes:
>> everything works, now that I actually applied the complete patch:-)
>
> Thanks for confirming and for suggesting this change, now pushed.
>
> Probably we have to make RET more smart, so that when more editing
> was performed in the minibuffer after the completions were displayed,
> then to use the minibuffer contents with exit-minibuffer,
> not an obsolete completion candidate that remains selected.

Interesting solution!  So if the last relevant command was changing the
selected candidate, then RET submits the candidate; if the last relevant
command was editing the minibuffer, then RET submits the minibuffer
text.

What about the case where I type some text, switch between some
completion candidates in *Completions*, then decide I don't want any of
them and hit RET to submit the minibuffer text?  That's something that
works today.  Can we support that somehow?

I wrote a series of experimental changes where RET picks the selected
completion candidate, after discussing that sort of behavior in the
completions-auto-update thread, and used them for a while.  I ended up
concluding that it couldn't be done without running into bugs/loss of
funtionality like icomplete and ido have, and that therefore a separate
M-RET was the best way.  But what you propose here would solve some of
the issues, and maybe all of them.

BTW, I think the best approach I came up with in those experiments was
for TAB to insert the selected completion candidate.  Then TAB RET
effectively chooses the selected candidate.  I found that quite elegant
and powerful, but in the end it also was limiting in some cases.  But
maybe in combination with your idea of only inserting the selected
completion candidate if the minibuffer hasn't changed since selecting
it, it could work.




reply via email to

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