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: Framework extending window functions for Follow Mode (etc.). Date: Sat, 7 Nov 2015 18:55:51 +0000 Message-ID: <20151107185551.GB1774@acm.fritz.box> References: <20151105192905.GA7986@acm.fritz.box> <563DFBF8.9030903@gmx.at> <20151107135726.GC1770@acm.fritz.box> <563E163A.6000403@gmx.at> <20151107161201.GD1770@acm.fritz.box> <563E2FD7.5030903@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1446922456 10631 80.91.229.3 (7 Nov 2015 18:54:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2015 18:54:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 07 19:54:08 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 1Zv8cq-00055H-Fz for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 19:54:08 +0100 Original-Received: from localhost ([::1]:44957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv8cq-0004GK-1r for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 13:54:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv8cl-0004GD-VS for emacs-devel@gnu.org; Sat, 07 Nov 2015 13:54:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zv8ch-0002D1-Tn for emacs-devel@gnu.org; Sat, 07 Nov 2015 13:54:03 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:20590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv8ch-0002Cu-Ho for emacs-devel@gnu.org; Sat, 07 Nov 2015 13:53:59 -0500 Original-Received: (qmail 94501 invoked by uid 3782); 7 Nov 2015 18:53:58 -0000 Original-Received: from acm.muc.de (p548A50E3.dip0.t-ipconnect.de [84.138.80.227]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 07 Nov 2015 19:53:57 +0100 Original-Received: (qmail 1931 invoked by uid 1000); 7 Nov 2015 18:55:51 -0000 Content-Disposition: inline In-Reply-To: <563E2FD7.5030903@gmx.at> 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:193559 Archived-At: Hello, Martin. On Sat, Nov 07, 2015 at 06:07:35PM +0100, martin rudalics wrote: > > Yes, I would say. I'm guessing your concern is that such arguments on > > some functions could proliferate, giving an unmanageable number of > > them. But what is the likelihood of this happening? Or, in particular, > > of it happening to these particular window handling functions? > I can't tell. But adding a special argument to six primitives for > handling one particular case in the interaction between isearch and > follow mode already appears like a proliferation to me. A bit about the history of bug #17453: I've presented three solutions so far, and none has met with universal approval. The first one, ~18 months ago, simply adapted isearch.el making direct calls to Follow Mode's functions. This was rejected by Stefan, who asked for a more general solution, one that would enable other libraries to access Follow Mode more easily. In his own words, > IOW we should try harder to come up with more general hooks. What Stefan asked for is what you are criticising here. The second attempt, a week or two ago, invented new functions with new names to perform the functions of `window-start' etc., on either a group of windows or a single window. Eli criticised this, saying: > Btw, I see no reason to introduce new functions. Instead, we could > have the original ones accept an additional optional argument. The third attempt, yesterday/today, was in response to that comment from Eli. > If the peculiar behavior is tied to isearch, then I have no idea why you > can't devise a function like ‘isearch-set-window-start’ and special code > the follow mode behavior there. Because the behaviour isn't to be restricted to isearch. Also, the facilities needed from Follow mode far exceed what could be sensibly coded in such a function. In any case, what you're suggesting is pretty much my second solution attempt, which created six functions like `set-window*-start', but restricted to Isearch. There are currently up to 132 occurrences of set-window-start in the lisp sources. Some of these would likely be more useful if they took into account FM, and called set-window-start with the GROUP argument non-nil. These latest changes of mine would allow any such library to be quickly adapted for Follow Mode. Also, were Follow Mode to be superseded at any time, then the interface I'm proposing would not need adapting to FM's successor. > martin -- Alan Mackenzie (Nuremberg, Germany).