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

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

bug#45767: bug#45768: icomplete-mode does not provide in region completi


From: Stefan Monnier
Subject: bug#45767: bug#45768: icomplete-mode does not provide in region completion for dabbrev-completion
Date: Sat, 07 May 2022 10:22:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen [2022-05-07 12:16:16] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> The problem is that `icomplete-in-buffer` relies on
>> `completion-in-region-mode-predicate` being passed to
>> `completion-in-region` (this is needed so Icomplete can know when you've
>> finished the completion), which `completion-at-point` does but which
>> `dabbrev-completion` does not do, so `icomplete-in-buffer` is not used
>> when completing via `dabbrev-completion`.
> I see.  I've now added this to the doc string on icomplete-in-buffer,
> and since this is working as intended, I'm closing this bug report.

No, it's not working as intended: what I wrote just means that the
problem is in `dabbrev-completion` which shouldn't just call
`completion-in-region` as it does.  It should either do it within
a let-binding of `completion-in-region-mode-predicate` or with a call
to `completion-at-point` instead (which will take care to bind
`completion-in-region-mode-predicate`).

I just pushed a patch doing the latter (and providing a new
`dabbrev-capf` function).


        Stefan






reply via email to

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