From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov 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 00:56:45 +0300 Message-ID: References: <834lst5bep.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1508191039 32483 195.159.176.226 (16 Oct 2017 21:57:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2017 21:57:19 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 Cc: 28248@debbugs.gnu.org To: Eli Zaretskii , Steve Purcell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 16 23:57:15 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 1e4DNi-0006rj-05 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2017 23:57:06 +0200 Original-Received: from localhost ([::1]:35398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4DNp-0003pW-Bi for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2017 17:57:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4DNj-0003oz-8l for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 17:57:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4DNe-0006QJ-F7 for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 17:57:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35697) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4DNe-0006QB-AQ for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 17:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e4DNe-0007BI-1A for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 17:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Oct 2017 21:57: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.150819101527589 (code B ref 28248); Mon, 16 Oct 2017 21:57:01 +0000 Original-Received: (at 28248) by debbugs.gnu.org; 16 Oct 2017 21:56:55 +0000 Original-Received: from localhost ([127.0.0.1]:44378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4DNX-0007Av-7P for submit@debbugs.gnu.org; Mon, 16 Oct 2017 17:56:55 -0400 Original-Received: from mail-wm0-f53.google.com ([74.125.82.53]:46004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4DNW-0007Ah-0C for 28248@debbugs.gnu.org; Mon, 16 Oct 2017 17:56:54 -0400 Original-Received: by mail-wm0-f53.google.com with SMTP id q124so147975wmb.0 for <28248@debbugs.gnu.org>; Mon, 16 Oct 2017 14:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=85Lf/tPdQs51rS6dW51NIzLfpOGkEBo5jEVVtzamKCQ=; b=rJKJD3aLr4afbsf4WU4kpebRLQzx3ufpI2elZd2AXgPTo7BE3aExgfmdIGuiLg+rqb PZ1lB7EC4naf6hom0wibu5KwyVsQLA2pveNBOHxaJ5OS6/ltltKmMZtgD39i9Xhrrx6F RVr8WPK/aojjvJwfKIQewdKOe/c0+L0bLi5cjotRhqgHNDJ9ei9zk7zBlvcZTY297loj DtkecQrkGO3kWO/3wCEkzPEIIs/mj7wPGDpMSAy5OGA7NEfXU+vHAC0nwm7Mj+uhimlC AIGImCvu4NZJqBH0S31/CfV8CsEBUAafBKoPnMvHWJ8VAjSKdrcvhznxM1p8ek2LMwyx S+rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=85Lf/tPdQs51rS6dW51NIzLfpOGkEBo5jEVVtzamKCQ=; b=sSqilpoppDScv9jKIUot2dEgWEl6HcB6VQbhHYIPn1dSm4fwlSzJNlv9yiCeFuz4d9 iR3uV9EPOJ0jJMAbUgTK2pxQaz6Zs+Fu5im23vsmBPVX3uHxihF9YMjyOjF4tw1QsIoh qXNUzjrBqKjkzW9qPpz495027yrCYQAa/4ERQ1wIexjmSz8b7D81WjvxHs94CZT1kA6p 7XtGa4iOJM5b5b6MEL1ITAWJL+iO0/xsex1y9tVlYR45Qc3Z94JEHDH4O+pDr512SXVv oBig/VqRoglt+FsKZFHxmM7B+TUoX9NMzk0hV14ADo61jHvP7FHh+qnpMlN5mCcJyjcH wqWg== X-Gm-Message-State: AMCzsaWIFACTPyxyD2CYTcCpF5Sp/s/eO9Gcicc0BzmuUW/31xcaVUta r/beFqczPjGACvPsWZvk6Fz8vMtQ X-Google-Smtp-Source: ABhQp+Q2gUxAY+EWMAWRJzIFQ4+0JlzGoFOFM4wJYNLQ8lW2I2+dLmwloEzcaRTKKA/i0LyMEbwWlw== X-Received: by 10.28.137.193 with SMTP id l184mr1800421wmd.24.1508191007951; Mon, 16 Oct 2017 14:56:47 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id c37sm15738298wra.73.2017.10.16.14.56.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 14:56:46 -0700 (PDT) In-Reply-To: <834lst5bep.fsf@gnu.org> Content-Language: en-US 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:138558 Archived-At: Hey Eli, On 8/27/17 5:32 PM, Eli Zaretskii wrote: >> and there is also no variable which contains the current width of >> the line numbers. This all means there is no way to determine the >> width of the text area of the window. > > Yes, there is. From NEWS: > > Lisp programs that need to know how much screen estate is used up for > line-number display in a window can use the new function > 'line-number-display-width'. Does it work as documented? E.g., I can enable display-line-numbers-mode, and they will take up 4 visual columns (numbers plus separators), but (line-number-display-width) returns 2. Should I always use (+ 2 (line-number-display-width)) instead? 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?