From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: bug#17453: Isearch doesn't work properly with Follow Mode. Date: Sun, 1 Nov 2015 20:15:35 +0000 Message-ID: <20151101201535.GG2768@acm.fritz.box> References: <20151029232302.GB3812@acm.fritz.box> <20151031233225.GD1853@acm.fritz.box> <20151101135253.GB2768@acm.fritz.box> <83k2q1y893.fsf@gnu.org> <20151101182733.GE2768@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 1446408860 24942 80.91.229.3 (1 Nov 2015 20:14:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Nov 2015 20:14:20 +0000 (UTC) Cc: emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 01 21:14:10 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 1Zsz0x-0007OI-JB for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2015 21:14:07 +0100 Original-Received: from localhost ([::1]:38689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsz0w-0002cX-BU for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2015 15:14:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsz0i-0002cR-UO for emacs-devel@gnu.org; Sun, 01 Nov 2015 15:13:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zsz0f-00014n-O3 for emacs-devel@gnu.org; Sun, 01 Nov 2015 15:13:52 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:15082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsz0f-00012Y-BC for emacs-devel@gnu.org; Sun, 01 Nov 2015 15:13:49 -0500 Original-Received: (qmail 2345 invoked by uid 3782); 1 Nov 2015 20:13:47 -0000 Original-Received: from acm.muc.de (p548A4E61.dip0.t-ipconnect.de [84.138.78.97]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 01 Nov 2015 21:13:46 +0100 Original-Received: (qmail 4619 invoked by uid 1000); 1 Nov 2015 20:15:35 -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-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 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:193079 Archived-At: Hello, Artur. On Sun, Nov 01, 2015 at 07:46:12PM +0000, Artur Malabarba wrote: > >> How is this "not having isearch know about Follow mode"? I see that > >> knowledge on every step of this patch, whenever you call the new > >> functions. > > > > It has no knowledge of the internals of Follow Mode. window*-start is > > merely an abstract interface, currently with two implementations > > associated with it, a default one for normal windows and a Follow Mode > > one. [...] > > I'm not sure I really understand your question. At several points in > > isearch, functions need to be called which eventually end up calling > > Follow Mode functions. > This is not about the window*- functions. > There are several places where your patch checks whether follow-mode > is on, turns it off, or turns it back on. I think this is still too > attached to follow mode. > Isearch really shouldn't worry about disabling or enabling other libraries. Have a look more closely at that point. It is where an old (possibly obsolete) facility of the "small window" is used. The idea is that if a terminal's comms line is very slow, isearch will just display a single line of text instead of scrolling an entire large window. However, if Follow Mode is enabled, it would completely negate the point of the "small window" since it would scroll all the other windows displaying the buffer anyway. Now, it's highly unlikely anybody on a 1200 Baud terminal is going to be using Follow Mode anyway, but if they are, they'll still get the benefit of the "small window". Set your `baud-rate' to 100, and try this facility out! > The idiomatic Emacs way to do this is to add hooks to isearch, and run > them at useful places. Then packages like follow-mode can add stuff to > these hooks and do what they want (like, enable/disable itself). But the "small window" facility is hard coded, and probably has been for 30 years. Just up until now, nobody even considered the interaction between "small window" and Follow Mode. Still, this part of my patch is hardly essential to the main thrust. So if people really think it inappropriate, I can just take this bit out. -- Alan Mackenzie (Nuremberg, Germany).