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: Eli Zaretskii
Subject: Re: Is it valid to call isearch-filter-predicate outside isearch?
Date: Wed, 31 May 2023 17:21:51 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: juri@linkov.net, emacs-devel@gnu.org
> Date: Wed, 31 May 2023 12:56:16 +0000
> 
> I expected `isearch-filter-predicate' to be only used by isearch in
> isearch-mode. And thus I expected `isearch-mode-end-hook' to be called
> later.
> 
> Isn't it a natural expectation?

Evidently, that ship sailed a long time ago: "grep isearch-" yields
more than 60 hits in replace.el.  And then there are many hits in
comint.el, dired-aux.el, info.el, and even in simple.el.

> > In general, a predicate is not expected to have side effects, it is
> > expected to return a boolean value and leave everything else intact.
> >
> > (I also don't understand what does isearch-range-invisible have to do
> > with this.)
> 
> `isearch-range-invisible' can modify `isearch-opened-overlays' and
> `isearch-hidden' by side effect.

Yes, but why it is relevant to your problem?



reply via email to

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