From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: Display line number on each buffer line Date: Thu, 02 Dec 2021 20:42:20 +0000 Message-ID: <87fsrayc0j.fsf@posteo.net> References: <87mtljmmqh.fsf@gnus.org-MpuGQO3----2> <875ys7z7pl.fsf@posteo.net-MpuQz9y----2> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22450"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fatiparty@tutanota.com, Lars Ingebrigtsen To: fatiparty--- via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 02 21:43:17 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1mssvE-0005dU-3D for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Dec 2021 21:43:16 +0100 Original-Received: from localhost ([::1]:54902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mssvC-0005Yq-3H for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Dec 2021 15:43:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mssuQ-0005YS-SS for help-gnu-emacs@gnu.org; Thu, 02 Dec 2021 15:42:26 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:48287) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mssuO-0007ET-D3 for help-gnu-emacs@gnu.org; Thu, 02 Dec 2021 15:42:26 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D9A14240104 for ; Thu, 2 Dec 2021 21:42:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1638477741; bh=AoQ/CSrIvl24idiMHqf3CVIm7IOIufSIB0DGkPxv5i0=; h=From:To:Cc:Subject:Date:From; b=LcXauwjhkX8s9HsGxjXQfJUD0GwUGpAYyd93ziZmFaQTILjcQ/QxlLHgo3/QElKqX OUMJAyp2j5RjaRjXh6urAN8mqgCVBsbMWsePRcANEFmrceXPnrWPbA5pfIPVDaiq0q dqPW8CuOgRTa1Mxab40AvXylfnQXkD2TInetGhzXzZyKmLUwLFFsxJCRa2tui0eGoJ nikBtl/2bKPTcCIuybWnep+dq9wu9TgLXC94yDoFEEqXIEAtCmIknIXg6gJuND4Q+C hoUb7xo20E1/QAiAp7ZS1ohl1+gaUbH4Bn+hlEzUACh5EMGUusAbe00wvpX1AgwLUW DmBKBMYolPClQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4J4nvJ6WRtz6tmH; Thu, 2 Dec 2021 21:42:20 +0100 (CET) In-Reply-To: (fatiparty's message of "Thu, 2 Dec 2021 13:06:29 +0100 (CET)") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134798 Archived-At: fatiparty--- via Users list for the GNU Emacs text editor writes: > Dec 2, 2021, 09:17 by philipk@posteo.net: > >> fatiparty--- via Users list for the GNU Emacs text editor >> writes: >> >>> Dec 2, 2021, 08:31 by larsi@gnus.org: >>> >>>> fatiparty--- via Users list for the GNU Emacs text editor >>>> writes: >>>> >>>>> Is there a way to display the line number on each buffer line? >>>>> >>>> >>>> `M-x display-line-numbers-mode' >>>> >>> That's what I was looking for.=C2=A0 Is there a technique for changing = the foreground colour of the line number as well? >>> >> >> You can customise the faces line-number (for all lines) and >> line-number-current-line (for the current line). Use `M-x >> customize-face [face name]' to do this interactively. >> > > That is good, but I want to do that from my init file if possible.=C2=A0 = Is there a way to reduce the line number size as well? Something like this should be enough: --8<---------------cut here---------------start------------->8--- (set-face-background 'line-number "red") (set-face-foreground 'line-number-current-line "blue") --8<---------------cut here---------------end--------------->8--- --=20 Philip Kaludercic