From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Native display of line numbers Date: Mon, 19 Jun 2017 05:28:46 +0300 Message-ID: <83d1a0yald.fsf@gnu.org> 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> <20170618201933.GC22671@acm> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1497839386 3919 195.159.176.226 (19 Jun 2017 02:29:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Jun 2017 02:29:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 19 04:29:39 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 1dMmRe-0000aM-Di for ged-emacs-devel@m.gmane.org; Mon, 19 Jun 2017 04:29:38 +0200 Original-Received: from localhost ([::1]:40231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMmRj-0003m0-FE for ged-emacs-devel@m.gmane.org; Sun, 18 Jun 2017 22:29:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMmR5-0003ls-K0 for emacs-devel@gnu.org; Sun, 18 Jun 2017 22:29:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMmR1-0005DQ-JR for emacs-devel@gnu.org; Sun, 18 Jun 2017 22:29:03 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMmR1-0005DL-Fo; Sun, 18 Jun 2017 22:28:59 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4151 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dMmR0-0006Od-Bw; Sun, 18 Jun 2017 22:28:59 -0400 In-reply-to: <20170618201933.GC22671@acm> (message from Alan Mackenzie on Sun, 18 Jun 2017 20:19:33 +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.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:215762 Archived-At: > Date: Sun, 18 Jun 2017 20:19:33 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > > 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. That's fine as well, but might be harder to implement, and also calling Lisp from within the display engine is something I think should be kept to a minimum. With my suggestion, checking whether Follow mode is one of buffer's minor modes is simple enough, and Follow mode should (AFAIU) always know where's its "point" located, so having a variable with that value should also be simple.