[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it valid to call isearch-filter-predicate outside isearch?
From: |
Michael Heerdegen |
Subject: |
Re: Is it valid to call isearch-filter-predicate outside isearch? |
Date: |
Fri, 02 Jun 2023 01:22:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ihor Radchenko <yantar92@posteo.net> writes:
> > If it does, maybe using `post-command-hook' would be a better choice
> > than `isearch-end-hook' (which is, obviously, not a good choice)?
>
> Surely not. `post-command-hook' is triggered after each
> `self-insert-command' during isearch/query-replace.
Of course the idea is not to so something blindly. One could check
whether isearch is still active and which overlays need to be kept.
> I had to advice `isearch-clean-overlays', which appears to be called by
> all the users of `isearch-filter-predicate' (replace-regexp, evil-mode,
> and swipet). Still a workaround. Ugly.
Hmm. Maybe the optimum.
BTW, did you consider to :before advice the local variable
`isearch-filter-predicate' instead of overwriting it? That would be a
bit nicer for users and other modes that also need to change it.
Michael.
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Eli Zaretskii, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Juri Linkov, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Juri Linkov, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?,
Michael Heerdegen <=
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/02
- RE: [External] : Re: Is it valid to call isearch-filter-predicate outside isearch?, Drew Adams, 2023/06/02
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/02
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/03
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/03
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/17
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/17
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/18
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/03
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/18