[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: |
Wed, 31 May 2023 12:56:16 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> It would be nice if the docstring of `isearch-filter-predicate'
>> mentioned that it might be called outside isearch-mode.
>
> I don't really understand what you are asking here to document. From
> reading the discussion, it sounds like you set
> isearch-filter-predicate to a function that relies on some
> (unidentified) isearch hooks to undo its side effects? And you did
> that without studying all of the existing callers of
> isearch-filter-predicate? Not sure how documentation could have
> solved this for you.
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?
> 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.
--
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>
- Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/05/20
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Juri Linkov, 2023/05/22
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/05/31
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Eli Zaretskii, 2023/05/31
- Re: Is it valid to call isearch-filter-predicate outside isearch?,
Ihor Radchenko <=
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Eli Zaretskii, 2023/05/31
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/05/31
- RE: [External] : Re: Is it valid to call isearch-filter-predicate outside isearch?, Drew Adams, 2023/05/31
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/05/31
Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/05/31
Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/05/31