From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#17453: Isearch doesn't work properly with Follow Mode. Date: Tue, 3 Nov 2015 09:18:47 +0000 Message-ID: <20151103091847.GC2258@acm.fritz.box> References: <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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1446542303 7114 80.91.229.3 (3 Nov 2015 09:18:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Nov 2015 09:18:23 +0000 (UTC) Cc: 17453@debbugs.gnu.org, Juri Linkov To: Artur Malabarba Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 03 10:18:12 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 1ZtXjH-0007kH-Or for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 10:18:11 +0100 Original-Received: from localhost ([::1]:46595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtXjH-00066B-4v for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 04:18:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtXjC-00063r-KC for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 04:18:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtXj8-00029j-JI for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 04:18:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtXj8-00029f-Fu for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 04:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZtXj7-0006D3-VY for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 04:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Nov 2015 09:18:01 +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.144654224223792 (code B ref 17453); Tue, 03 Nov 2015 09:18:01 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 3 Nov 2015 09:17:22 +0000 Original-Received: from localhost ([127.0.0.1]:50413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtXiT-0006Bg-Fk for submit@debbugs.gnu.org; Tue, 03 Nov 2015 04:17:21 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:56769) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtXi7-0006Ag-UW for 17453@debbugs.gnu.org; Tue, 03 Nov 2015 04:17:19 -0500 Original-Received: (qmail 75038 invoked by uid 3782); 3 Nov 2015 09:16:59 -0000 Original-Received: from acm.muc.de (p5B14700A.dip0.t-ipconnect.de [91.20.112.10]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 03 Nov 2015 10:16:58 +0100 Original-Received: (qmail 2636 invoked by uid 1000); 3 Nov 2015 09:18:47 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:108342 Archived-At: Hello, Artur. On Mon, Nov 02, 2015 at 11:00:21PM +0000, Artur Malabarba wrote: > 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? Now that's a good idea. :-) So stale lazy highlighting could be erased by the multitude of existing tests for most cases, and by that hook function for when we scroll. I'm going to try it. > 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. I agree on both counts. -- Alan Mackenzie (Nuremberg, Germany).