From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: juri@linkov.net, 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 07:42:42 -0700 (PDT) [thread overview]
Message-ID: <6ef534bf-ecf3-48a4-9414-46de26d911c7@default> (raw)
In-Reply-To: <<83pp26373z.fsf@gnu.org>>
> > Please see the simple patch I sent, which I think takes care of this.
>
> If we are going to extend highlighting beyond the displayed portion of
> the buffer, then your proposed patch needs more work, IMO. AFAIU,
> with your patch, setting lazy-highlight-max-at-a-time to, say, 2000,
> will still limit the highlighting to the displayed portion, which
> makes little sense to me, as the probability of finding more than 2000
> matches in a single window-full is practically zero, and so the user's
> intent will not be honored (and the doc string will still be
> misleading).
Yes. As I said, more than once, the patch I submitted fixes the bug
only "for a nil value". And I added:
Feel free to adjust the fix. Or to extend it to also take a
numeric value into account. But I will be happy if it is fixed
at least for nil.
My immediate need, for which there is an easy, quick fix, is to make
the option work for nil.
I certainly agree that it would be good to also make it work for large
numeric values - which is why I invited such an additional fix. That
will be useful.
> Instead, I suggest to use a special non-nil value, e.g. zero or -1, to
> indicate a limit to the current window's end, and treat any other
> value literally, disregarding the window limits. (This will need to
> be reflected in the documentation, of course.) That special value
> should IMO be the default. Or maybe introduce a separate predicate
> option for whether to limit to window start and end.
That sounds OK to me.
Except that you did not explicitly mention nil. Do you mean, by treat
it literally, that it should behave for nil as it is advertised now:
no limit at all? If so then I agree.
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.
> Yes, this would be a backward-incompatible change, but I don't think
> the difference will matter too much in most use cases, especially with
> the default value of lazy-highlight-cleanup.
Because this has never worked before for areas beyond the window, it
does not really present backward compatibility problems. Unless you
are considering someone who has set the value to 99999999 and continues
to expect highlighting to be limited to the window.
> Btw, another issue that arises in this regard is whether to highlight
> beyond the screen only in the direction of the search (which AFAICS is
> what your proposed patch does) or in both directions, especially when
> the value of lazy-highlight-max-at-a-time is nil.
Good point. My patch is not good enough here, though it is enough to
temporarily switch directions (e.g., from C-s to C-r) to work around
this incompleteness.
That is the first (next) thing to do, I think: fix things completely
for nil, so that it highlights all search hits (both directions).
I will take another look when I get a chance, if no one beats me
to it.
That would also give users a real difference in behavior between a
very large number and nil, which is good. There should be a way,
which a very large number would provide, of getting a no-limit
behavior for only the current search direction. (My patch
currently does this (for nil), but that is not the behavior nil
should provide, IMO.)
I appreciate your interest in this and hope that we do get it
fixed.
next prev parent reply other threads:[~2015-08-29 14:42 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 [this message]
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
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
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=6ef534bf-ecf3-48a4-9414-46de26d911c7@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 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).