From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Framework extending window functions for Follow Mode (etc.). Date: Sun, 08 Nov 2015 10:22:44 +0100 Message-ID: <563F1464.4050000@gmx.at> 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> <20151107185551.GB1774@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1446974602 29895 80.91.229.3 (8 Nov 2015 09:23:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Nov 2015 09:23:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 08 10:23:13 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 1ZvMBs-0001dR-VL for ged-emacs-devel@m.gmane.org; Sun, 08 Nov 2015 10:23:13 +0100 Original-Received: from localhost ([::1]:46682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvMBs-0003LE-CK for ged-emacs-devel@m.gmane.org; Sun, 08 Nov 2015 04:23:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvMBf-0003L2-3R for emacs-devel@gnu.org; Sun, 08 Nov 2015 04:23:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvMBb-0006m2-Ui for emacs-devel@gnu.org; Sun, 08 Nov 2015 04:22:59 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:60404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvMBb-0006lx-Km for emacs-devel@gnu.org; Sun, 08 Nov 2015 04:22:55 -0500 Original-Received: from [192.168.1.100] ([213.162.68.31]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Mdrph-1a52Pb2O4L-00PgOq; Sun, 08 Nov 2015 10:22:54 +0100 In-Reply-To: <20151107185551.GB1774@acm.fritz.box> X-Provags-ID: V03:K0:HRDAMr7UAt/42qocUVbFJ9d1mgV3U4aVLcOAu2UdMGsxV9G1EfX dfN/ikQW2j+bQPC6aI/ApKK7GWHr/TGOd2XqkkKCWfnJPOCUvs6MgYYfaRQ5DmmOHYUwmlK ZWSGjKpx0Hy2SmMNaXEs7RTmXw6jaRlVNXcPFS1mqrF+GYEaYfop0ca32aDpRdEbsu97Z/+ qnVzPJV6q3RGr+CTJdPBw== X-UI-Out-Filterresults: notjunk:1;V01:K0:ByVoAz7WLkU=:MpFnFE3aOMz3/UyDbxRZ2L g8BGxnWRwFlgJTvNjrLTxU2Yfh+CwKy9lJElc7zFhZSEHGpH1RFY0pxvYGxTrWtwjDUwOALil pC/7CiU7LaCybSQBHgUnc54r8c32+CGMwtPDSYcUA3MNjnkZY+s6sKloWtAgNIMCbYL8ucCPp lb/E5Bliz+OHbuG42ptbK37DHBMBw1RJVjEF/qYbjqY/R7KkBTk5IRrAn9LPm9QVj2aJs3cOI 8RNV1zN4pOqyQMTaGhPH/Bm0bZ0bOu9eqGWEWJ/qdJaEdW2iyWtNRKGAXRQlOC1y0/sMyEDRr uRM7dDGPFD8nV7Fr9BbbPwTohUfeH1lICrfOe1c28V2e4jAyO6hVU5JoXfvchQVFGDM7idEFA a6D6ZlSTyojnZwnBnmlT/7/GmGNR/pR2Qe3KZZeFKeBCOknn5zrQIviyghEOzixabTSPa0gxJ wIgNec/pBFUjeJW12TUcjMa9Dm6eiDSOgPxe6ht30jn6PGP0TNF7LGZmHSNppabB63C0/5NR2 jJCYxPpPTwajGN5iXbbR9BhUYdzX4o91PjDTLZIPd6SgLCzNa/pVNHdOYouh+CCzQTE30xNeu qAzTMDDtyJWWnVKL/Sid3bqDAm5QnogLFAQCSVeYZR/BAUHzmXdM0XS5iTiWrJEDroYJq1KgX KJiULVSDoJwoVxcOMr8qQBeljdjKBEPO8UQl4e9M6zjOySJZ8/x+BBGVfDTPvQ54o/ZUA1nu9 SHEDt1qyb5x8rFBkNu1ncuqK8vgjVfEcM61fMfhPvacFjk5vHsNnRhlgO0dXWgwErK7YD7cn X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:193590 Archived-At: > 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 librari= es > to access Follow Mode more easily. I don't think that other libraries should pay attention to Follow Mode. > 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. Why do you think so? You want to give =E2=80=98set-window-start=E2=80=99= an additional, optional argument GROUP. If it's non-nil, =E2=80=98set-window-start=E2=80= =99 should call the function stored in =E2=80=98set-window-start-function=E2=80=99. = Correct so far? If so, then how comes that this argument is called "GROUP"? An argument with such a name should be non-nil only in calls by =E2=80=98follow-mode=E2= =80=99 or other packages that know that WINDOW is part of some "group". =E2=80=98isearch-mode=E2=80=99 has no idea whether WINDOW is part of a gr= oup and should not have to. OTOH somebody might want =E2=80=98set-window-start=E2=80=99= to behave specially even when WINDOW is not part of a group. For me a general solution means that any mode that forms a group of windows (like =E2=80=98follow-mode=E2=80=99) adds window parameters to al= l windows that are part of that group. And any function like =E2=80=98set-window-start=E2= =80=99 that should behave specially when the window it operates on is part of a group of windows will have to inspect that parameter (and maybe other parameters as well). > 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. Above I explained why IMO the new argument is not about "groups". > The third attempt, yesterday/today, was in response to that comment fr= om > Eli. > >> If the peculiar behavior is tied to isearch, then I have no idea why = you >> can't devise a function like =E2=80=98isearch-set-window-start=E2=80=99= 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 pret= ty > much my second solution attempt, which created six functions like > `set-window*-start', but restricted to Isearch. Why such a conclusion? Window parameters are far more flexible than arguments. > 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, I fully agree here ... > and called set-window-start with the GROUP argument > non-nil. =2E.. and fully disagree here. All these calls should be completely unaware of whether =E2=80=98follow-mode=E2=80=99 is active or not. How =E2=80=98set-window-start=E2=80=99 behaves would be encapsulated in the s= pecial function prescribed by the =E2=80=98set-window-start=E2=80=99 parameter. > These latest changes of mine would allow any such library to > be quickly adapted for Follow Mode. There should be no need for a library to adapt to Follow Mode. > Also, were Follow Mode to be superseded at any time, then the interfac= e > I'm proposing would not need adapting to FM's successor. The interface you propose already needs adapting up to 132 libraries to FM. martin