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

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

bug#45764: icomplete in buffer completion does not work for completion-a


From: Lars Ingebrigtsen
Subject: bug#45764: icomplete in buffer completion does not work for completion-at-point
Date: Wed, 08 Jun 2022 13:50:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> `C-j' is bound to `icomplete-force-complete-and-exit', and it calls
>> `minibuffer-force-complete-and-exit' unconditionally, which deletes the
>> buffer contents.
>
> There are 2 problems, both of which stem from the fact that the code has
> not been adjusted to the case where it's working in a normal buffer
> rather than in the minibuffer:
> - it calls `minibuffer-exit` which is wrong for in-buffer completion
>   (it should probably exit `completion-in-region-mode` instead).
> - it assumes the area of completion is the whole buffer (it should
>   probably use `icomplete--field-end/beg`).

Poking at this a bit more, the test case also bugs out in
(icomplete--field-string), because there are no fields in the buffer.
(I think.  I'm apparently getting different results when edebugging and
not...)

>> I can't get icomplete-in-buffer to work in either *shell* or in other
>> modes -- has this feature gotten much testing/use?
>
> `icomplete-in-buffer` needs more love, indeed.
> [ BTW, I see its docstring says that it doesn't affect
>   `dabbrev-completion` but that's not true any more.  ]

Ah; I've now adjusted the doc string.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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