unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: emacs-devel@gnu.org
Subject: Clarify display-line-numbers width in manual
Date: Sat, 17 Oct 2020 07:30:49 +0200	[thread overview]
Message-ID: <CAO48Bk-4OKUM45=U7xRq=yXqjgNscNxj0LO+O2uoRA7FfxTBMA@mail.gmail.com> (raw)

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

HI

I recently had to migrate to display-line-numbers-mode. It was hard to find
what I wanted in the manual at first glance, which was how to set the width
of the line numbers to fixed width. It was somehow buried in a paragraph
along with other succinct explanations for other variables.

Here is a proposal to highlight the variable in the manual

diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index a4040d9..ee76e77 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1882,6 +1882,12 @@ Display Custom
 non-@code{nil}.  It has no effect when set to zero, or when line
 numbers are not absolute.

+@vindex display-line-numbers-width
+Set the value of @code{display-line-numbers-width} to fix the width
+of the line number. Make sure it is large enough for the largest files
+you expect to edit (e.g. @code{4} would allow up to @code{9999} lines
+to be displayed correctly)
+
 @vindex display-line-numbers-width-start
 @vindex display-line-numbers-grow-only
 @vindex display-line-numbers-width

Best, /Pedro A.
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

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

             reply	other threads:[~2020-10-17  5:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17  5:30 Pedro Andres Aranda Gutierrez [this message]
2020-10-17  8:49 ` Clarify display-line-numbers width in manual Eli Zaretskii
2020-10-18 16:01   ` Pedro Andres Aranda Gutierrez

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAO48Bk-4OKUM45=U7xRq=yXqjgNscNxj0LO+O2uoRA7FfxTBMA@mail.gmail.com' \
    --to=paaguti@gmail.com \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).