[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: |
Stefan Monnier |
Subject: |
bug#45764: icomplete in buffer completion does not work for completion-at-point |
Date: |
Tue, 07 Jun 2022 10:43:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> `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`).
> 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. ]
Stefan