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: Juri Linkov
Subject: Re: Is it valid to call isearch-filter-predicate outside isearch?
Date: Thu, 01 Jun 2023 09:38:11 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> Org produces its own side effects to make isearch
> support revealing text hidden via text properties.

When your isearch-filter-predicate can't be improved to be
usable also during query-replace, then probably you need to
set isearch-filter-predicate in isearch-mode-hook, and remove
afterwards in isearch-mode-end-hook.

> I guess the answer to my question about `isearch-filter-predicate' is
> yes - it may be called outside isearch and thus custom
> `isearch-filter-predicate' must consider scenarios outside isearch.
>
> It would be nice if the docstring of `isearch-filter-predicate'
> mentioned that it might be called outside isearch-mode.

isearch.el is both a core library and UI with the search commands.
UI commands for isearch-mode are enabled by C-s, etc.
But as a core library its functions including isearch-filter-predicate
are used by other packages such as replace.el.



reply via email to

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