Subject: bug#76566: [PATCH] Implement display-line-numbers-spacing-width

From: Eli Zaretskii <[email-masked]>
Date: Wed, 26 Feb 2025 18:08:21 +0200

> Date: Wed, 26 Feb 2025 09:32:19 +0200
> Cc: [email-masked]
> From: Miro Palmu <[email-masked]>
> 
> > Thanks, but I'm not sure I like this feature, especially when there
> > are no spaces.
> > 
> > Why is this needed?
> 
> 
> I like to use relative numbering and maximize available room for text.

And you cannot achieve that by customizing the line-number face to use
a font where the SPC character is thin enough for your taste?

> Columns taken by line numbers go from 4 to 2 when the spacing is set to zero.
> Setting just display-line-numbers-width does not remove the spaces.

Completely removing the space will show the numbers as if they were
part of buffer test, which will be confusing.  The space makes the
numbers stand out.  AFAIK, all the other IDEs which show line numbers
also have some separators.

In any case, disabling the spaces and controlling how many spaces are
there are not the same: the former is just a boolean flag, whereas the
latter is more complex, and the code will be slower.  This mode was
implemented in the display engine to solve the performance impact of
linum-mode, so I'm not very fond of adding hair to it and slowing it
down.  People who want fancy customization of the line numbers can
simply use linum-mode.