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

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

bug#66948: [PATCH] Add Completion Preview mode


From: Philip Kaludercic
Subject: bug#66948: [PATCH] Add Completion Preview mode
Date: Mon, 06 Nov 2023 07:36:08 +0000

Eshel Yaron <me@eshelyaron.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Eshel Yaron <me@eshelyaron.com> writes:
>>
>>> Tags: patch
>>>
>>> Following the recent discussion on emacs-devel[0], I'm attaching a patch
>>> that adds a new Completion Preview minor mode.
>>
>> I didn't follow the discussion in detail, but is this related to the
>> capf-autosuggest package?
>
> `capf-autosuggest` didn't really come up so far.  It is related to
> Completion Preview, but `capf-autosuggest` only deals with `comint`-like
> buffers, while Completion Preview works in all buffers.  I don't know if
> and how `capf-autosuggest` could be extended to work in arbitrary buffers.

It should be possible, but from what I see the capf-autosuggest code has
a lot of additional integration into comint, that could probably be
separated, or perhaps even build on your completion-preview-mode.

>> FWIW From a brief test, my main annoyances have been that DEL drops any
>> completion
>
> Thanks for testing.  To have DEL not dismiss the completion preview, add
> `delete-backward-char` to `completion-preview-commands`.  Actually,
> would it make sense to have that behavior by default?

I think it would.

>> and that there is no option to cycle between inexact completions.
>
> That's interesting, can you elaborate about the use case that you have
> in mind?  I thought about adding a command to do that, but I wasn't sure
> there'd be a good use case for it since you can always dismiss the
> preview (e.g. with `C-g`) and say `C-M-i` to pick another candidate.

Just to use M-n/M-p to cycle through what the different completion
options are, without having to request a window that might mess up my
frame layout.

>>> [0] https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00693.html
>>>
>>> +  (pcase (bounds-of-thing-at-point 'symbol)
>>
>> [...]
>>
>> You can use `pcase-let' here.
>>
>
> Good idea, I'll try it out.
>
>
> Best,
>
> Eshel





reply via email to

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