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 09:30:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 31/10/2023 08:50, Eshel Yaron wrote:
>> I find this company/corfo comparison quite compelling, but I'd like to
>> steer the discussion back to the topic at hand: adding inline completion
>> *preview*  to Emacs.  Could you check out my proposed implementation[0]
>> and weigh in on adding it to core, possibly as part of completion.el?
>
> Ok, I tried your code.

Great, I appreciate it.

> This is probably an issue: C-M-i is rebound.
>
> With completion-preview-mode on, this key combination does something
> different than the usual (it inserts the previewed completion).

That's an interesting point.  Basically, we want to provide a convenient
way for users to "accept the suggestion" and insert the preview.  So in
general there are two choices AFAICT:

- (re)bind some convenient key when the preview is visible, and document
  that fact while explaining how users can remove/change this binding if
  they want to.
- provide no bindings (or maybe bind an unused but less convenient key)
  by default, and recommend binding a convenient key in the docs.

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?

> I can imagine that this behavior can be useful for certain personal
> habits/used languages/etc, but it's a change from the default.

I agree, although the user explicitly enables this minor mode, so it's
entirely unexpected for it to change an otherwise default behavior, no?

> Otherwise, I can't really comment on the inclusion, since it's not
> something I would have used, and I don't know how many users would
> really benefit.

Thanks,

Eshel



reply via email to

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