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: Sat, 31 Oct 2015 23:25:38 +0000 Message-ID: <20151031232538.GC1853__29756.0467770838$1446333862$gmane$org@acm.fritz.box> References: <20140509224458.GA4205@acm.acm> <20151029232302.GB3812@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 1446333862 31541 80.91.229.3 (31 Oct 2015 23:24:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2015 23:24:22 +0000 (UTC) To: Stefan Monnier , 17453@debbugs.gnu.org, emacs-devel@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 01 00:24:11 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 1ZsfVK-0007l3-ET for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Nov 2015 00:24:10 +0100 Original-Received: from localhost ([::1]:57322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsfVJ-0002sO-EQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2015 19:24:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsfVD-0002mT-CE for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 19:24:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsfVC-00021c-Jq for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 19:24:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsfVC-00021V-HX for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 19:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZsfVC-0002Ps-9G for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 19:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2015 23:24: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.14463338369277 (code B ref 17453); Sat, 31 Oct 2015 23:24:02 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 31 Oct 2015 23:23:56 +0000 Original-Received: from localhost ([127.0.0.1]:47374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsfV5-0002PY-Gm for submit@debbugs.gnu.org; Sat, 31 Oct 2015 19:23:55 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:56241) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsfV3-0002PN-4d for 17453@debbugs.gnu.org; Sat, 31 Oct 2015 19:23:54 -0400 Original-Received: (qmail 92501 invoked by uid 3782); 31 Oct 2015 23:23:51 -0000 Original-Received: from acm.muc.de (p579E9C22.dip0.t-ipconnect.de [87.158.156.34]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 01 Nov 2015 00:23:50 +0100 Original-Received: (qmail 26396 invoked by uid 1000); 31 Oct 2015 23:25:38 -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:108250 Archived-At: Hello, John. On Sat, Oct 31, 2015 at 03:35:22PM -0700, John Wiegley wrote: > >>>>> Alan Mackenzie writes: > > 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. > What is the reason for having separate functions such as window*-start, > instead of just taking the car of a list of windows? I may be missing some > context here, but this sounds like special-casing general behavior, and I'm > wondering why it's necessary... The prime use case is in isearch. At the moment isearch doesn't work well when Follow Mode is active (try it!). My first attempt at amending isearch for this involved manipulating Follow Mode's list of windows directly inside isearch.el. The result was too close a coupling between isearch and Follow Mode, and was also rather ragged. Stefan rejected this patch, asking for a more abstract solution. What I am proposing now is a solution where any library which needs to manipulate things like window positions will be trivially upgradable to working with Follow Mode, merely by replacing `window-start' by `window*-start', etc. The fact that the "group" of windows is represented by a list is an implementation detail to be encapsulated within follow.el. In the (fairly distant) future, this might perhaps be superseded by code in redisplay. Perhaps. > John -- Alan Mackenzie (Nuremberg, Germany).