From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#21092: 25.0.50; Option `lazy-highlight-max-at-a-time' does not work Date: Tue, 1 Sep 2015 17:07:11 -0700 (PDT) Message-ID: References: <6ef534bf-ecf3-48a4-9414-46de26d911c7@default> <87oahpbxu1.fsf@mail.linkov.net> <83r3ml1ou6.fsf@gnu.org> <87h9ng4ho0.fsf@mail.linkov.net> <7d3e51a1-945f-497e-8af1-449cd4151ca1@default> <87y4grw7kx.fsf@mail.linkov.net> <719ef340-0997-40fe-b1d8-c20c2a69155e@default> <87mvx5oim0.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441152505 17077 80.91.229.3 (2 Sep 2015 00:08:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Sep 2015 00:08:25 +0000 (UTC) Cc: 21092@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 02 02:08:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZWvaz-0007rf-MD for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Sep 2015 02:08:09 +0200 Original-Received: from localhost ([::1]:59646 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWvb0-0006jx-6K for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Sep 2015 20:08:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWvav-0006hu-IR for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 20:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWvas-0001x1-Bo for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 20:08:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWvas-0001wv-7s for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 20:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZWvar-0002zN-N8 for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 20:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Sep 2015 00:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21092 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21092-submit@debbugs.gnu.org id=B21092.144115243611424 (code B ref 21092); Wed, 02 Sep 2015 00:08:01 +0000 Original-Received: (at 21092) by debbugs.gnu.org; 2 Sep 2015 00:07:16 +0000 Original-Received: from localhost ([127.0.0.1]:45487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWva7-0002yB-P4 for submit@debbugs.gnu.org; Tue, 01 Sep 2015 20:07:16 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:37486) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWva6-0002y4-5Q for 21092@debbugs.gnu.org; Tue, 01 Sep 2015 20:07:14 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t8207CEM011830 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Sep 2015 00:07:13 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t8207C4R007301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 2 Sep 2015 00:07:12 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t8207CF8031861; Wed, 2 Sep 2015 00:07:12 GMT In-Reply-To: <87mvx5oim0.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106075 Archived-At: > I tried to find a useful application for this feature, and finally found. Great. What's the application? > > Whole buffer OR rest-of-buffer forward or backward. Au choix. > > Both behaviors are useful. >=20 > Since you can scroll up or down, highlighting the whole buffer is > unavoidable. I don't understand. Can you elaborate a bit? With the patch I sent it seemed to be avoided. When searching forward, the only matches before point that got highlighted were those in the window. IIUC, this is not important to me, but I would like to understand. > > Not clear why you want a separate option for this. It cannot be > > used in combination with `lazy-highlight-max-at-a-time', can it? >=20 > Of course, it is useful in combination with =E2=80=98lazy-highlight-max-a= t-a-time=E2=80=99 > that can define the incrementality (how many steps to do) regardless > whether highlighting the whole buffer or only matches on the screen. I see now that I misunderstood what was meant by "at a time" in "max-at-a-time". I was thinking that it referred to all of the highlighting for a given input (e.g. after an input change). Instead, it refers to one invocation of `isearch-lazy-highlight-update', whose loop runs only `lazy-highlight-max-at-a-time' iterations. And `*-update' can get reinvoked by the timer to complete the highlighting for the input. > > A second question concerns how to control whether this acts > > only in the current search direction or in both directions. >=20 > We can highlight only in the search direction because regexp > search might match different results depending on direction. > So you need to switch directions with =E2=80=98C-r=E2=80=99 to re-highlig= ht > the buffer. You just said that "highlighting the whole buffer is unavoidable", so I am a bit confused. Now you seem to be saying that we can highlight only in one direction at a time. Maybe you could elaborate a bit here? > > For exmaple, I might want a toggle between max=3D10 and > > whole-buffer. >=20 > This will be possible with two separate variables: > the existing =E2=80=98lazy-highlight-max-at-a-time=E2=80=99 > to toggle between max=3D10 and max=3Dnil > and the new =E2=80=98lazy-highlight-buffer=E2=80=99 > to toggle between whole-buffer and screen-only > implemented by this small patch: I misunderstood max-at-a-time. So maybe the doc for it needs clarifying wrt what is meant by at a time etc. The doc and defcustom need fixing anyway, for the confusion over the meaning of "all matches" etc., discussed previously. Anyway, your patch looks good. It is essentially the same as mine, but using `lazy-highlight-buffer' instead of a nil value of `lazy-highlight-max-at-a-time'. I understand now that they have different purposes. The difference is that I did not change the occurrences of `window-(start|end)' in `isearch-lazy-highlight-new-loop'. I wasn't sure it was needed (not fully understanding it), and I didn't notice a problem without it. But I'm glad that you, knowing more, made the same change there as well. Thx - Drew