bug-gnu-emacs
[Top][All Lists]
Advanced

[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 23:00:55 +0000

> > [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. ;-)]
> 
> If you want to mess with the match data,
> you can use own isearch-search-fun-function.

No, that doesn't speak to whether a filter
predicate should be able to do that.  The
question is not about how to accomplish this
or that; it's about what a filter predicate
should be able to do, as part of its intended
effect.

I'm OK with not letting it use changing match
data as a side effect.

But in general I'm in favor of it being free
to perform arbitrary actions (whether or not
it also acts effectively as a filter).
___

See "A Filter Predicate Can Perform Side Effects":

https://www.emacswiki.org/emacs/DynamicIsearchFiltering#AFilterPredicateCanPerformSideEffects





reply via email to

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