From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#17453: Isearch doesn't work properly with Follow Mode. Date: Mon, 2 Nov 2015 23:00:21 +0000 Message-ID: References: <87h9l6627a.fsf@mail.linkov.net> <20151031235651.GE1853@acm.fritz.box> <87bnbddzpk.fsf@mail.linkov.net> <20151102092853.GA11804@acm.fritz.box> <20151102123512.GB11804@acm.fritz.box> <20151102154445.GD11804@acm.fritz.box> <20151102220927.GA2118@acm.fritz.box> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3c402f37892052396bd50 X-Trace: ger.gmane.org 1446505282 26750 80.91.229.3 (2 Nov 2015 23:01:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2015 23:01:22 +0000 (UTC) Cc: 17453@debbugs.gnu.org, Juri Linkov To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 03 00:01:13 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 1ZtO6B-00007k-JK for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 00:01:11 +0100 Original-Received: from localhost ([::1]:44659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtO6A-0001iL-Uc for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 18:01:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtO67-0001iF-Fw for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:01:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtO62-0007OK-JV for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:01:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtO62-0007OG-Gq for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZtO62-0006rF-2s for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Nov 2015 23:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17453 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17453-submit@debbugs.gnu.org id=B17453.144650522623916 (code B ref 17453); Mon, 02 Nov 2015 23:01:02 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 2 Nov 2015 23:00:26 +0000 Original-Received: from localhost ([127.0.0.1]:50116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtO5R-0006DB-PM for submit@debbugs.gnu.org; Mon, 02 Nov 2015 18:00:26 -0500 Original-Received: from mail-lf0-f47.google.com ([209.85.215.47]:33064) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtO5P-0006A5-CF for 17453@debbugs.gnu.org; Mon, 02 Nov 2015 18:00:24 -0500 Original-Received: by lfbf136 with SMTP id f136so56080256lfb.0 for <17453@debbugs.gnu.org>; Mon, 02 Nov 2015 15:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=cYFG0a/3UubkkjQ8cAXzKHh3w2cT6ZeIvLk7Vd2OxEc=; b=pnCPoQdnTgWU+lh4iU5vIpXzl2ECM5s0/F6GzlwQ0ADeBW1d9L6icblEfvObctEQ+2 b+4hbrN1COjswF7CHVqmBiXN8BUn7jGdanps2XX4dO4M1IoIEOghv/gt/cnJyleANaWt gXMR0jOSdcdi/UB8tlBNSNEI/QBv94Prq/G4ZCxN3curFSv6in9gmoR7t/wnt0vzjx0L ZyMOi6HCuAC17Z5Nk7xyPj+8Sr/IWoV/VoaFuJ43QW8NHj+lzeWRrchXbTKVt7++wnk7 nracoMpNAYfUXcbQveXy0PUUh7xvYOE1k8OqbJ16ZA2h70scTVZB5AwTDSvXlV9j8fvp htyw== X-Received: by 10.112.62.232 with SMTP id b8mr11051713lbs.27.1446505222468; Mon, 02 Nov 2015 15:00:22 -0800 (PST) Original-Received: by 10.112.63.71 with HTTP; Mon, 2 Nov 2015 15:00:21 -0800 (PST) Original-Received: by 10.112.63.71 with HTTP; Mon, 2 Nov 2015 15:00:21 -0800 (PST) In-Reply-To: <20151102220927.GA2118@acm.fritz.box> X-Google-Sender-Auth: cf0dlhAfMY4zig5x0iq-RPQvU7E 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:108326 Archived-At: --001a11c3c402f37892052396bd50 Content-Type: text/plain; charset=UTF-8 On 2 Nov 2015 10:09 pm, "Alan Mackenzie" wrote: > Of course, nothing is ever that simple. ;-). I've got a working > version which doesn't use "(sit-for 0)", thus allowing point to move > properly over Follow Mode windows. > > However, this meant the "old" highlighting not being erased until the > 0.25 seconds had passed. So I tried testing the conditions for a new > lazy-highlight loop (apart from window-start/end changing) in the > command loop bit. > It struck me that instead of all this rigmarole, and instead of the > "(sit-for 0)", we could test whether or not a scroll is about to take > place. Or we can cleanup the lazy highlighting _when_ scrolling takes place. > What we could do with is an interface which will tell us whether or not > redisplay would scroll if invoked immediately, with the current value of > point, window-start, etc. I don't think that's necessary. What if isearch just added (lazy-highlight-cleanup t) to window-scroll-functions? I want to be very cautious about not increasing the complexity of isearch code here, but so far these sound like good refactorings to me. --001a11c3c402f37892052396bd50 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 2 Nov 2015 10:09 pm, "Alan Mackenzie" <acm@muc.de> wrote:
> Of course, nothing is ever that simple.=C2=A0 ;-).=C2=A0 I've got = a working
> version which doesn't use "(sit-for 0)", thus allowing p= oint to move
> properly over Follow Mode windows.
>
> However, this meant the "old" highlighting not being erased = until the
> 0.25 seconds had passed.=C2=A0 So I tried testing the conditions for a= new
> lazy-highlight loop (apart from window-start/end changing) in the
> command loop bit.=C2=A0
> It struck me that instead of all this rigmarole, and instead of the > "(sit-for 0)", we could test whether or not a scroll is abou= t to take
> place.

Or we can cleanup the lazy highlighting _when_ scrolling tak= es place.

> What we could do with is an interface which will tell u= s whether or not
> redisplay would scroll if invoked immediately, with the current value = of
> point, window-start, etc.=C2=A0

I don't think that's necessary. What if isearch just= added =C2=A0(lazy-highlight-cleanup t) to window-scroll-functions?

I want to be very cautious about not increasing the complexi= ty of isearch code here, but so far these sound like good refactorings to m= e.

--001a11c3c402f37892052396bd50--