emacs-devel
[Top][All Lists]
Advanced

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

Re: Is it valid to call isearch-filter-predicate outside isearch?


From: Ihor Radchenko
Subject: Re: Is it valid to call isearch-filter-predicate outside isearch?
Date: Thu, 01 Jun 2023 11:48:10 +0000

Michael Heerdegen <michael_heerdegen@web.de> writes:

>> Sure. I have no issue with this. That's why I asked to add a word of
>> warning about the state of affairs to the docstring. It is not normal
>> that major mode-specific predicates are used elsewhere.
>
> This is not an appropriate description of reality: replace is more or
> less a part of isearch, and nearly all of the other hits are of the type
> "implement isearch behavior for this mode/ this place" (e.g. for the
> minibuffer in "simple.el").

Yes. And they selectively use some parts of isearch but not other. If a
third-party library is to re-bind `isearch-filter-predicate' what should
it expect about the environment? For now, it appears that even though
`isearch-mode-end-hook' is not always called, `isearch-clean-overlays'
does. But it may not be in future, for example. Potentially breaking the
working code. More accurate documentation would at least provide a guide
what to expect.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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