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 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 1446469908 21854 80.91.229.3 (2 Nov 2015 13:11:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2015 13:11:48 +0000 (UTC) Cc: 17453@debbugs.gnu.org, emacs-devel , Stefan Monnier , Juri Linkov To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 02 14:11:39 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 1ZtEte-0002uQ-Sl for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 14:11:39 +0100 Original-Received: from localhost ([::1]:42011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtEte-0005XR-Ad for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 08:11:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtEt8-0004tX-5H for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 08:11:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtEt4-0008C0-Vo for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 08:11:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtEt4-0008Bw-LK for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 08:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZtEt4-0002cR-5c for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 08:11: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 13:11: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.144646984610023 (code B ref 17453); Mon, 02 Nov 2015 13:11:02 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 2 Nov 2015 13:10:46 +0000 Original-Received: from localhost ([127.0.0.1]:48599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtEsn-0002ba-9r for submit@debbugs.gnu.org; Mon, 02 Nov 2015 08:10:45 -0500 Original-Received: from mail-lf0-f42.google.com ([209.85.215.42]:34973) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtEsT-0002b2-Mo for 17453@debbugs.gnu.org; Mon, 02 Nov 2015 08:10:44 -0500 Original-Received: by lfbn126 with SMTP id n126so61128783lfb.2 for <17453@debbugs.gnu.org>; 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-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:108299 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.