emacs-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: Re: `isearch-complete1' should use `completion-at-point' or `completion-in-region'
Date: Mon, 13 Jan 2020 14:38:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> 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'?

First, there are 2 different cases: `isearch-complete-edit` and 
`isearch-complete`.

For `isearch-complete-edit` we could indeed use `completing-read`, but
I don't think I like this idea (e.g. I think it'd be odd for Icomplete
to kick in when in `isearch-edit`).  So I think the better solution is
to set `completion-at-point-functions` and then turn
`isearch-complete-edit` into an alias for `completion-at-point`.

For `isearch-complete`, it's a bit more tricky because it's a form of
completion that is performed on a text that's kept inside a string
rather than inside a buffer, so I think we'll still need some ad-hoc
code, but it could better use our completion framework.


        Stefan




reply via email to

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