From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 40808@debbugs.gnu.org, abdullah@net-c.com
Subject: bug#40808: 27.0.91; inaccuracy in isearch-lazy-count
Date: Wed, 29 Apr 2020 23:56:32 +0300 [thread overview]
Message-ID: <874kt2586b.fsf@mail.linkov.net> (raw)
In-Reply-To: <83ftcm22c0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Apr 2020 10:11:43 +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.
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.
next prev parent reply other threads:[~2020-04-29 20:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 6:42 bug#40808: 27.0.91; inaccuracy in isearch-lazy-count Abdullah Asad
2020-04-25 20:53 ` Juri Linkov
2020-04-28 18:46 ` Abdullah Asad
2020-04-28 19:19 ` Eli Zaretskii
2020-04-28 23:54 ` Juri Linkov
2020-04-29 7:11 ` Eli Zaretskii
2020-04-29 20:56 ` Juri Linkov [this message]
2020-04-30 20:18 ` Juri Linkov
2020-05-01 5:58 ` Eli Zaretskii
2020-05-03 22:33 ` Juri Linkov
2020-05-24 21:45 ` bug#40808: Org-mode " Juri Linkov
2020-05-25 8:49 ` Bastien
2020-08-26 12:40 ` Stefan Kangas
-- strict thread matches above, loose matches on Subject: below --
2021-07-12 1:58 bug#40808: 27.0.91; " Drew Adams
2022-07-07 17:09 ` Juri Linkov
2022-07-08 17:48 ` Juri Linkov
2022-12-10 17:51 ` Juri Linkov
2022-12-12 17:44 ` Juri Linkov
2022-12-28 18:54 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kt2586b.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=40808@debbugs.gnu.org \
--cc=abdullah@net-c.com \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).