emacs-devel
[Top][All Lists]
Advanced

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

Re: Inline completion preview


From: Eshel Yaron
Subject: Re: Inline completion preview
Date: Wed, 01 Nov 2023 13:29:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 01/11/2023 10:30, Eshel Yaron wrote:
>> Either way, `C-M-i` seems like a natural choice since inserting the
>> previewed completion is strongly related to `completion-at-point`, so
>> the idea is that this key combination does something similar
>> (completion) whether the preview is visible or not.  WDYT?
>
> It removes certain power from the user, namely, being able to press
> C-M-i to see all available completions, not just the previewed one.

Yes, that's a certain downside, although you can regain that power by
typing C-g before C-M-i (or any command other than self-insert-command
for that matter).

> I think I'd simply use RET as the key. Since the preview only appears
> after the user had pressed C-M-i already, this should conflict with
> the regular usage of RET.

I'm not sure I completely follow, but I do agree that RET is another
good choice for "accepting the suggestion".  OTOH note that the
completion preview appears automatically, without you pressing C-M-i, so
I feel that it would probably be better to leave RET alone for inserting
a newline.  Another good candidate, IMO, is TAB.  But I do like how with
João's suggestion we don't rebind any key, which makes things somewhat
simpler.  If a user does want to use RET or TAB in order to insert the
suggestion when the preview is visible, they can bind
`completion-at-point` to RET in `completion-preview-active-mode-map`.



reply via email to

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