From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#25751: Query replace lazy highlighting Date: Mon, 20 Feb 2017 02:30:06 +0200 Organization: LINKOV.NET Message-ID: <87fuj9k8px.fsf@localhost> References: <87mvdmxoig.fsf@lambda> <87wpcpx32v.fsf@localhost> <83d1ehxqzd.fsf@gnu.org> <87poig2zwg.fsf@localhost> <83mvdjrk6j.fsf@gnu.org> <87h93rcffj.fsf@localhost> <06b2d640-2239-49cb-bb01-0f2f1e1bbf8e@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487550682 2750 195.159.176.226 (20 Feb 2017 00:31:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2017 00:31:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu) Cc: 25751@debbugs.gnu.org, antoine.levitt@gmail.com To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 20 01:31:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfbsg-0007lY-N4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Feb 2017 01:31:06 +0100 Original-Received: from localhost ([::1]:35506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfbsm-00049o-CU for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Feb 2017 19:31:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfbsg-00049h-6H for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2017 19:31:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfbsc-0000nG-7g for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2017 19:31:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48452) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cfbsc-0000nA-4U for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2017 19:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cfbsb-0006QM-VW for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2017 19:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2017 00:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25751 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25751-submit@debbugs.gnu.org id=B25751.148755064924675 (code B ref 25751); Mon, 20 Feb 2017 00:31:01 +0000 Original-Received: (at 25751) by debbugs.gnu.org; 20 Feb 2017 00:30:49 +0000 Original-Received: from localhost ([127.0.0.1]:46651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfbsO-0006Pv-Pq for submit@debbugs.gnu.org; Sun, 19 Feb 2017 19:30:48 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:59212 helo=homiemail-a17.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfbsM-0006Pm-37 for 25751@debbugs.gnu.org; Sun, 19 Feb 2017 19:30:46 -0500 Original-Received: from homiemail-a17.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a17.g.dreamhost.com (Postfix) with ESMTP id 12ECC2B206D; Sun, 19 Feb 2017 16:30:42 -0800 (PST) Original-Received: from localhost.linkov.net (m212-107-59-228.cust.tele2.ee [212.107.59.228]) (Authenticated sender: jurta@jurta.org) by homiemail-a17.g.dreamhost.com (Postfix) with ESMTPA id C836A2B206A; Sun, 19 Feb 2017 16:30:40 -0800 (PST) In-Reply-To: <06b2d640-2239-49cb-bb01-0f2f1e1bbf8e@default> (Drew Adams's message of "Sat, 18 Feb 2017 15:51:59 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129558 Archived-At: >> > 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. >> >> That's an option too, and here is the tested patch (it sets >> lazy-highlight-max-at-a-time to nil to avoid redisplay between >> lazy iterations): > > How does this relate to what has been discussed so far in bug #21092? I'm sorry to say that, but setting lazy-highlight-max-at-a-time to nil in the patch here in bug#25751 is a better way to avoid flicker than highlighting all matches in the buffer as it was discussed in bug#21092. I believe that modern hardware can quickly highlight all matches on the screen in one loop without a noticeable delay. But highlighting matches in the whole buffer is another thing. Could you try to see how fast this could be by trying to highlight a single character in a large buffer, e.g. with =E2=80=98M-x highlight-regexp RET a RET RET=E2= =80=99