[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29360: 26.0; Add full-buffer choice for `isearch-lazy-highlight'

From: Drew Adams
Subject: bug#29360: 26.0; Add full-buffer choice for `isearch-lazy-highlight'
Date: Tue, 23 Oct 2018 15:51:14 -0700 (PDT)

> Bad news: when I tried to type an isearch string on a large file
> (about 1MB) after typing the first character 'e' lazy-highlighting
> became unresponsive busy highlighting all 50000 matches in that file.
> Do you think we should start lazy-highlighting for the full buffer
> only when the length of the search string is more than 1 character?

Absolutely.  Like with any similar interaction in
Emacs the delay before starting should be a user
option.  Users are different, and user machines etc.
are different.

Another possibility is for the option value to be
a choice of either:

* A non-negative number of seconds (or maybe natnump)
* A cons (SIZE . DELAY), where SIZE is the buffer-size 
  threshold: no delay if the buffer is no larger than
  this, and DELAY seconds delay if greater than this.

Another possibility, to accomplish the same thing (delay
and threshold) is to have two different options:

lazy-highlight-delay - just the delay
lazy-highlight-threshold - just the size threshold

The latter approach is what I use in Icicles, for
several such settings, e.g.
`icicle-incremental-completion-delay' and

But maybe the former approach is simpler.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]