From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Native display of line numbers Date: Sun, 18 Jun 2017 20:19:33 +0000 Message-ID: <20170618201933.GC22671@acm> References: <83lgoqzm0v.fsf@gnu.org> <20170617202702.GC2955@acm.fritz.box> <837f0ayqdl.fsf@gnu.org> <20170618114251.GA22671@acm> <83r2yhxrlv.fsf@gnu.org> <20170618154705.GB22671@acm> <83lgopxols.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1497817288 4413 195.159.176.226 (18 Jun 2017 20:21:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 20:21:28 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 18 22:21:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMghF-0000fw-DY for ged-emacs-devel@m.gmane.org; Sun, 18 Jun 2017 22:21:21 +0200 Original-Received: from localhost ([::1]:39485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMghI-0000JY-Uo for ged-emacs-devel@m.gmane.org; Sun, 18 Jun 2017 16:21:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMggd-0000JG-QO for emacs-devel@gnu.org; Sun, 18 Jun 2017 16:20:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMgga-0005no-Is for emacs-devel@gnu.org; Sun, 18 Jun 2017 16:20:43 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:19355 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1dMgga-0005md-6Z for emacs-devel@gnu.org; Sun, 18 Jun 2017 16:20:40 -0400 Original-Received: (qmail 81712 invoked by uid 3782); 18 Jun 2017 20:20:38 -0000 Original-Received: from acm.muc.de (p548C7CC8.dip0.t-ipconnect.de [84.140.124.200]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 18 Jun 2017 22:20:37 +0200 Original-Received: (qmail 26656 invoked by uid 1000); 18 Jun 2017 20:19:33 -0000 Content-Disposition: inline In-Reply-To: <83lgopxols.fsf@gnu.org> 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 [fuzzy] X-Received-From: 193.149.48.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:215757 Archived-At: Hello, Eli. On Sun, Jun 18, 2017 at 19:11:27 +0300, Eli Zaretskii wrote: > > Date: Sun, 18 Jun 2017 15:47:05 +0000 > > Cc: emacs-devel@gnu.org > > From: Alan Mackenzie > > > Given a window whose buffer is in Follow Mode, how do I know what is > > > the "correct" value of point to use in that window to make the > > > relative numbers "global"? > > I don't see that this can easily be done, since follow-mode more fights > > the display engine rather than working with it. > Maybe follow-mode could provide a buffer-local variable with the value > of that point, and the display engine could simply access that > variable? Or something like that. How about a buffer local variable provided by the display engine called something like point-window? Any function (here, we're talking mainly follow-mode) could set this to a window, and the meaning would be "all relative line numbers should be based from the value of point in this window". This would save the display engine from having to check the existence of the variable (follow-mode might not be loaded), and updating the value of the variable in follow-mode would be straightforward. [ .... ] -- Alan Mackenzie (Nuremberg, Germany).