From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29597: 26.0.90; line-number-display-width returns incorrect width Date: Fri, 08 Dec 2017 16:22:40 +0200 Message-ID: <83d13pwb7z.fsf@gnu.org> References: <1512697446.3649570.1197990904.2822A9C1@webmail.messagingengine.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1512743050 308 195.159.176.226 (8 Dec 2017 14:24:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Dec 2017 14:24:10 +0000 (UTC) Cc: 29597@debbugs.gnu.org To: Paul Rankin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 08 15:24:05 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 1eNJZM-0008LR-9i for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Dec 2017 15:24:04 +0100 Original-Received: from localhost ([::1]:37503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNJZT-0005gH-IO for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Dec 2017 09:24:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNJZO-0005g8-4k for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 09:24:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNJZK-0001CM-6U for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 09:24:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42861) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNJZK-0001CH-2R for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 09:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eNJZJ-0008Ob-SR for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 09:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Dec 2017 14:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29597 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 29597-submit@debbugs.gnu.org id=B29597.151274299432214 (code B ref 29597); Fri, 08 Dec 2017 14:24:01 +0000 Original-Received: (at 29597) by debbugs.gnu.org; 8 Dec 2017 14:23:14 +0000 Original-Received: from localhost ([127.0.0.1]:51542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNJYY-0008NW-7J for submit@debbugs.gnu.org; Fri, 08 Dec 2017 09:23:14 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNJYW-0008NI-LD for 29597@debbugs.gnu.org; Fri, 08 Dec 2017 09:23:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNJYN-0000l5-57 for 29597@debbugs.gnu.org; Fri, 08 Dec 2017 09:23:07 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNJYN-0000l1-20; Fri, 08 Dec 2017 09:23:03 -0500 Original-Received: from [176.228.60.248] (port=3171 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eNJYM-0004nc-83; Fri, 08 Dec 2017 09:23:02 -0500 In-reply-to: <1512697446.3649570.1197990904.2822A9C1@webmail.messagingengine.com> (message from Paul Rankin on Fri, 08 Dec 2017 11:44:06 +1000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:140812 Archived-At: > From: Paul Rankin > Cc: eliz@gnu.org > Date: Fri, 08 Dec 2017 11:44:06 +1000 > > I had a look in the source of display-line-numbers.el in the repo but cannot find the definition of line-number-display-width. > > But this is irrelevant, the line number width is clearly 4 characters, lining up with File in the menu bar. > > (string-width "File") > 4 > > It clearly fails to count to four. Adding a docstring that 2 really equals 4 is absurd. Like I said, it behaves as designed: returns the number of digits used to display the line number. (The source is in indent.c.) If you need something different for your needs, the function can provide 2 other related values, controlled by the optional; variable. All of that is in the doc string on the release branch, and also in the ELisp manual. > Please don’t close bugs until they’re actually closed. I didn't close this bug, so I'm not sure why you are asking to do something that we always don anyway.