From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: The future of Follow Mode - a proposal. Date: Fri, 19 Feb 2016 20:45:39 +0200 Message-ID: <83io1kr12k.fsf@gnu.org> References: <20160218195630.GA2697@acm.fritz.box> <837fi1u5qt.fsf@gnu.org> <20160219142522.GA3193@acm.fritz.box> <83povsr8cc.fsf@gnu.org> <20160219181834.GC3193@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455907573 30794 80.91.229.3 (19 Feb 2016 18:46:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2016 18:46:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 19 19:46:08 2016 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 1aWq44-0001ui-5B for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 19:46:04 +0100 Original-Received: from localhost ([::1]:54603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWq43-0008O6-Kb for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 13:46:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWq3z-0008Nu-TO for emacs-devel@gnu.org; Fri, 19 Feb 2016 13:46:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWq3v-00005D-Cd for emacs-devel@gnu.org; Fri, 19 Feb 2016 13:45:59 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWq3v-00004x-9K; Fri, 19 Feb 2016 13:45:55 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4099 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aWq3t-0006EF-Fr; Fri, 19 Feb 2016 13:45:54 -0500 In-reply-to: <20160219181834.GC3193@acm.fritz.box> (message from Alan Mackenzie on Fri, 19 Feb 2016 18:18:34 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:200236 Archived-At: > Date: Fri, 19 Feb 2016 18:18:34 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > > > Where and why do you see the need for deep changes? > > > I already explained this above: "the fact that the current display > > engine doesn't support windows of unequal width". If you want to lift > > this limitation, the move_it_* family of functions, which simulate > > redisplay, and are the workhorse of every decision Emacs makes that > > concerns layout, cannot switch windows in their inner loops. > > I envisage reinitialising the iterator structure as necessary when > passing bewteen windows. The change in width would be handled at a > relatively high level. The window start position is known, the window > end position could be calculated as we progress. The functions we talk about currently don't know what they are invoked for. Your envisioned changes imply that they should behave differently depending on whether the results will be used for layout of the current window or the next/previous window in a group. That's part of the changes I had in mind. They are not trivial. But without them, what you want to do will not work reliably. > As an example, `compute_window_start_on_continuation_line' would have to > use the dimensions of the previous window to determine the window-start. > Jiggling the various windows around after text changes or scrolling is > going to be the hard part of the coding. Yes, and the result will be non-trivial changes in the overall logic, because redisplaying a window will no longer be independent of other windows. It's all doable, of course, but I suggest taking a good look at the use cases for each of these functions, before you design the way they should work to support windows of unequal width.