From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Steve Purcell Newsgroups: gmane.emacs.bugs Subject: bug#28248: 26.0.50; display-line-numbers does not affect window-width / window-text-width Date: Tue, 17 Oct 2017 19:19:11 +1300 Message-ID: References: <834lst5bep.fsf@gnu.org> <83d15mfqoj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.0 \(3445.1.7\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508221219 9909 195.159.176.226 (17 Oct 2017 06:20:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 17 Oct 2017 06:20:19 +0000 (UTC) Cc: 28248@debbugs.gnu.org, Dmitry Gutov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 17 08:20:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4LEP-0000ZE-Vt for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Oct 2017 08:20:02 +0200 Original-Received: from localhost ([::1]:36736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4LEX-0002H6-BG for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Oct 2017 02:20:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4LEQ-0002Gm-UP for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 02:20:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4LEQ-0006KF-1J for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 02:20:02 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4LEP-0006K7-Uj for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 02:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e4LEP-0006AF-NN for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 02:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Steve Purcell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2017 06:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28248 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28248-submit@debbugs.gnu.org id=B28248.150822117223654 (code B ref 28248); Tue, 17 Oct 2017 06:20:01 +0000 Original-Received: (at 28248) by debbugs.gnu.org; 17 Oct 2017 06:19:32 +0000 Original-Received: from localhost ([127.0.0.1]:44665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4LDw-00069S-79 for submit@debbugs.gnu.org; Tue, 17 Oct 2017 02:19:32 -0400 Original-Received: from purcellpeople.com ([85.214.32.38]:43570 helo=h1189701.stratoserver.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4LDu-00069D-Kk for 28248@debbugs.gnu.org; Tue, 17 Oct 2017 02:19:31 -0400 Original-Received: from [192.168.0.10] (210-55-84-130.dialup.xtra.co.nz [210.55.84.130]) by h1189701.stratoserver.net (Postfix) with ESMTPSA id E79D727AC0A3; Tue, 17 Oct 2017 08:19:16 +0200 (CEST) In-Reply-To: <83d15mfqoj.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.1.7) 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: 208.118.235.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:138582 Archived-At: On 17 Oct 2017, at 15:34, Eli Zaretskii wrote: >=20 >> That would be the actual amount of "screen estate used up for >> line-number display". >>=20 >> Can I rely on the extra value always being 2? >=20 > 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, this is helpful. I have some code which calculates the width of = the buffer contents in characters, and calculating this pixelwise works = nicely for me. The odd thing is that there=E2=80=99s a one character discrepancy = between graphical and terminal frames. It=E2=80=99s not related to the = new line numbers support, since an adjustment for that discrepancy has = always been necessary in the code, and the native line numbers are not = present in the terminal anyway. Any idea where that one-column = difference might be coming from? = https://github.com/purcell/page-break-lines/blob/610dbdc9d39a37912e2b8bfbd= 3e3d15c7e5d622f/page-break-lines.el#L128-L134=