From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#34513: display-line-numbers in term mode Date: Wed, 27 Feb 2019 12:21:26 -0500 Message-ID: References: <20190217141940.62v754v46qwfcs2i@Ergus> <83h8cpkyi8.fsf@gnu.org> <8336o9kvph.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="246718"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 34513@debbugs.gnu.org, spacibba@aol.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 27 18:22:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz2uQ-00123n-Jo for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2019 18:22:18 +0100 Original-Received: from localhost ([127.0.0.1]:47869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz2uP-0002dB-Bx for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2019 12:22:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz2uF-0002co-SY for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 12:22:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gz2uD-0002Dx-M6 for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 12:22:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40737) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gz2uA-0002Cp-NV for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 12:22:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gz2uA-0005aw-6r for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 12:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Feb 2019 17:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34513 X-GNU-PR-Package: emacs Original-Received: via spool by 34513-submit@debbugs.gnu.org id=B34513.155128809521475 (code B ref 34513); Wed, 27 Feb 2019 17:22:02 +0000 Original-Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 17:21:35 +0000 Original-Received: from localhost ([127.0.0.1]:54281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gz2tj-0005aH-I1 for submit@debbugs.gnu.org; Wed, 27 Feb 2019 12:21:35 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:47481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gz2tf-0005a7-L1 for 34513@debbugs.gnu.org; Wed, 27 Feb 2019 12:21:33 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1RHLRsm006493; Wed, 27 Feb 2019 12:21:27 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id EE220AE0E9; Wed, 27 Feb 2019 12:21:26 -0500 (EST) In-Reply-To: <8336o9kvph.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 27 Feb 2019 19:06:02 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6492=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6492> : inlines <7025> : streams <1814269> : uri <2803177> 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: 209.51.188.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:155860 Archived-At: >> How 'bout display-line-numbers-width or display-line-numbers-current-width? > I think I considered those at the time, but found them not descriptive > enough. And how 'bout now? > And please remember that originally the code was entirely in C, so > there was no "package name" to use as prefix. Oh, of course. But I think in the current context, it would be good to bring that variable into the "display-line-numbers" prefix. At first, TAB completion gave me the impression that there was simply no way to know from Elisp the actual width, because the list of completions seemed long enough to have the appearance of exhaustiveness. >> >> - (ncols (/ window-width font-width))) >> >> + (ncols (- (/ window-width font-width) (line-number-display-width)))) >> > I think you want (line-number-display-width 'columns), since this >> > wants the canonical column units, right? >> Could be, I don't know. I don't know that all callers of >> window-max-chars-per-line want that either. > I hope someone does know. So do I. Martin maybe? Stefan