From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17453: Isearch doesn't work properly with Follow Mode. Date: Mon, 02 Nov 2015 17:46:34 +0200 Message-ID: <831tc8xv39.fsf@gnu.org> 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: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446479246 22644 80.91.229.3 (2 Nov 2015 15:47:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2015 15:47:26 +0000 (UTC) Cc: 17453@debbugs.gnu.org, monnier@iro.umontreal.ca, bruce.connor.am@gmail.com, juri@linkov.net To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 02 16:47:10 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 1ZtHKA-0008Ew-BK for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 16:47:10 +0100 Original-Received: from localhost ([::1]:42983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtHK9-0001fr-NK for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 10:47:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtHK6-0001fi-5T for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 10:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtHK2-0001Xl-1X for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 10:47:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtHK1-0001Xh-Tl for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 10:47:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZtHK1-0006wp-Q8 for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 10:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Nov 2015 15:47: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.144647918726666 (code B ref 17453); Mon, 02 Nov 2015 15:47:01 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 2 Nov 2015 15:46:27 +0000 Original-Received: from localhost ([127.0.0.1]:49865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtHJT-0006w2-CL for submit@debbugs.gnu.org; Mon, 02 Nov 2015 10:46:27 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:52728) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtHJQ-0006vp-MI for 17453@debbugs.gnu.org; Mon, 02 Nov 2015 10:46:26 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NX700G002DW4500@a-mtaout21.012.net.il> for 17453@debbugs.gnu.org; Mon, 02 Nov 2015 17:46:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NX700GJ92HA1060@a-mtaout21.012.net.il>; Mon, 02 Nov 2015 17:46:22 +0200 (IST) In-reply-to: <20151102123512.GB11804@acm.fritz.box> X-012-Sender: halo1@inter.net.il 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:108302 Archived-At: Lets' take emacs-devel out of this shall we? > Date: Mon, 2 Nov 2015 12:35:12 +0000 > From: Alan Mackenzie > Cc: Juri Linkov , 17453@debbugs.gnu.org, > Stefan Monnier , > emacs-devel > > > 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. When point is outside the window, this > form causes redisplay, which scrolls point back into the window - > without Follow Mode getting a look in. In my patch, I replaced this > with "(sit*-for 0)", where Follow Mode can do its thing before the > redisplay happens. If this means that sit*-for does something other than redisplay and wait, like switch to another window, I'd really suggest to rethink that. It is entirely counter-intuitive to have a sit-for family of functions do anything other than some kind of redisplay and some kind of waiting. I think it is a better idea to have Isearch switch to another window when the next hit is there, via some specialized movement command that Follow mode could customize. That'd be something expectable.