[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49534: [External] : bug#49534: 26.3; Isearch should support using fi
From: |
Drew Adams |
Subject: |
bug#49534: [External] : bug#49534: 26.3; Isearch should support using filter predicates with empty search hits |
Date: |
Tue, 13 Jul 2021 21:42:00 +0000 |
> (= (match-beginning 0) (match-end 0))
>
> was moved below after
>
> (funcall isearch-filter-predicate
> (match-beginning 0) (match-end 0))
>
> This means that if isearch-filter-predicate does own matching,
> it will break later (= (match-beginning 0) (match-end 0)).
>
> What would be better: to remember its result in a let-bound variable,
> or to use save-match-data? Probably, save-match-data:
Yes, that's probably the right thing; good catch.
___
[On the other hand, a filter predicate can really
do more than just act as a predicate (it can
perform useful side effects). There could
presumably be reasons we'd want to let it change
the match data.
No, I don't have any concrete use case in mind;
and yes, without some other changes, that could
mess up code that follows using the predicate.
I just wonder about further restricting the
predicate. The point of this bug fix was to
_remove_ an unnecessary restriction, but now
we're adding another restriction. ;-)]
- bug#49534: 26.3; Isearch should support using filter predicates with empty search hits, Drew Adams, 2021/07/12
- bug#49534: 26.3; Isearch should support using filter predicates with empty search hits, Stefan Monnier, 2021/07/13
- bug#49534: 26.3; Isearch should support using filter predicates with empty search hits, Juri Linkov, 2021/07/13
- bug#49534: [External] : Re: bug#49534: 26.3; Isearch should support using filter predicates with empty search hits, Drew Adams, 2021/07/13
- bug#49534: [External] : Re: bug#49534: 26.3; Isearch should support using filter predicates with empty search hits, Juri Linkov, 2021/07/13
- bug#49534: [External] : Re: bug#49534: 26.3; Isearch should support using filter predicates with empty search hits, Drew Adams, 2021/07/13