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: Mon, 19 Jun 2017 18:39:45 +0000 Message-ID: <20170619183945.GA3187@acm> References: <83lgoqzm0v.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 1497897710 17756 195.159.176.226 (19 Jun 2017 18:41:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Jun 2017 18:41:50 +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 Mon Jun 19 20:41:46 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 1dN1cN-0004EX-Ar for ged-emacs-devel@m.gmane.org; Mon, 19 Jun 2017 20:41:43 +0200 Original-Received: from localhost ([::1]:43888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dN1cS-0001wg-58 for ged-emacs-devel@m.gmane.org; Mon, 19 Jun 2017 14:41:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dN1be-0001wT-MD for emacs-devel@gnu.org; Mon, 19 Jun 2017 14:41:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dN1ba-0005bb-PS for emacs-devel@gnu.org; Mon, 19 Jun 2017 14:40:58 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:40768 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1dN1ba-0005Yc-DT for emacs-devel@gnu.org; Mon, 19 Jun 2017 14:40:54 -0400 Original-Received: (qmail 15700 invoked by uid 3782); 19 Jun 2017 18:40:51 -0000 Original-Received: from acm.muc.de (p548C669F.dip0.t-ipconnect.de [84.140.102.159]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 19 Jun 2017 20:40:50 +0200 Original-Received: (qmail 3213 invoked by uid 1000); 19 Jun 2017 18:39:45 -0000 Content-Disposition: inline In-Reply-To: <83lgoqzm0v.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:215786 Archived-At: Hello, Eli. On Sat, Jun 17, 2017 at 18:12:00 +0300, Eli Zaretskii wrote: [ .... ] > So with that in mind, I came up with an implementation of a native > display of line numbers. You can find it in the scratch/line-numbers > branch of the Emacs repository. Compared with linum-mode, > nlinum-mode, and other similar modes, it has the following main > advantages: > . it works significantly faster (almost twice as fast as linum-mode, > 50% faster that relative-line-numbers-mode) > . it doesn't use the display margins > . it works with R2L text, something the old modes never did > The main features of the line-numbering modes are all supported by > this new feature. > Please give it a try and report any bugs you find. I'm sure there > will be quite a few bugs, given the sheer amount of display feature > which could be affected, and which I didn't have time to test. There's one other thing which surprises me, and apologies if somebody else has already mentioned it and I've missed that post. At least on a Linux tty, one character position is "wasted" to the left of the line numbers. Just about everything else I use in this tty environment, including the command line, and the emacs master, starts with the first character of a line bang up against the edge of the screen. So why is this extra space put in? Might this be a case for a user option? [ .... ] > TIA -- Alan Mackenzie (Nuremberg, Germany).