From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count Date: Wed, 29 Apr 2020 23:56:32 +0300 Organization: LINKOV.NET Message-ID: <874kt2586b.fsf@mail.linkov.net> References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@net-c.com> <87ftcrux08.fsf@mail.linkov.net> <83o8rb1kra.fsf@gnu.org> <87mu6vkvz5.fsf@mail.linkov.net> <83ftcm22c0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="65594"; 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: 40808@debbugs.gnu.org, abdullah@net-c.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 29 23:00:21 2020 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 1jTtoa-000Gxr-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 23:00:20 +0200 Original-Received: from localhost ([::1]:35510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTtoZ-0002Yx-R3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 17:00:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56858) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTtoJ-0002Xm-3p for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 17:00:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTtoI-000609-IS for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 17:00:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33249) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTtoI-0005zz-40 for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 17:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTtoI-00074s-29 for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 17:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Apr 2020 21:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40808 X-GNU-PR-Package: emacs Original-Received: via spool by 40808-submit@debbugs.gnu.org id=B40808.158819396427128 (code B ref 40808); Wed, 29 Apr 2020 21:00:01 +0000 Original-Received: (at 40808) by debbugs.gnu.org; 29 Apr 2020 20:59:24 +0000 Original-Received: from localhost ([127.0.0.1]:44795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTtng-00073U-8a for submit@debbugs.gnu.org; Wed, 29 Apr 2020 16:59:24 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:60005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTtnd-000734-Bw for 40808@debbugs.gnu.org; Wed, 29 Apr 2020 16:59:21 -0400 X-Originating-IP: 91.129.106.11 Original-Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 87CB340003; Wed, 29 Apr 2020 20:59:14 +0000 (UTC) In-Reply-To: <83ftcm22c0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Apr 2020 10:11:43 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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:179358 Archived-At: >> But there is still one corner case I'm worried about: >> isearch-lazy-count still counts matches that can't be opened >> and can't be visited, such as hidden links in org-mode. >> >> To not count them we need to bind 'search-invisible' to 'open' >> in isearch-lazy-highlight-search, but the problem is that >> isearch-filter-predicate and isearch-range-invisible will >> temporarily open them, whereas we need just to check >> whether they can be opened. >> >> So in the following patch I added a new variable isearch-check-overlays >> that could instruct isearch-range-invisible to not open overlays >> when it's non-nil that means we need only to check them, not open: > > Fine with me, but please make this change on master, not on emacs-27. Right decision, because org-mode is broken anyway, and this fix won't make it better. A test case that demonstrates the problem in org-mode: 0. emacs -Q 1. visit emacs/etc/ORG-NEWS 2. isearch for "http": C-s http C-s C-s C-s ... it eventually stops at org links where "http" is invisible, such as [[https://orgmode.org/worg/library-of-babel.html][here]] The problem is that org-mode puts the text property 'invisible' only when the link is scrolled into view, I guess it puts the property using font-lock. So at least in emacs-27 now it consistently counts all matches ignoring their visibility.