all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Franco A. Cortesi" <cortesifranco3@gmail.com>
To: 38717@debbugs.gnu.org
Subject: bug#38717: display-line-numbers set to relative
Date: Mon, 23 Dec 2019 00:49:47 -0300	[thread overview]
Message-ID: <CAOP1d78Rg5vGVKUQQqO8dar3C1iaOzLUz27S-jWfCUPeJe9Kjg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1644 bytes --]

             reply	other threads:[~2019-12-23  3:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23  3:49 Franco A. Cortesi [this message]
2019-12-23  4:35 ` bug#38717: display-line-numbers set to relative Franco A. Cortesi
2019-12-23 13:47 ` Eli Zaretskii
2020-01-15 19:50   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOP1d78Rg5vGVKUQQqO8dar3C1iaOzLUz27S-jWfCUPeJe9Kjg@mail.gmail.com \
    --to=cortesifranco3@gmail.com \
    --cc=38717@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.