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: Thu, 29 Oct 2015 23:23:02 +0000 Message-ID: <20151029232302.GB3812__6457.65002486787$1446160950$gmane$org@acm.fritz.box> References: <20140509224458.GA4205@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1446160951 11777 80.91.229.3 (29 Oct 2015 23:22:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2015 23:22:31 +0000 (UTC) Cc: 17453@debbugs.gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 30 00:22: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 1ZrwWK-0007sx-00 for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Oct 2015 00:22:12 +0100 Original-Received: from localhost ([::1]:47520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrwWI-0003BQ-V3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2015 19:22:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrwWD-0003B0-W2 for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 19:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrwWA-0003Sg-2p for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 19:22:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrwWA-0003Sb-03 for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 19:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZrwW9-0008PN-N1 for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 19:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2015 23:22: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.144616088132271 (code B ref 17453); Thu, 29 Oct 2015 23:22:01 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 29 Oct 2015 23:21:21 +0000 Original-Received: from localhost ([127.0.0.1]:44900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrwVV-0008OR-9i for submit@debbugs.gnu.org; Thu, 29 Oct 2015 19:21:21 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:43475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrwVT-0008OI-BD for 17453@debbugs.gnu.org; Thu, 29 Oct 2015 19:21:20 -0400 Original-Received: (qmail 24822 invoked by uid 3782); 29 Oct 2015 23:21:16 -0000 Original-Received: from acm.muc.de (p548A58AB.dip0.t-ipconnect.de [84.138.88.171]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 30 Oct 2015 00:21:16 +0100 Original-Received: (qmail 12481 invoked by uid 1000); 29 Oct 2015 23:23:02 -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:108158 Archived-At: Hello, Stefan, hello, Emacs. Resuming a conversation from a year and a half ago, in it I had proposed a patch which made isearch work properly in a Follow Mode set of windows. In the end, you rejected my patch (in effect), because... On Fri, May 09, 2014 at 10:40:07PM -0400, Stefan Monnier wrote: > I must say I really dislike this hard-coding of follow-mode support in > isearch.el. Isearch should not know so much about follow-mode and > follow-mode should not know so much about Isearch either. > IOW we should try harder to come up with more general hooks. That irritated me at the time, but you were right - putting Follow Mode support directly into isearch would not have been a good idea. I've recently started working on the bug again, and although it's not your job anymore, I'd still appreciate you giving me some feedback on my new approach. What I propose is that several functions which operate on windows have extended versions which operate on @dfn{groups of windows}, this meaning (for the moment) Follow Mode groups of windows. These new functions are flexible enough to work with methods other than Follow Mode of grouping windows, should such ever be implemented. The new functions are window*-start, window*-end, set-window*-start, recenter*, pos-visible-in-window*-p, move-to-window*-line, and sit*-for. window*-start returns the window-start of the _first_ window in the group, window*-end returns the window-end of the _last_ window in the group, and so on, all these functions doing the Right Thing for a group of windows. sit*-for exists, because Follow Mode needs a chance to resynchronise its windows before redisplay happens. If Follow Mode is not enabled, all the above functions do the Right Thing on the single window. In addition, there is a function window*-windows, which returns an ordered list of the windows involved (or a list of the single window when F.M. is not active). I have a trial implementation of the above, and a trial adaptation of isearch.el which uses it. It works. What do you think? > Stefan -- Alan Mackenzie (Nuremberg, Germany).