From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Franco A. Cortesi" Newsgroups: gmane.emacs.bugs Subject: bug#38717: display-line-numbers set to relative Date: Mon, 23 Dec 2019 00:49:47 -0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e01ce6059a56eb9b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="246049"; mail-complaints-to="usenet@blaine.gmane.org" To: 38717@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 23 05:03:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ijEwA-0011mX-3S for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Dec 2019 05:03:18 +0100 Original-Received: from localhost ([::1]:53076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijEw3-0006yJ-7C for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Dec 2019 23:03:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33997) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijEvw-0006y9-Fy for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 23:03:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijEvv-0004k6-1z for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 23:03:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44484) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ijEvu-0004ij-Qd for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 23:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ijEvu-0006lW-N4 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 23:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Franco A. Cortesi" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Dec 2019 04:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38717 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157707377425991 (code B ref -1); Mon, 23 Dec 2019 04:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Dec 2019 04:02:54 +0000 Original-Received: from localhost ([127.0.0.1]:50457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijEvl-0006l8-UR for submit@debbugs.gnu.org; Sun, 22 Dec 2019 23:02:54 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:36325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijEjM-0006R1-Lq for submit@debbugs.gnu.org; Sun, 22 Dec 2019 22:50:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47448) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijEjL-00059O-7R for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 22:50:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijEjJ-0002QJ-SP for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 22:50:02 -0500 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:42928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ijEjI-0002Gf-UL for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 22:50:01 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id q6so15187272wro.9 for ; Sun, 22 Dec 2019 19:50:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6CUUPScNZIV8l6/E+mxIUvQfzoZQg6I4R1mtxVzPE50=; b=mQf1u2dnByXTxxm7cYi6X9TTMT+cBzqWPo5laBZ+42oW1vZXqt8SmibO9bLOPUgQcM 4Ds5M16wMCPRGT/aQXeZiAofG25xgny9ZTWkHMlaue7l+JmRYY9I1kmZ+/GDymYCJrxi Ie0KkApMBfuqMQmLoTJY6MxwBdMEL0ephM0MaRF6CRIBBz3S2qPHwB/ihMmGLKcDfVWq 1WBeoXHukj5+UtPj2gA/3hikh0mcWSRD+Y7tXIuWbiAjVJyppgCTQ/kAPlYQfcktnaFr aRAHGg5Xy25nBZEoqQUBmDU+VwjHm3NR/hyHhK4WUsLOae5ZC+HhAaQVoxJ5PFrBhbB0 mLOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6CUUPScNZIV8l6/E+mxIUvQfzoZQg6I4R1mtxVzPE50=; b=GX3Ap+RvfPdRaT0HJAhRm8fZWgCfX0n5v7kIjw48FEbVpsktsGy34EidLZ7ueARz00 kfHaAdG55EO7J6IbDXeXxvEH5tocj4PgHig1hgSmpeyvPosL+c9nowU1xXUK++fiWVed kvlSc4Fo5CJ6evChCON8nOnPa3pPUpItiNIj8XrqXqKY+8tpgry+TGcPKl2KbqoNAQuM L+14Z2u0eikfH8pagbqb+w+RjdxOqp2ppq2Y1mm/KezkpIBiX5Z5RBHWDNEkTpTrSvij wTjva5nBkLisPn7PCgoLr5skE8pwOhT1iB+isPUVN13xw45gYtF72vtTnJ79WrhAYpkp ArYA== X-Gm-Message-State: APjAAAUbAdwU1KuQqAcIEsScwetZcQ+kFmquQZ8QZ7NlVScFDsYZop7v WhwG0iZyNVBdMgm1kBNQeYaqym6xDbziVTWK/ETXnnZ8f3M= X-Google-Smtp-Source: APXvYqypsVh077a2of3ZvC9p0jnS/eh4XvbuDqu4vDEFETVeeLu8bG5sfy04mvc2wg15BD4aVSRY8W9nkmzZutkWAM4= X-Received: by 2002:adf:e2cf:: with SMTP id d15mr27393306wrj.225.1577072998749; Sun, 22 Dec 2019 19:49:58 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Sun, 22 Dec 2019 23:02:52 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173660 Archived-At: --000000000000e01ce6059a56eb9b Content-Type: text/plain; charset="UTF-8" When display-line-numbers is set to 'relative', the number of spaces before the digits starts growing (to two) when the current line hits 43 in my case. Of course, no other line has more than two digits as the screen only has 56 lines in total so the growing of spaces (and columns) is not needed at all and of course is undesired. This behavior seems to be correctly implemented but for absolute line numbers, where hitting line 43 means the bottom line is close to start showing numbers with three digits. The current line always showing the absolute line number is another big problem as it will make the number of columns to grow and srink anyway. This growing and shrinking could be totally prevented if users were able to remove or configure the contents of the current line indicator. If configurable, a custom face would be also very good. For example a colored "-" indicating the current line would be nice for many users. Lastly and less important, it would be great to be able to remove the space before the first numeric character! To make line-numbers-mode as less invasive and noticeable as possible. This feature (relative line numbers) is AWESOME, especially when used with evil-mode as it allows to navigate the code VERY fast by prefixing next/previous-line commands with exact numbers. No "fast mental math" (when using absolute line-numbers) or inaccurate guessings are needed, only correct information. But I think the first two issues should be addresed to make relative line-numbers really usable without drawbacks. Thank you for reading. --000000000000e01ce6059a56eb9b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When display-line-numbers is set to 'relative', th= e number of spaces before the digits starts growing (to two) when the curre= nt line hits 43 in my case. Of course, no other line has more than two digi= ts as the screen only has 56 lines in total so the growing of spaces (and c= olumns) is not needed at all and of course is undesired. This behavior seem= s to be correctly implemented but for absolute line numbers, where hitting = line 43 means the bottom line is close to start showing numbers with three = digits.

The current line always showing the absolute line number is = another big problem as it will make the number of columns to grow and srink= anyway. This growing and shrinking could be totally prevented if users wer= e able to remove or configure the contents of the current line indicator. I= f configurable, a custom face would be also very good. For example a colore= d "-" indicating the current line would be nice for many users.
Lastly and less important, it would be great to be able to remove the= space before the first numeric character! To make line-numbers-mode as les= s invasive and noticeable as possible.


This feature (relative li= ne numbers) is AWESOME, especially when used with evil-mode as it allows to= navigate the code VERY fast by prefixing next/previous-line commands with = exact numbers. No "fast mental math" (when using absolute line-nu= mbers) or inaccurate guessings are needed, only correct information. But I = think the first two issues should be addresed to make relative line-numbers= really usable without drawbacks.

Thank you for reading.
--000000000000e01ce6059a56eb9b--