From: Drew Adams <drew.adams@oracle.com>
To: 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: Mon, 31 Aug 2015 14:35:31 -0700 (PDT) [thread overview]
Message-ID: <719ef340-0997-40fe-b1d8-c20c2a69155e@default> (raw)
In-Reply-To: <87y4grw7kx.fsf@mail.linkov.net>
> > You clearly do not want this done.
>
> Not at all. I only disagree that it's a bug.
Good to hear. But it sure didn't sound like it:
J >>> There is no need to highlight all matches in the buffer
J >>> during Isearch.
E >> What if someone wants to?
J > Why would someone want such a strange thing?
Anyway, I'm glad you agree now that such a strange thing can be useful.
> ‘lazy-highlight-max-at-a-time’ is just an optimization variable
> along with ‘lazy-highlight-initial-delay’, ‘lazy-highlight-interval’
> that users might want to tweak to improve performance where nil of
> ‘lazy-highlight-max-at-a-time’ allows highlighting in one loop
> that avoids delays on fast processors (it makes sense to change
> its default value to nil to match the modern hardware).
>
> A new feature to highlight the whole buffer would be useful as well
> to reduce flickering during Isearch. Currently when e.g. scrolling
> by one line lazy-highlight clears all matches on the screen, and
> re-highlights them with an additional line taken into account.
> That's because lazy-highlight is non-incremental.
Whole buffer OR rest-of-buffer forward or backward. Au choix.
Both behaviors are useful.
> Highlighting the whole buffer could fix this visual effect.
> So unlike the current screen-limited lazy-highlighting that reacts
> to window-start/window-end changes, once whole-buffer lazy-highlighting
> finds all matches in the buffer it doesn't need to re-highlight them
> during Isearch navigation.
>
> A new option could be named e.g. (defcustom lazy-highlight-buffer nil)
> Again, its default value is depending on the average hardware.
> While I believe that highlighting all matches on the screen
> is suitable for most users, I'm not sure about highlighting
> all matches in a (possibly large) buffer in one loop.
It's not clear how you see the two options interacting (or not).
If you are telling Isearch to highlight all matches and you are
also telling it to highlight at most 10, for example. And what
about the current nil value of `lazy-highlight-max-at-a-time',
which also says (currently) that it means highlight "all"?
Not clear why you want a separate option for this. It cannot be
used in combination with `lazy-highlight-max-at-a-time', can it?
If the behaviors are mutually exclusive, then why not just add
another value or two for `lazy-highlight-max-at-a-time'?
A second question concerns how to control whether this acts
only in the current search direction or in both directions.
In the patch I sent, a user gets all matches in the search
direction. If s?he wants all matches in both directions it is
enough to briefly hit the other direction key (e.g. hit `C-r'
if searching forward).
The use I make of the all-matches behavior will be togglable,
and I will want to control what the behaviors toggled are.
For exmaple, I might want a toggle between max=10 and
whole-buffer. Or between whole-buffer and remainder-of-buffer
(in search direction).
> > whether it's searching within the active region (not needed,
> > since a user can always narrow the buffer);
>
> Because it's more useful to extend the bounds of the active
> region using Isearch.
Dunno what that means. Please elaborate. And please say why
you think it is always more useful than limiting search to the
region.
Whatever you mean by it, why should it be a question only of
design-time either-or?
In Isearch+, limitation of search to the active region is
optional, and you can change the behavior anytime on the fly
(toggle `C-x n'). (Deactivation of the active region is also
optional.)
> > search within text- or overlay-property zones;
>
> There is an unfinished feature request bug#15245.
On-demand replacement of search hits is available in Isearch+.
At the time I replied in that bug thread, I guess I had not yet
added this feature. It seems I added it a month after I posted
there. Anyway, that too is available. AFAIK, with Isearch+ you
can do all that is requested in the bug.
And as you say in the bug thread, you can also limit
`query-replace' to such text zones using `isearch-filter-predicate'.
> > on-demand replacement of search hits during search
>
> Can you find a bug# for this?
It's not a bug, AFAIK. It's an Isearch+ feature.
http://www.emacswiki.org/emacs/IsearchPlus#isearchp-replace-on-demand
You can perform an arbitrary action on the current search hit,
on demand. By default, the action is replacement.
> > Please at least fix the doc so that it matches what the
> > code does, whether or not that matches what the original
> > intention was.
>
> Then the docstring could point to the new option
> ‘lazy-highlight-buffer’.
See above. I'm all for adding the ability to highlight beyond
the current window, and I am glad to hear you are also for it.
But it's unclear why a separate option should be used, instead
of additional option values for `lazy-highlight-max-at-a-time'.
And it's unclear how a user can get up-to-the-buffer/region-limit
behavior in one direction only.
next prev parent reply other threads:[~2015-08-31 21:35 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
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 [this message]
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=719ef340-0997-40fe-b1d8-c20c2a69155e@default \
--to=drew.adams@oracle.com \
--cc=21092@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 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.