From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.devel Subject: Re: Native line numbers landed on master Date: Mon, 17 Jul 2017 11:44:34 +0200 Message-ID: <87zic34cu5.fsf@wavexx.thregr.org> References: <83k23jl5ra.fsf@gnu.org> <87bmolqryw.fsf@wavexx.thregr.org> <83lgnpds9v.fsf@gnu.org> <83d190e9vv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500284960 23881 195.159.176.226 (17 Jul 2017 09:49:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Jul 2017 09:49:20 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 17 11:49:16 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 1dX2eR-0005un-8w for ged-emacs-devel@m.gmane.org; Mon, 17 Jul 2017 11:49:15 +0200 Original-Received: from localhost ([::1]:49080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX2eW-0007yK-Ry for ged-emacs-devel@m.gmane.org; Mon, 17 Jul 2017 05:49:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX2a6-0004lO-RC for emacs-devel@gnu.org; Mon, 17 Jul 2017 05:44:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX2a5-0004r1-Tb for emacs-devel@gnu.org; Mon, 17 Jul 2017 05:44:46 -0400 Original-Received: from erc.thregr.org ([46.43.2.63]:38558) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dX2a1-0004nD-BX; Mon, 17 Jul 2017 05:44:41 -0400 Original-Received: from [2a02:27e8:20:9049:56ee:75ff:fec2:8bfb] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1dX2Zv-0006jO-BJ (envelope-from ); Mon, 17 Jul 2017 11:44:35 +0200 In-reply-to: <83d190e9vv.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.43.2.63 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:216764 Archived-At: On Sun, Jul 16 2017, Eli Zaretskii wrote: > We could add a face to be used for each line number that is a multiple > of some number N, which could be specified by the user, if enough > people would like such a feature. That would actually be more than enough for me. I often use line number transiently, I don't use linum all the time. For example, I rebound M-g M-g to: (defun goto-line-with-feedback () (interactive) (let ((display-line-numbers t)) (goto-line (read-number "Goto line: ")))) as often, when you need to jump to a line number, you'd like to see more context. Here performance is secondary, and banding does help: https://www.thregr.org/~wavexx/tmp/2017-07-17T113633.jpg My main gripe with linum/nlinum aside from the performance was that it often has glitches in several modes. So far, I didn't have any trouble with display-line-numbers. > But I don't think it's a good idea to call a Lisp function when we > produce line numbers, as that would slow down redisplay too much. > Don't forget that redisplay is called for even the simplest > operations, like cursor motion commands, and in many cases it will > have to call that function for (almost) all the lines visible in the > window. I see the point.