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 01:35:55 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d4f1cf059a57905b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="60285"; 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 07:44:13 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 1ijHRt-000Fa5-9F for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Dec 2019 07:44:13 +0100 Original-Received: from localhost ([::1]:53996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijHRr-0000Uz-CF for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Dec 2019 01:44:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51271) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijHRj-0000Uf-MC for bug-gnu-emacs@gnu.org; Mon, 23 Dec 2019 01:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijHRi-0002vQ-7x for bug-gnu-emacs@gnu.org; Mon, 23 Dec 2019 01:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44532) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ijHRi-0002tq-0n for bug-gnu-emacs@gnu.org; Mon, 23 Dec 2019 01:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ijHRh-0002VJ-Tv for bug-gnu-emacs@gnu.org; Mon, 23 Dec 2019 01:44:01 -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 06:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 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.15770834239582 (code B ref -1); Mon, 23 Dec 2019 06:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Dec 2019 06:43:43 +0000 Original-Received: from localhost ([127.0.0.1]:50503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijHRO-0002UT-Ms for submit@debbugs.gnu.org; Mon, 23 Dec 2019 01:43:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:38199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijFS1-0007cG-CT for submit@debbugs.gnu.org; Sun, 22 Dec 2019 23:36:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijFRz-0006pM-T1 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 23:36:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijFRx-0008MV-C5 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 23:36:10 -0500 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:35427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ijFRx-0008Bf-1i for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 23:36:09 -0500 Original-Received: by mail-wm1-x32d.google.com with SMTP id p17so14997800wmb.0 for ; Sun, 22 Dec 2019 20:36:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=qnqdXMkzZ8T/JLFU2wGVISmEKnZY6dUkzd8YTbWZZnY=; b=FxKJUheMwTbGIzit4yR+GoJCX8YU/cI63/JXaGR8Z+XQYEu01uat7+asSt7v0MuiFd iDYVA39mndBuKTETo45HefIbR6grPQh4EpK2A4dTwSemnUQE7Q57AoZzv6bfBD0RMMUV 6eZN4Dzcie4vEpJ7joYuyi5vsaCFP6OxU1IpNTGAiXEiHoA0DlHI2wlEr978cTWJZPyf EGNzDm8ETkuXP97NROaOEngN6TK+SCBhNXo3c5JUw8wzvguEa4PqZqLgVNfi/Skzjg+w Z3Jy3woGC3uqu9Hh0mBf1S6a6MMHM3VaMz4Qp3/Wobkrr8cFvqkcf7Yna+MqDXGW4Xgf SISg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=qnqdXMkzZ8T/JLFU2wGVISmEKnZY6dUkzd8YTbWZZnY=; b=Io3CBpPFbejWP88vITABjoKcSsndczBIHeGsTiMF00VcnXBahMdUXvgcxi/foHtPT3 tQCeyM6t6XH8Ubed4fWLDK2ccD0ppkT+u3MAQgsD4i4ScWHzpDyj9mx1jRkcaiRNPLya 6oN6nialFRGSM9dB2YN1I0E+0O8kQ90yEh+5YMYoWVLhS1Jo+wWUBuUfKiOiTh2JlJHm iZdwbrTzGVMKDNPR3We5brRO/81+B4r+F2mQ6P0M5Q5wMIBbvSHBJg5N/r8sejWUdzCC 4nAm5t2rBQbcmTpjl6QV2S3KZd8o2HgtKp2hjge2/61It+R/yRUTbSFglXhfB64HHiB0 eitw== X-Gm-Message-State: APjAAAXzBeHNuuuM3Zy8b8Ox7dWwJlcnPOhF5Pmw+QfApFPuBaTxiy0s 6jpEHwJwdvkXFhBoJNFLh89niZSXCW4WcELRyUI36QHV X-Google-Smtp-Source: APXvYqydum0v8PLTWnT4AVi6kQ3U9sQZxtPrHsyWa0eCTcvq/DRGkohJ0zqtGK5iBWl94vqovT3ThtQ++5cFxnja9Pk= X-Received: by 2002:a7b:c4c5:: with SMTP id g5mr29600328wmk.85.1577075766258; Sun, 22 Dec 2019 20:36:06 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Mon, 23 Dec 2019 01:43:40 -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:173661 Archived-At: --000000000000d4f1cf059a57905b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Of course, evil-mode has a command, meaning "go to nth line", where the number of line is absolute and could be used with absolute_line_numbers. But I think nobody commonly uses this command, or at least, this command is not needed as relative line numbers allows the same behavior with the far more used and easier and commands, meaning "nex-line" and "previous line". Also moving around with relative numbers will always be two digits (key presses) while absolute can be quite higher. I don't understand why relative line numbers are so uncommon. Le lun. 23 d=C3=A9c. 2019 =C3=A0 00:49, Franco A. Cortesi a =C3=A9crit : > 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 i= n > 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 4= 3 > 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 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 le= ss > invasive and noticeable as possible. > > > This feature (relative line numbers) is AWESOME, especially when used wit= h > evil-mode as it allows to navigate the code VERY fast by prefixing > next/previous-line commands with exact numbers. No "fast mental math" (wh= en > 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. > --000000000000d4f1cf059a57905b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Of course, evil-mode has a <gg> command, meaning &qu= ot;go to nth line", where the number of line is absolute and could be = used with absolute_line_numbers. But I think nobody commonly uses this <= gg> command, or at least, this command is not needed as relative line nu= mbers allows the same behavior with the far more used and easier <j> = and=C2=A0 <k> commands, meaning "nex-line" and "previo= us line". Also moving around with relative numbers will always be two = digits (key presses) while absolute can be quite higher. I don't unders= tand why relative line numbers are so uncommon.



Le=C2=A0lun. 23 = d=C3=A9c. 2019 =C3=A0=C2=A000:49, Franco A. Cortesi <cortesifranco3@gmail.com> a =C3=A9crit=C2= =A0:
When display-line-numbers is set to 'relative', the number of= spaces before the digits starts growing (to two) when the current line hit= s 43 in my case. Of course, no other line has more than two digits as the s= creen 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 cor= rectly implemented but for absolute line numbers, where hitting line 43 mea= ns 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. Th= is growing and shrinking could be totally prevented if users were able to r= emove or configure the contents of the current line indicator. If configura= ble, a custom face would be also very good. For example a colored "-&q= uot; indicating the current line would be nice for many users.

Lastl= y and less important, it would be great to be able to remove the space befo= re 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 t= he code VERY fast by prefixing next/previous-line commands with exact numbe= rs. No "fast mental math" (when using absolute line-numbers) or i= naccurate guessings are needed, only correct information. But I think the f= irst two issues should be addresed to make relative line-numbers really usa= ble without drawbacks.

Thank you for reading.
--000000000000d4f1cf059a57905b--