[Top][All Lists]

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

Re: `isearch-complete1' should use `completion-at-point' or `completion-

From: Alexander Shukaev
Subject: Re: `isearch-complete1' should use `completion-at-point' or `completion-in-region'
Date: Mon, 13 Jan 2020 15:35:09 +0100

On 13/01/2020 00:36, Juri Linkov wrote:
Not sure why in the first place `isearch-complete1' uses some custom
auto-completion implementation that is different from a conventional
solution, perhaps historical reasons.  Thus, I believe that reusing either
`completion-at-point' or `completion-in-region' to implement that
functionality is much better in the long run.  This would also allow
packages, which customize completion behavior, to hook into `isearch'
auto-completion as well.  See also [1] for example.

[1] https://github.com/abo-abo/swiper/issues/1882

Indeed, Isearch uses custom completion for historical reasons,
and there is no reason for this anymore.

But there is one thing I don't understand: how packages prefer to hook
into auto-completion?  Is it enough to convert `isearch-complete1' to
just `completing-read' in the minibuffer activated by `isearch-edit-string'?

Exactly, e.g. `ivy' [1] would pick it up out of the box.

[1] https://github.com/abo-abo/swiper/blob/master/ivy.el

reply via email to

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