From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: bug#17453: Isearch doesn't work properly with Follow Mode. Date: Mon, 2 Nov 2015 13:10:24 +0000 Message-ID: References: <20140509224458.GA4205@acm.acm> <20151029232302.GB3812@acm.fritz.box> <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> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1446469869 21079 80.91.229.3 (2 Nov 2015 13:11:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2015 13:11:09 +0000 (UTC) Cc: Juri Linkov , 17453@debbugs.gnu.org, Stefan Monnier , emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 02 14:11:04 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZtEt5-0002Us-Lg for ged-emacs-devel@m.gmane.org; Mon, 02 Nov 2015 14:11:03 +0100 Original-Received: from localhost ([::1]:42005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtEt5-0004M3-4u for ged-emacs-devel@m.gmane.org; Mon, 02 Nov 2015 08:11:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtEsU-0004Ec-J9 for emacs-devel@gnu.org; Mon, 02 Nov 2015 08:10:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtEsT-00084X-O9 for emacs-devel@gnu.org; Mon, 02 Nov 2015 08:10:26 -0500 Original-Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:33756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtEsT-00084R-Gr for emacs-devel@gnu.org; Mon, 02 Nov 2015 08:10:25 -0500 Original-Received: by lfbf136 with SMTP id f136so47236571lfb.0 for ; Mon, 02 Nov 2015 05:10:24 -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=8CMmOGobFtzLYt+zVxfd4D6sW5ld/JqJvL1hP+CCXGU=; b=gyWOE7eom1Ub0VMJsugE41jqJkaIiU4Kgf2BENMsxWgAt66RXgpn+BRY2I556xKFfu nBn8JerHoAmxUK7QH3eiXqALosqRQ7TGKMrDgF4ZTPdN2jbnfG0RmDEYx2dSXbPw8obw Fn8aQX6x7AH+loU+fIJjtqmiYylOK/grHlkPlK8ns1Z3L3kCXvdsZfnlK7CqxZKqiXAt KDRl86YVX8aNcztLb2tDhyF5ZDxeTL1/fDQ1JaRvaiQGkql0WJzQorGfV1TE72+JKIke QHwbPobreMwy4v7m1C2UuJIzXe58BS7tsPOoIuWuzv+oQAIkqiUIamys9MUD8iLLwKq3 gYiw== X-Received: by 10.25.141.77 with SMTP id p74mr6628448lfd.17.1446469824753; Mon, 02 Nov 2015 05:10:24 -0800 (PST) Original-Received: by 10.112.63.71 with HTTP; Mon, 2 Nov 2015 05:10:24 -0800 (PST) In-Reply-To: <20151102123512.GB11804@acm.fritz.box> X-Google-Sender-Auth: eOsBpHKS6KjNyu_p-6B55JNo4tk X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c07::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193108 Archived-At: >> I also changed it to use (follow-all-followers). > > That's unwanted. ;-) Isearch should not be using internal Follow Mode > functions. Some more abstraction would be needed. That function goes in follow.el. ;-) > Lazy highlighting searches for matches on the current window. It must > be extended to search for matches on the Follow Mode group of windows. > For that, it needs the details of the "window*-start" and "window*-end". Yes, you're right, I see that now. This might still be solvable via setting isearch-search-fun-function, I'll need to think on that for a moment. I see nothing wrong with the window*-start/end functionality you suggest, but if we can solve this problem via configuration points that are already provided (like isearch-search-fun-function) then all the better. >> > One way or another, isearch MUST work with the >> > window boundaries of the entire Follow Mode group. > >> Maybe I missed part of the issue. I thought you wanted Isearch to >> switch to another window if that window contains the next match >> (instead of scrolling the current window). For that, you only need >> pos-visible-in-window-p, you don't need to mess with boundaries. > > What is causing the unwanted scrolling rather than moving to the next > window, is the form "(sit-for 0)" near the start of > isearch-lazy-highlight-new-loop. I think the patch I provided switches to the second (or third or whatever) window before that sit-for runs. So I believe it solves this problem.