From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Juri Linkov <juri@linkov.net>
Cc: 21092@debbugs.gnu.org
Subject: bug#21092: 25.0.50; Option `lazy-highlight-max-at-a-time' does not work
Date: Sat, 29 Aug 2015 22:39:15 -0700 (PDT) [thread overview]
Message-ID: <937da1eb-4e72-410e-b024-907f9ad7d253@default> (raw)
In-Reply-To: <83r3ml1ou6.fsf@gnu.org>
> > > IOW, I would like nil to behave as advertised: no limit. This is the
> > > use case that prompted me to file the bug and look for a solution.
> >
> > There is no bug. I have ‘lazy-highlight-max-at-a-time’ set to nil
> > in my .emacs for years, and it worked as intended to optimize the
> > performance of the screen-limited lazy-highlighting. Please don't break
> > this useful option. With your proposed changes Isearch will be horribly
> > slow to highlight all matches in a large buffer on every search state
> > change.
> >
> > There is no need to highlight all matches in the buffer during Isearch.
>
> What if someone wants to?
>
> > If you want a new feature, please create a new feature request
> > with a subject like ‘Feature request: lazy-hi-lock on Isearch exit’
> > that will highlight all matches in the buffer after you exit Isearch.
>
> How about leaving the current meaning of nil as it is, i.e. limit the
> highlighting to the visible portion of the buffer, and introducing a
> special value like zero or -1 to mean highlight the whole buffer?
As I said earlier, I'm all for adding additional specific arguments
for different behaviors - whatever is needed.
But "the current meaning of nil", as it is documented, is not what
the behavior is. I respect Juri's argument that the bug is quite
old and that some people might be used to nil not doing what has been
advertised for it and want it to continue doing what it has long been
doing. That's a reasonable argument.
Personally, I would prefer that nil be made to act as advertised, but
it is OK with me if the decision is to keep the nil behavior as it is
now, and so change its meaning from what is currently documented (IOW,
change the doc and Customize UI so that they fit what nil currently
does), as long as there is some (new) value for the option that does
what the doc has been saying nil does: highlight all search hits -
no limit on the highlighting.
I don't care whether you call this a new feature or a bug fix.
To me it is a bug fix, as indications are that the fixed behavior
was the originally intended behavior. But who really knows? It
doesn't matter to me what we call it.
To me it is very useful to be able to have lazy highlighting
highlight all search hits. To mention a use case, in case it makes
any difference to you:
I have code that lets you hit a key to search again (different
search pattern) during the same or a subsequent Isearch invocation,
and have this second search be limited _within_ the previous
search hits. That is, the lazy-highlight zones from one search act
as the search contexts (limits) for the next search. You can
repeat this etc.
This is a kind of progressive narrowing.
And I have code that lets you search within defined areas (think
of multiple regions), and there too you can hit a (different)
key to refine the search. In this case, whole contexts that did
not have a search hit from the first search are removed as
candidates for the next search. IOW, the current search hits
narrow the set of contexts for subsequent searching.
This is another kind of progressive narrowing.
In both cases, subsequent searches may well hit places that
were offscreen during previous searches, because the addition
of constraints (reduction of contexts) can reduce the matches.
In this use case, it can be (and typically is) useful to
lazy-highlight all search hits and (typically) to turn off
`lazy-highlight-cleanup'.
next prev parent reply other threads:[~2015-08-30 5:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<9e1b9e19-6a1e-4241-a3e6-2876509e1423@default>
[not found] ` <<7245a30d-355a-425e-b19b-1c9ecc5e94e3@default>
[not found] ` <<83lhcv4wp4.fsf@gnu.org>
2015-08-28 15:19 ` bug#21092: 25.0.50; Option `lazy-highlight-max-at-a-time' does not work Drew Adams
2015-08-28 15:46 ` Eli Zaretskii
2015-08-28 21:14 ` Juri Linkov
2015-08-28 21:43 ` Drew Adams
2015-08-29 7:07 ` Eli Zaretskii
[not found] ` <<56e13714-27a7-47f9-93df-299b4a25457d@default>
[not found] ` <<83wpwf2z6m.fsf@gnu.org>
2015-08-28 15:59 ` Drew Adams
2015-08-28 16:03 ` Eli Zaretskii
[not found] ` <<e4ec2bca-0db5-43ba-a100-e99601d39e4c@default>
[not found] ` <<83twrj2ye6.fsf@gnu.org>
2015-08-28 16:15 ` Drew Adams
2015-08-28 16:44 ` Drew Adams
2015-08-28 16:59 ` Drew Adams
[not found] ` <<87si73dsjt.fsf@mail.linkov.net>
[not found] ` <<b0d4a886-77ae-4b58-b1b8-3b15999f5052@default>
[not found] ` <<83pp26373z.fsf@gnu.org>
2015-08-29 14:42 ` Drew Adams
2015-08-29 21:10 ` Juri Linkov
2015-08-30 2:40 ` Eli Zaretskii
2015-08-30 5:39 ` Drew Adams [this message]
2015-08-30 20:58 ` Juri Linkov
2015-08-30 22:39 ` Drew Adams
2015-08-31 20:01 ` Juri Linkov
2015-08-31 21:35 ` Drew Adams
2015-09-01 22:55 ` Juri Linkov
2015-09-02 0:07 ` Drew Adams
2015-09-02 22:40 ` Juri Linkov
2015-12-24 0:47 ` Juri Linkov
2017-02-22 0:16 ` Juri Linkov
2015-07-19 13:36 Drew Adams
2015-08-27 20:29 ` Drew Adams
2015-08-28 8:57 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=937da1eb-4e72-410e-b024-907f9ad7d253@default \
--to=drew.adams@oracle.com \
--cc=21092@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.