From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>
Cc: 29360@debbugs.gnu.org
Subject: bug#29360: 26.0; Add full-buffer choice for `isearch-lazy-highlight'
Date: Mon, 20 Nov 2017 14:40:52 -0800 (PST) [thread overview]
Message-ID: <36f5e57c-2eb3-45eb-ae43-3f8fdf7586dd@default> (raw)
In-Reply-To: <87shd8lli4.fsf@mail.linkov.net>
> > See bug #21092 for the motivation and reasons behind this bug report.
> > The aim of that bug report was never taken care of, which was to let
> > you force lazy-highlight highlighting on the full visible portion of
> > the buffer (where that refers to the full buffer or the current
> > buffer restriction). IOW, optionally do not restrict highlighting
> > to what is currently on screen, as is done now.
> >
> > The #21092 bug report mistakenly took a `nil' value of
> > `lazy-highlight-max-at-a-time' as meaning just that - just what the doc
> > said: act on the full buffer, not just on the text that is currently in
> > the window. The true meaning of nil for that variable is just to
> > highlight all of the search hits visible in the window.
> >
> > This new bug aims to finally get what was really being requested in
> > #21092: the ability to cause lazy highlight to act on the full buffer,
> > not just the text currently visible in the window.
> >
> > The outcome of #21092 and other bugs led to the creation of variable
> > `isearch-lazy-highlight'. At the end of #21092, realizing that closing
> > #21092 did not, in fact, respond to the aim of #21092, Juri suggested
> > that a separate report be filed, to request a new possible value for
> > `isearch-lazy-highlight' which will cause the full buffer to get the
> > lazy-highlight highlighting. That is the purpose of this bug report:
> > please add such a `buffer' or `full-buffer' value.
>
> Are you sure this should be part of isearch, not hi-lock?
Yes.
> Isearch used to highlight only the visible part of the buffer
Isearch also used to highlight only the current search hit -
no lazy-highlighting at all. So what? Did someone back
then argue that we shouldn't add lazy highlighting because
Isearch is only about finding the next search hit? No.
Highlighting all visible hits is an improvement over the
pre-Emacs 22 behavior. Being able to optionally highlight
all hits (visible in the window or not) adds other advantages.
> because it is modal and doesn't allow the user to scroll the
> current search match out of view. Whereas hi-lock is intended
> to highlight all matches in the whole buffer.
Just because Isearch has not previously had an option to
highlight all matches is not a reason it should not offer
such an option. This is only about _optional_ behavior; it
proposes no change to the default lazy-highlighting behavior.
No relation to hi-lock. This is not about font-lock
highlighting. It is about the "lazy-highlighting"
of Isearch, during Isearch, for Isearch, being extended
to cover the whole buffer. It is about incremental
search: being able to change the set of matches incrementally.
You can (now) set `lazy-highlight-cleanup' to nil (you can
even toggle it during Isearch) to keep the lazy-highlighting
when search is done. That can be very useful.
And doing likewise without needing to totally exit Isearch
can also be useful, e.g., to search only _within_ the lazy
highlights - i.e., progressing search narrowing. E.g,
combine multiple simple regexps (ANDing them) vs trying to
come up with a single, complex regexp to do the same thing.
Or being able to flip to searching the complement of the
lazy highlights.
Any such features expect, to be really useful, that the
lazy-highlighted zones include all of the search hits,
over the entire search space. They are about a new
search that is related to the previous search. They
should not be limited to whatever hits were visible in
the current window for the previous search.
Just because this is not the classic Isearch use case is
not a reason it isn't usefully added to Isearch. It is
only about isearching - isearching zones that have been
found by isearching. It's about isearching isearches...
Any argument about not being able to see highlighting past
the window is irrelevant - this is not about scrolling.
The motivation was already discussed in bug #21092. That
bug should have taken care of this, but I expressed the
need in terms of `lazy-highlight-max-at-a-time', having
misunderstood that variable's purpose because its doc
string described, for a nil value, just what this bug
(#29360) asks for.
next prev parent reply other threads:[~2017-11-20 22:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 19:05 bug#29360: 26.0; Add full-buffer choice for `isearch-lazy-highlight' Drew Adams
2017-11-20 20:53 ` Juri Linkov
2017-11-20 22:40 ` Drew Adams [this message]
2017-11-23 21:49 ` Juri Linkov
2017-11-23 23:53 ` Drew Adams
2018-10-18 5:47 ` Drew Adams
2018-10-18 22:18 ` Juri Linkov
2018-10-18 23:25 ` Drew Adams
2018-10-20 17:10 ` Drew Adams
2018-10-20 22:12 ` Juri Linkov
2018-10-20 23:09 ` Drew Adams
2018-10-21 19:06 ` Juri Linkov
2018-10-22 3:33 ` Drew Adams
2018-10-23 22:05 ` Juri Linkov
2018-10-23 22:51 ` Drew Adams
2018-10-24 23:11 ` Juri Linkov
2018-10-25 0:28 ` Drew Adams
2018-10-27 20:28 ` 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=36f5e57c-2eb3-45eb-ae43-3f8fdf7586dd@default \
--to=drew.adams@oracle.com \
--cc=29360@debbugs.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 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).