From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Emacs pretest: highlight line number in display-line-numbers-mode? Date: Thu, 19 Oct 2017 10:18:25 -0700 (PDT) Message-ID: <25a064f1-c267-49f7-a8de-b28baee928ac@default> References: <87a80ntah3.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508433579 23942 195.159.176.226 (19 Oct 2017 17:19:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Oct 2017 17:19:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Robert Pluim , Sivaram Neelakantan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 19 19:19:30 2017 Return-path: Envelope-to: geh-help-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 1e5ETW-0003uZ-S3 for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Oct 2017 19:19:18 +0200 Original-Received: from localhost ([::1]:50377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5ETd-0003wY-UY for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Oct 2017 13:19:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5ESm-0003uo-RR for help-gnu-emacs@gnu.org; Thu, 19 Oct 2017 13:18:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5ESk-0007tt-6Y for help-gnu-emacs@gnu.org; Thu, 19 Oct 2017 13:18:32 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:47963) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e5ESj-0007t0-Uf for help-gnu-emacs@gnu.org; Thu, 19 Oct 2017 13:18:30 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9JHIRLv002782 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Oct 2017 17:18:27 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9JHIQNw019810 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Oct 2017 17:18:26 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9JHIQ8m011821; Thu, 19 Oct 2017 17:18:26 GMT In-Reply-To: <87a80ntah3.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114581 Archived-At: > > Is there a way to highlight the current line number on the fringe in a ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > different face where the cursor is? Like hl-line-mode except just the > > line number is bold or in a different colour? >=20 > Face: line-number-current-line (sample) (customize this face) (The line number is not actually in the fringe, BTW.) Not that I really care, for myself, as I don't use line-number display, but this is yet another case of the misguided (IMHO) use of a face that does not appear differently from others by default. If the default value of face `line-number-current-line' looked different from that of face `line-number' then there would be little need to pose the question of whether you can highlight the current line number differently. The only question then might be how to do so. (I have never understood why Emacs sometimes chooses to provide a face and yet "hide" it from users by default. That seems very wrong.) An additional problem (is there a good answer here?) is that this face is used in a place where you cannot put the cursor and use `C-u C-x =3D' to find out what the face is. To find the face used, I use `list-faces-display' and look for either a face name that is a likely candidate (`line-number' is pretty obvious, in this case) or a face appearance that matches what I see. Maybe we could have a mouse command (e.g. bound to some prefix key plus a mouse click) that would let you get the same info that `C-u C-x =3D' provides by clicking in (at least some) places where there is no text? But it doesn't seem like a click on a displayed line number registers a particular event that is different from clicking on nearby buffer text (unlike the case for clicking in the fringe, for instance), so perhaps this is not feasible for at least some click spots. Still, it would presumably be possible for some such non-text spots, such as the fringe.