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

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

bug#49534: [External] : Re: bug#49534: 26.3; Isearch should support usin


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

> What do you mean by Drew's test case?

I meant:

 (defun line>79-p (beg end)
   "Return non-nil if END is past column 79."
   (save-excursion
     (goto-char end)
     (> (current-column) 79)))

 (defun foo ()
   (interactive)
   (let ((isearch-filter-predicate  #'line>79-p))
     (isearch-forward 4)))

> Your code (in master) removes that boundary test
> altogether (no `bobp' or `eobp' test).  Why is
> that the right thing?  Is it because the match
> should be allowed to match up to `bobp' or `eobp'?
> If so, why was that test in isearch.el in the
> first place?

If you think that you found a problem, please provide
a test that exposes it.

> Actually, you do still test for reaching the
> boundary, but only for an empty match and after
> filter failure.  Why is that?

Please provide a test case if you think there is a problem.

> And why do you not need to back up a char after
> the loop, if the match was empty the last time
> around and the next time it fails?  It'll have
> advanced a char; should it stay there instead
> of backing up?  (Dunno, but I supposed not.)

Please provide more tests that confirm your doubts.





reply via email to

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