all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Drew Adams <drew.adams@oracle.com>
Cc: 29360@debbugs.gnu.org
Subject: bug#29360: 26.0; Add full-buffer choice for `isearch-lazy-highlight'
Date: Fri, 19 Oct 2018 01:18:21 +0300	[thread overview]
Message-ID: <87va5yhpaq.fsf@mail.linkov.net> (raw)
In-Reply-To: <60f1b355-7455-4bb9-ae3d-294e1494a9d9@default> (Drew Adams's message of "Wed, 17 Oct 2018 22:47:26 -0700 (PDT)")

> It would really be good if this enhancement were made - for the
> reasons I gave in bug #21092, and for other reasons. You asked me
> (in bug #21092) to file this bug if I thought we needed such a
> full-buffer possibility. This enhancement request was the result.

Actually, a full-buffer lazy-highlighting possibility already exists:

  (setq lazy-highlight-cleanup nil)
  (add-hook 'isearch-mode-end-hook
            (lambda ()
              (setq window-group-start-function (lambda (_w) (point-min)))
              (setq window-group-end-function (lambda (_w _u) (point-max)))))

But I agree that more straightforward customization would be better
with a clear value of the customizable variable.

> Did you not have a patch that took care of this? IIRC you then found
> a problem with it wrt `follow-mode', but I thought you had a solution
> for that too. (I thought the latter solution was provided by Artur's
> `all-windows' value for `isearch-lazy-highlight' etc., which was added.)

That patch was installed more than a year ago.

> What's the status of this feature? Can we add it to Emacs now?
> I hope so.

The reason why it's not yet finished is because it was unclear how to
integrate it with another similar feature of matches-counting (that counts
the number of matches in the full buffer).  The reasoning is the following:
both features require using the same loop in isearch-lazy-highlight
extending it to operate on the full buffer.  I know you will argue that
these are unrelated features and should be treated separately.
But implementation-wise they have only one difference:

1. buffer-matches-highlighting visits all matches and highlights them;

2. buffer-matches-counting visits all matches but doesn't highlight them
   (only counts)

Both need special treatment for possible slowdown in a
large buffer, so for performance reasons we need to add
a new customizable variable like lazy-buffer-max-at-a-time,
separate not to conflict with lazy-highlight-max-at-a-time.
The latter applies to the matches on the screen, the former
to the matches in the full buffer.





  reply	other threads:[~2018-10-18 22:18 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va5yhpaq.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=29360@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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.