unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 25751@debbugs.gnu.org, antoine.levitt@gmail.com
Subject: bug#25751: Query replace lazy highlighting
Date: Sat, 18 Feb 2017 10:13:08 +0200	[thread overview]
Message-ID: <83mvdjrk6j.fsf@gnu.org> (raw)
In-Reply-To: <87poig2zwg.fsf@localhost> (message from Juri Linkov on Sat, 18 Feb 2017 00:52:47 +0200)

> From: Juri Linkov <juri@linkov.net>
> Cc: antoine.levitt@gmail.com,  25751@debbugs.gnu.org
> Date: Sat, 18 Feb 2017 00:52:47 +0200
> 
> > I think the problem is not that we remove the highlight and add it
> > anew, the problem is that there's a redisplay cycle in between the
> > removal and the following addition.  The fact that setting
> > lazy-highlight-initial-delay alleviates the problem to some extent,
> > but still leaves the flicker tells me that there's a call to sit-for
> > or some such somewhere in the code that processes replacements, and
> > the removal and addition of the highlight are on two different sides
> > of that sit-for call.  One possible solution would be to remove the
> > highlight and add it without triggering redisplay, then I'd expect the
> > flicker to go away.
> >
> > Does this make sense?
> 
> This feature is called _lazy_ highlighting where _lazy_ implies that it's
> intended to highlight matches much later after a lot of redisplay cycles.

You could still leave the "lazy" part, if you both remove and re-add
the overlays after the idle delay.  IOW, the important thing is not to
have redisplay between removal and addition of the highlight.





  reply	other threads:[~2017-02-18  8:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 13:18 bug#25751: Query replace lazy highlighting Antoine Levitt
2017-02-16 21:01 ` Juri Linkov
2017-02-16 22:45   ` Juri Linkov
2017-02-17  6:37   ` Eli Zaretskii
2017-02-17 22:52     ` Juri Linkov
2017-02-18  8:13       ` Eli Zaretskii [this message]
2017-02-18 23:17         ` Juri Linkov
2017-02-18 23:51           ` Drew Adams
2017-02-20  0:30             ` Juri Linkov
2017-02-21 23:22           ` 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=83mvdjrk6j.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25751@debbugs.gnu.org \
    --cc=antoine.levitt@gmail.com \
    --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).