GNU bug report logs - #40808
27.0.91; inaccuracy in isearch-lazy-count

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Abdullah Asad <abdullah@HIDDEN>; dated Fri, 24 Apr 2020 07:21:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 24 May 2020 22:10:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 18:10:17 2020
Received: from localhost ([127.0.0.1]:38984 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcyoy-00009g-Ui
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 18:10:17 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:38381)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jcyox-00009Q-FO
 for 40808 <at> debbugs.gnu.org; Sun, 24 May 2020 18:10:15 -0400
X-Originating-IP: 91.129.108.6
Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6])
 (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id DC83E20002;
 Sun, 24 May 2020 22:10:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Bastien <bzg@HIDDEN>
Subject: Re: bug#40808: Org-mode inaccuracy in isearch-lazy-count
Organization: LINKOV.NET
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
 <83o8rb1kra.fsf@HIDDEN> <87mu6vkvz5.fsf@HIDDEN>
 <83ftcm22c0.fsf@HIDDEN> <874kt2586b.fsf@HIDDEN>
 <87y2qcsp6n.fsf@HIDDEN> <83k11ww61j.fsf@HIDDEN>
 <87d07k1wgr.fsf@HIDDEN>
Date: Mon, 25 May 2020 00:45:29 +0300
In-Reply-To: <87d07k1wgr.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 04 May 2020 01:33:04 +0300")
Message-ID: <87h7w5vxdi.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Bastien,

Could you please look at this problem as well:

>>> - but this fix is pointless for org-mode where visiting invisible
>>>   matches is broken, and where its count varies after visiting
>>>   and opening hidden overlays.
>>
>> Would it be possible to fix the breakage in Org on master?
>
> We need help from Org developers to fix the breakage in Org.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 3 May 2020 22:33:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 03 18:33:21 2020
Received: from localhost ([127.0.0.1]:58347 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jVNAn-00043v-Gi
	for submit <at> debbugs.gnu.org; Sun, 03 May 2020 18:33:21 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:60699)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jVNAl-00043e-D7
 for 40808 <at> debbugs.gnu.org; Sun, 03 May 2020 18:33:19 -0400
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 3D5FA200004;
 Sun,  3 May 2020 22:33:11 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
Organization: LINKOV.NET
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
 <83o8rb1kra.fsf@HIDDEN> <87mu6vkvz5.fsf@HIDDEN>
 <83ftcm22c0.fsf@HIDDEN> <874kt2586b.fsf@HIDDEN>
 <87y2qcsp6n.fsf@HIDDEN> <83k11ww61j.fsf@HIDDEN>
Date: Mon, 04 May 2020 01:33:04 +0300
In-Reply-To: <83k11ww61j.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 01 May
 2020 08:58:00 +0300")
Message-ID: <87d07k1wgr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org, abdullah@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I'm still unsure about pushing this change.  The current state of things:
>>
>> - in emacs-27 and master now it counts all matches, including invisible,
>>   regardless of the value of search-invisible;
>>
>> - the proposed change for master doesn't include in the count these
>>   invisible matches that can't be visited by opening overlays;
>>
>> - but this fix is pointless for org-mode where visiting invisible
>>   matches is broken, and where its count varies after visiting
>>   and opening hidden overlays.
>
> Would it be possible to fix the breakage in Org on master?

We need help from Org developers to fix the breakage in Org.

Meanwhile, I reverted a part of the recent fix on emacs-27
that tried to fix a long-standing corner case of lazy-highlighting
in outlines, but whose side-effect might slow down lazy-highlighting
in collapsed outlines.  This needs more testing on master.

Whereas the fix for isearch-lazy-count still remains in the release branch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 1 May 2020 05:58:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 01 01:58:26 2020
Received: from localhost ([127.0.0.1]:48110 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jUOgo-0002BL-Oc
	for submit <at> debbugs.gnu.org; Fri, 01 May 2020 01:58:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43808)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jUOgm-0002B8-VN
 for 40808 <at> debbugs.gnu.org; Fri, 01 May 2020 01:58:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38016)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jUOgg-0003Co-HB; Fri, 01 May 2020 01:58:14 -0400
Received: from [176.228.60.248] (port=4834 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jUOgf-00070g-5e; Fri, 01 May 2020 01:58:14 -0400
Date: Fri, 01 May 2020 08:58:00 +0300
Message-Id: <83k11ww61j.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87y2qcsp6n.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 30 Apr 2020 23:18:08 +0300)
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
 <83o8rb1kra.fsf@HIDDEN> <87mu6vkvz5.fsf@HIDDEN>
 <83ftcm22c0.fsf@HIDDEN> <874kt2586b.fsf@HIDDEN>
 <87y2qcsp6n.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org, abdullah@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: 40808 <at> debbugs.gnu.org,  abdullah@HIDDEN
> Date: Thu, 30 Apr 2020 23:18:08 +0300
> 
> I'm still unsure about pushing this change.  The current state of things:
> 
> - in emacs-27 and master now it counts all matches, including invisible,
>   regardless of the value of search-invisible;
> 
> - the proposed change for master doesn't include in the count these
>   invisible matches that can't be visited by opening overlays;
> 
> - but this fix is pointless for org-mode where visiting invisible
>   matches is broken, and where its count varies after visiting
>   and opening hidden overlays.

Would it be possible to fix the breakage in Org on master?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 30 Apr 2020 20:24:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 30 16:24:51 2020
Received: from localhost ([127.0.0.1]:47783 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jUFjn-0003rg-Em
	for submit <at> debbugs.gnu.org; Thu, 30 Apr 2020 16:24:51 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:62053)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jUFjk-0003r3-Ot
 for 40808 <at> debbugs.gnu.org; Thu, 30 Apr 2020 16:24:49 -0400
X-Originating-IP: 91.129.106.11
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 267C3240009;
 Thu, 30 Apr 2020 20:24:40 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
Organization: LINKOV.NET
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
 <83o8rb1kra.fsf@HIDDEN> <87mu6vkvz5.fsf@HIDDEN>
 <83ftcm22c0.fsf@HIDDEN> <874kt2586b.fsf@HIDDEN>
Date: Thu, 30 Apr 2020 23:18:08 +0300
In-Reply-To: <874kt2586b.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 29 Apr 2020 23:56:32 +0300")
Message-ID: <87y2qcsp6n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org, abdullah@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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.

I'm still unsure about pushing this change.  The current state of things:

- in emacs-27 and master now it counts all matches, including invisible,
  regardless of the value of search-invisible;

- the proposed change for master doesn't include in the count these
  invisible matches that can't be visited by opening overlays;

- but this fix is pointless for org-mode where visiting invisible
  matches is broken, and where its count varies after visiting
  and opening hidden overlays.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 29 Apr 2020 20:59:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 16:59:24 2020
Received: from localhost ([127.0.0.1]:44795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTtng-00073U-8a
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 16:59:24 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:60005)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jTtnd-000734-Bw
 for 40808 <at> debbugs.gnu.org; Wed, 29 Apr 2020 16:59:21 -0400
X-Originating-IP: 91.129.106.11
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 87CB340003;
 Wed, 29 Apr 2020 20:59:14 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
Organization: LINKOV.NET
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
 <83o8rb1kra.fsf@HIDDEN> <87mu6vkvz5.fsf@HIDDEN>
 <83ftcm22c0.fsf@HIDDEN>
Date: Wed, 29 Apr 2020 23:56:32 +0300
In-Reply-To: <83ftcm22c0.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 29 Apr
 2020 10:11:43 +0300")
Message-ID: <874kt2586b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org, abdullah@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 29 Apr 2020 07:12:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 03:12:09 2020
Received: from localhost ([127.0.0.1]:42216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTgt7-0002jZ-6V
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 03:12:09 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42024)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jTgt5-0002jK-Kb
 for 40808 <at> debbugs.gnu.org; Wed, 29 Apr 2020 03:12:08 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49379)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jTgsz-0004rg-Pl; Wed, 29 Apr 2020 03:12:01 -0400
Received: from [176.228.60.248] (port=4145 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jTgsy-0003ta-Tm; Wed, 29 Apr 2020 03:12:01 -0400
Date: Wed, 29 Apr 2020 10:11:43 +0300
Message-Id: <83ftcm22c0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87mu6vkvz5.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 29 Apr 2020 02:54:06 +0300)
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
 <83o8rb1kra.fsf@HIDDEN> <87mu6vkvz5.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org, abdullah@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Abdullah Asad <abdullah@HIDDEN>,  40808 <at> debbugs.gnu.org
> Date: Wed, 29 Apr 2020 02:54:06 +0300
> 
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 28 Apr 2020 23:58:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 19:58:25 2020
Received: from localhost ([127.0.0.1]:41905 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTa78-0000bF-KU
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 19:58:25 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:35009)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jTa77-0000an-6e
 for 40808 <at> debbugs.gnu.org; Tue, 28 Apr 2020 19:58:09 -0400
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id C52D024000B;
 Tue, 28 Apr 2020 23:58:01 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
Organization: LINKOV.NET
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
 <83o8rb1kra.fsf@HIDDEN>
Date: Wed, 29 Apr 2020 02:54:06 +0300
In-Reply-To: <83o8rb1kra.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 28 Apr
 2020 22:19:05 +0300")
Message-ID: <87mu6vkvz5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org, Abdullah Asad <abdullah@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

>> So, what is decided. Is it getting patched for emacs-27?
>
> Yes, it's fine with me.  Thanks.

Now pushed to emacs-27.

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:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=isearch-check-overlays.patch

diff --git a/lisp/isearch.el b/lisp/isearch.el
index e13a4dda83..0ad97a092f 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3535,6 +3535,7 @@ isearch-close-unnecessary-overlays
 	    (overlay-put ov 'invisible (overlay-get ov 'isearch-invisible))
 	    (overlay-put ov 'isearch-invisible nil)))))))
 
+(defvar isearch-check-overlays nil)
 
 (defun isearch-range-invisible (beg end)
   "Return t if all the text from BEG to END is invisible."
@@ -3546,7 +3547,7 @@ isearch-range-invisible
 	    (can-be-opened (eq search-invisible 'open))
 	    ;; the list of overlays that could be opened
 	    (crt-overlays nil))
-	(when (and can-be-opened isearch-hide-immediately)
+	(when (and can-be-opened isearch-hide-immediately (not isearch-check-overlays))
 	  (isearch-close-unnecessary-overlays beg end))
 	;; If the following character is currently invisible,
 	;; skip all characters with that same `invisible' property value.
@@ -3585,9 +3586,10 @@ isearch-range-invisible
 	(if (>= (point) end)
 	    (if (and can-be-opened (consp crt-overlays))
 		(progn
-		  (setq isearch-opened-overlays
-			(append isearch-opened-overlays crt-overlays))
-		  (mapc 'isearch-open-overlay-temporary crt-overlays)
+		  (unless isearch-check-overlays
+		    (setq isearch-opened-overlays
+			  (append isearch-opened-overlays crt-overlays))
+		    (mapc 'isearch-open-overlay-temporary crt-overlays))
 		  nil)
 	      (setq isearch-hidden t)))))))
 
@@ -3880,8 +3885,10 @@ isearch-lazy-highlight-search
 	  (if (or (not success)
 		  (= (point) bound) ; like (bobp) (eobp) in `isearch-search'.
 		  (= (match-beginning 0) (match-end 0))
-		  (funcall isearch-filter-predicate
-			   (match-beginning 0) (match-end 0)))
+		  (let ((search-invisible (and search-invisible 'open))
+		        (isearch-check-overlays t))
+		    (funcall isearch-filter-predicate
+			     (match-beginning 0) (match-end 0))))
 	      (setq retry nil)))
 	success)
     (error nil)))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 28 Apr 2020 19:19:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 15:19:47 2020
Received: from localhost ([127.0.0.1]:41551 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTVlU-0001Zv-Tm
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 15:19:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54696)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jTVlT-0001Zj-JY
 for 40808 <at> debbugs.gnu.org; Tue, 28 Apr 2020 15:19:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38817)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jTVlN-0004di-HH; Tue, 28 Apr 2020 15:19:25 -0400
Received: from [176.228.60.248] (port=4475 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jTVlM-0002xf-W6; Tue, 28 Apr 2020 15:19:25 -0400
Date: Tue, 28 Apr 2020 22:19:05 +0300
Message-Id: <83o8rb1kra.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Abdullah Asad <abdullah@HIDDEN>
In-Reply-To: <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN> (message from
 Abdullah Asad on Wed, 29 Apr 2020 00:16:39 +0530)
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
 <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Abdullah Asad <abdullah@HIDDEN>
> Date: Wed, 29 Apr 2020 00:16:39 +0530
> Cc: 40808 <at> debbugs.gnu.org
> 
> > Eli, do you agree with this patch for emacs-27.
> So, what is decided. Is it getting patched for emacs-27?

Yes, it's fine with me.  Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 28 Apr 2020 18:53:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 14:53:47 2020
Received: from localhost ([127.0.0.1]:41513 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTVMY-0007Hn-SI
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 14:53:47 -0400
Received: from relay-2.mailobj.net ([213.182.54.5]:59952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdullah@HIDDEN>) id 1jTVF7-0005uu-Ru
 for 40808 <at> debbugs.gnu.org; Tue, 28 Apr 2020 14:46:07 -0400
Received: from v-1c.localdomain (unknown [192.168.90.161])
 by relay-2.mailobj.net (Postfix) with SMTP id 692DF12E1;
 Tue, 28 Apr 2020 20:45:59 +0200 (CEST)
Received: by mail-1.net-c.com [213.182.54.15] with ESMTP
 Tue, 28 Apr 2020 20:45:59 +0200 (CEST)
X-EA-Auth: La5W79SmyYhCLguknKm37xrd4T/TSB6sGGN/GjvsFRwchXt+C8DKNFyXf3RLuzTColbmCOpNyTCFdc3/JljBRARnBcoGqcgAQS2zkF22Vng=
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
To: Juri Linkov <juri@HIDDEN>
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
 <87ftcrux08.fsf@HIDDEN>
From: Abdullah Asad <abdullah@HIDDEN>
Message-ID: <da0f79a7-5b19-7c34-edaf-5c52402db4e7@HIDDEN>
Date: Wed, 29 Apr 2020 00:16:39 +0530
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <87ftcrux08.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40808
X-Mailman-Approved-At: Tue, 28 Apr 2020 14:53:46 -0400
Cc: 40808 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Eli, do you agree with this patch for emacs-27.
So, what is decided. Is it getting patched for emacs-27?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at 40808 <at> debbugs.gnu.org:


Received: (at 40808) by debbugs.gnu.org; 25 Apr 2020 20:54:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 25 16:54:41 2020
Received: from localhost ([127.0.0.1]:60472 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jSRou-00070m-Q8
	for submit <at> debbugs.gnu.org; Sat, 25 Apr 2020 16:54:41 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:45955)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jSRop-00070K-TT
 for 40808 <at> debbugs.gnu.org; Sat, 25 Apr 2020 16:54:36 -0400
X-Originating-IP: 91.129.106.11
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id C3B3E20003;
 Sat, 25 Apr 2020 20:54:29 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Abdullah Asad <abdullah@HIDDEN>
Subject: Re: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
Organization: LINKOV.NET
References: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
Date: Sat, 25 Apr 2020 23:53:39 +0300
In-Reply-To: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN> (Abdullah Asad's
 message of "Fri, 24 Apr 2020 12:12:39 +0530")
Message-ID: <87ftcrux08.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40808
Cc: 40808 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> When using isearch with isearch-lazy-count in org mode with heading
> collapsed isearch gives wrong number of matches (both total & current).
>
> Reproducing it is simple just enable isearch-lazy-count and perform
> isearch in org buffer with collapsed heading.

Thanks for bringing up this question, it will help to fix this feature
for the upcoming release.  I tend to agree that isearch-lazy-count
should show the number of *all* matches in the buffer, even the matches that
are invisible, and that can be opened when visited by isearch navigation.

Eli, do you agree with this patch for emacs-27.  It counts all matches, even
invisible.  And also it fixes an old bug existed in previous Emacs versions
where lazy-highlight didn't update lazy-highlighting when a hidden outline
was automatically opened at the end of the file (I noticed this bug only now).

So the condition ‘(eq search-invisible 'open)’ fixes an old bug, and
the condition ‘isearch-lazy-count’ fixes the new feature added in emacs-27:

diff --git a/lisp/isearch.el b/lisp/isearch.el
index e13a4dda83..ed1097c5ea 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -319,7 +319,7 @@ isearch-lazy-count
   "Show match numbers in the search prompt.
 When both this option and `isearch-lazy-highlight' are non-nil,
 show the current match number and the total number of matches
-in the buffer (or its restriction)."
+in the buffer (or its restriction), including all hidden matches."
   :type 'boolean
   :group 'lazy-count
   :group 'isearch
@@ -3869,7 +3871,8 @@ isearch-lazy-highlight-search
 	    (isearch-regexp-lax-whitespace
 	     isearch-lazy-highlight-regexp-lax-whitespace)
 	    (isearch-forward isearch-lazy-highlight-forward)
-	    (search-invisible nil)	; don't match invisible text
+            ;; don't match invisible text unless it can open or counting matches
+            (search-invisible (or (eq search-invisible 'open) isearch-lazy-count))
 	    (retry t)
 	    (success nil))
 	;; Use a loop like in `isearch-search'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Apr 2020 07:20:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 24 03:20:20 2020
Received: from localhost ([127.0.0.1]:56312 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jRsdH-0001a4-Ji
	for submit <at> debbugs.gnu.org; Fri, 24 Apr 2020 03:20:20 -0400
Received: from lists.gnu.org ([209.51.188.17]:41911)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdullah@HIDDEN>) id 1jRs36-0000ew-8b
 for submit <at> debbugs.gnu.org; Fri, 24 Apr 2020 02:42:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38270)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <abdullah@HIDDEN>) id 1jRs35-0003Ty-RP
 for bug-gnu-emacs@HIDDEN; Fri, 24 Apr 2020 02:42:56 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 
 SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <abdullah@HIDDEN>) id 1jRs34-0003of-Uc
 for bug-gnu-emacs@HIDDEN; Fri, 24 Apr 2020 02:42:55 -0400
Received: from relay-2.mailobj.net ([213.182.54.5]:45602)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <abdullah@HIDDEN>)
 id 1jRs34-0003WA-CB
 for bug-gnu-emacs@HIDDEN; Fri, 24 Apr 2020 02:42:54 -0400
Received: from v-2c.localdomain (unknown [192.168.90.162])
 by relay-2.mailobj.net (Postfix) with SMTP id C18E11302
 for <bug-gnu-emacs@HIDDEN>; Fri, 24 Apr 2020 08:42:49 +0200 (CEST)
Received: by mail-2.net-c.com [213.182.54.29] with ESMTP
 Fri, 24 Apr 2020 08:42:49 +0200 (CEST)
X-EA-Auth: dIe24bWeVDBtpU0TJsOm9f5Js6E9Wbibxz4e//6he3AmS841rQdUs2VN7EmyK0GDmSeXB9kXOIiWgnr1wpwlEpXlwv5ADJ4nveonaZnxZcU=
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.91; inaccuracy in isearch-lazy-count
From: Abdullah Asad <abdullah@HIDDEN>
Message-ID: <41ce1bd9-2ddb-a46b-3cb9-2b1b25e48438@HIDDEN>
Date: Fri, 24 Apr 2020 12:12:39 +0530
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
Received-SPF: pass client-ip=213.182.54.5; envelope-from=abdullah@HIDDEN;
 helo=relay-2.mailobj.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/24 02:42:49
X-ACL-Warn: Detected OS   = Linux 3.1-3.10 [fuzzy]
X-Received-From: 213.182.54.5
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 24 Apr 2020 03:20:17 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

When using isearch with isearch-lazy-count in org mode with heading
collapsed isearch gives wrong number of matches (both total & current).

Reproducing it is simple just enable isearch-lazy-count and perform
isearch in org buffer with collapsed heading.

In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.17)
of 2020-04-23 built on notArch
Windowing system distributor 'The X.Org Foundation





Acknowledgement sent to Abdullah Asad <abdullah@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#40808; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 24 May 2020 22:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.