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: Thu, 22 Jun 2017 18:38:36 +0300 Message-ID: <83injouj5v.fsf@gnu.org> References: <83lgoqzm0v.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1498145959 17076 195.159.176.226 (22 Jun 2017 15:39:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Jun 2017 15:39:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Filipe Silva Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 22 17:39:15 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 1dO4CR-0004CM-C3 for ged-emacs-devel@m.gmane.org; Thu, 22 Jun 2017 17:39:15 +0200 Original-Received: from localhost ([::1]:59646 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO4CW-0005Xa-Ey for ged-emacs-devel@m.gmane.org; Thu, 22 Jun 2017 11:39:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO4By-0005XT-Vf for emacs-devel@gnu.org; Thu, 22 Jun 2017 11:38:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO4Bu-0000pc-2n for emacs-devel@gnu.org; Thu, 22 Jun 2017 11:38:46 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO4Bt-0000pW-Vj; Thu, 22 Jun 2017 11:38:42 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3638 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dO4Bt-0000DW-5v; Thu, 22 Jun 2017 11:38:41 -0400 In-reply-to: (message from Filipe Silva on Thu, 22 Jun 2017 12:02:55 -0300) 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:215884 Archived-At: > From: Filipe Silva > Date: Thu, 22 Jun 2017 12:02:55 -0300 > Cc: Emacs developers > > Eli > ​, thanks so much for your work on this. I means a lot to have this feature implemented in the timeless editor. > > I'm an evil-mode user and this is one of the features I miss most in vim: relative line numbers. But let me be > more clear: > > Vim implements​ relative line numbers in a way that the "relativity" aspect is based on the visible lines of the > buffer. > > This means that, for example, in an org-mode buffer, where you have a bunch of lines collpsed, you would > number those visible lines with numbers relative to the line of point, and not based on the "real" relativity. Yes, this was already requested. I understand that there are no Emacs packages that offer this feature right now, is that right? Anyway, implementing this will need to code a whole different method of counting lines (the current branch just reuses the same code which produces the line numbers in the mode line), so I will need to experiment to see if it can be implemented fast enough to avoid slowing down redisplay, which is already slower in folded buffers. IOW, this feature will take some time to implement correctly. Thanks for the feedback.