From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: LINKOV.NET Message-ID: <87o8b53kyg.fsf@mail.linkov.net> References: <87czrmrxfv.fsf@gnus.org> <87zguq6mof.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1341"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , "49534@debbugs.gnu.org" <49534@debbugs.gnu.org>, "Richard M. Stallman" To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 14 00:38:38 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3R30-0000GZ-Ix for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 00:38:38 +0200 Original-Received: from localhost ([::1]:60154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3R2z-0004O8-LS for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jul 2021 18:38:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Qxb-0004jY-NR for bug-gnu-emacs@gnu.org; Tue, 13 Jul 2021 18:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3Qxb-00064H-Ax for bug-gnu-emacs@gnu.org; Tue, 13 Jul 2021 18:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3Qxb-0007Pz-8Y for bug-gnu-emacs@gnu.org; Tue, 13 Jul 2021 18:33:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jul 2021 22:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49534 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 49534-submit@debbugs.gnu.org id=B49534.162621555828464 (code B ref 49534); Tue, 13 Jul 2021 22:33:03 +0000 Original-Received: (at 49534) by debbugs.gnu.org; 13 Jul 2021 22:32:38 +0000 Original-Received: from localhost ([127.0.0.1]:42337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3QxC-0007P2-GN for submit@debbugs.gnu.org; Tue, 13 Jul 2021 18:32:38 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:33841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3QxB-0007Oc-3U for 49534@debbugs.gnu.org; Tue, 13 Jul 2021 18:32:37 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 324C9FF804; Tue, 13 Jul 2021 22:32:28 +0000 (UTC) In-Reply-To: (Drew Adams's message of "Tue, 13 Jul 2021 21:44:41 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209898 Archived-At: > 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.