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: The future of Follow Mode - a proposal. Date: Thu, 25 Feb 2016 22:17:52 +0000 Message-ID: <20160225221752.GF19742@acm.fritz.box> References: <20160219181834.GC3193@acm.fritz.box> <83io1kr12k.fsf@gnu.org> <20160220124415.GA1758@acm.fritz.box> <83wppzo7lf.fsf@gnu.org> <20160223231156.GA26899@acm.fritz.box> <83a8mqhvym.fsf@gnu.org> <20160225205737.GD19742@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 1456438568 15097 80.91.229.3 (25 Feb 2016 22:16:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Feb 2016 22:16:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 25 23:15:59 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 1aZ4CT-0007yI-TY for ged-emacs-devel@m.gmane.org; Thu, 25 Feb 2016 23:15:58 +0100 Original-Received: from localhost ([::1]:46153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ4CT-0007bA-9w for ged-emacs-devel@m.gmane.org; Thu, 25 Feb 2016 17:15:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ4Bz-0007Zz-HW for emacs-devel@gnu.org; Thu, 25 Feb 2016 17:15:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZ4Bv-0008QQ-Ru for emacs-devel@gnu.org; Thu, 25 Feb 2016 17:15:27 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:26545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZ4Bv-0008PY-Gm for emacs-devel@gnu.org; Thu, 25 Feb 2016 17:15:23 -0500 Original-Received: (qmail 24844 invoked by uid 3782); 25 Feb 2016 22:15:22 -0000 Original-Received: from acm.muc.de (p548A4868.dip0.t-ipconnect.de [84.138.72.104]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 25 Feb 2016 23:15:20 +0100 Original-Received: (qmail 11722 invoked by uid 1000); 25 Feb 2016 22:17:52 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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:200682 Archived-At: Hello, Stefan. On Thu, Feb 25, 2016 at 04:10:22PM -0500, Stefan Monnier wrote: > > Merely controlling the order of window display is no great feat. > > Determining window starts for these Follow Mode windows is the difficult > > bit. > If you con control the order, you can make sure the first follow-mode > window is rendered first, so you can set the window-start of the second > window before it gets rendered, etc... > IOW, controlling the order of window display lets you solve the issue of > determining the window-start for subsequent windows. But often it is the second or subsequent window that is to be fixed in place (say, after a scroll down operation in that window). The difficult bit is to determine the starting position of the first window which will result in the subsequent window being correctly placed when there is to be no gap, and no overlap between windows. Follow Mode currently does a lot of backwards and forwards motion (e.g. with `vertical-motion') to get this right. The display engine could do this much more efficiently - Lisp has access only to a small part of the functionality in C. > > Currently Follow Mode fights with the display engine to get what > > it needs, often resulting in delays of several tenths of a second in the > > subsequent redisplay operations after the first one. > That's why I'd hope that if you add a hook so follow-mode can tweak the > redisplay from inside, it should work much better. Possibly. What would this hook do? Calculating the start position of an earlier window is probably best done in C (for speed). > Stefan -- Alan Mackenzie (Nuremberg, Germany).