From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: steve@sanityinc.com, 28248@debbugs.gnu.org
Subject: bug#28248: 26.0.50; display-line-numbers does not affect window-width / window-text-width
Date: Tue, 17 Oct 2017 11:23:56 +0300 [thread overview]
Message-ID: <785ae770-ea0a-ec74-c986-fde32a48ab0f@yandex.ru> (raw)
In-Reply-To: <83d15mfqoj.fsf@gnu.org>
On 10/17/17 5:34 AM, Eli Zaretskii wrote:
>> Should I always use (+ 2 (line-number-display-width)) instead?
>
> If you need it in columns, yes. This is for consistency with the
> value of display-line-numbers-width, which you can set.
>
>> That would be the actual amount of "screen estate used up for
>> line-number display".
>>
>> Can I rely on the extra value always being 2?
>
> As long as we don't change the implementation, yes. Alternatively,
> you can call line-number-display-width with the optional argument and
> get the result in pixels, in which case it includes everything (you
> can divide by frame-char-width to get the result back in columns).
Thanks, but isn't that more inconsistent? I would expect both return
values of this function to measure the same thing, and there's nothing
in the docstring to explain that difference.
On the other hand, the return value of the function can differ from what
a variable is set to.
I guess I could live with that, but the function's docstring needs updating.
next prev parent reply other threads:[~2017-10-17 8:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-27 5:40 bug#28248: 26.0.50; display-line-numbers does not affect window-width / window-text-width Steve Purcell
2017-08-27 9:15 ` Stephen Berman
2017-08-27 14:37 ` Eli Zaretskii
2017-08-27 14:32 ` Eli Zaretskii
2017-10-16 21:56 ` Dmitry Gutov
2017-10-17 2:34 ` Eli Zaretskii
2017-10-17 6:19 ` Steve Purcell
2017-10-17 7:01 ` Eli Zaretskii
2017-10-17 7:31 ` Steve Purcell
2017-10-17 8:15 ` Eli Zaretskii
2017-10-17 8:23 ` Dmitry Gutov [this message]
2017-10-17 16:33 ` Eli Zaretskii
2017-10-18 0:33 ` Dmitry Gutov
2017-10-18 16:35 ` Eli Zaretskii
2017-10-18 22:40 ` Dmitry Gutov
2017-10-19 3:15 ` Eli Zaretskii
2017-10-20 9:44 ` Eli Zaretskii
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=785ae770-ea0a-ec74-c986-fde32a48ab0f@yandex.ru \
--to=dgutov@yandex.ru \
--cc=28248@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=steve@sanityinc.com \
/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.