From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to get the line offset in `display-line-numbers-mode'? Date: Fri, 31 Jan 2020 21:29:02 +0200 Message-ID: <83k157jugx.fsf@gnu.org> References: <87o8uj3344.fsf@gnu.org> <19F7E60D-7D4A-41C1-B6E2-8FA5356738F9@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bzg@gnu.org, emacs-devel@gnu.org To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 31 20:30:12 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ixbzY-0000YY-Bs for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Jan 2020 20:30:12 +0100 Original-Received: from localhost ([::1]:58492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixbzX-0000W4-EJ for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Jan 2020 14:30:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53536) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixbyr-00085B-90 for emacs-devel@gnu.org; Fri, 31 Jan 2020 14:29:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ixbyp-0000vY-Pm; Fri, 31 Jan 2020 14:29:27 -0500 Original-Received: from [176.228.60.248] (port=4810 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ixbyl-00018W-Ds; Fri, 31 Jan 2020 14:29:23 -0500 In-reply-to: <19F7E60D-7D4A-41C1-B6E2-8FA5356738F9@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 31 Jan 2020 19:44:59 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244799 Archived-At: > From: Mattias EngdegÄrd > Date: Fri, 31 Jan 2020 19:44:59 +0100 > Cc: emacs-devel@gnu.org > > 31 jan. 2020 kl. 19.14 skrev Bastien : > > > Assuming display-line-numbers-mode is turned on, how can I get > > the number of spaces this mode uses for displaying numbers? > > It may not be the right way, but I ended up using > > (round (line-number-display-width 'columns)) That's the right way.