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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49534: 26.3; Isearch should support using filter predicates with emp


From: Juri Linkov
Subject: bug#49534: 26.3; Isearch should support using filter predicates with empty search hits
Date: Wed, 14 Jul 2021 02:21:54 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> 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:
>
> Remembering the result in a var might be more efficient.
> Also if `isearch-filter-predicate` clobbers the match data we have more
> problems (unless it tells us to skip this match).
>
> But whichever choice we make I think the docstring of
> `isearch-filter-predicate` should clarify what happens with the match
> data (i.e. whether it needs to be careful not to clobber it or not).

Then there is no need to remember the result in a var either
since `isearch-filter-predicate` might want intentionally
force forward-char as if the original match was empty.

So the last change fixed a non-problem and now is reverted.
Also I clarified the docstring of `isearch-filter-predicate`.





reply via email to

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