all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Robert Pluim <rpluim@gmail.com>,
	Sivaram Neelakantan <nsivaram.net@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Emacs pretest: highlight line number in display-line-numbers-mode?
Date: Thu, 19 Oct 2017 10:18:25 -0700 (PDT)	[thread overview]
Message-ID: <25a064f1-c267-49f7-a8de-b28baee928ac@default> (raw)
In-Reply-To: <87a80ntah3.fsf@gmail.com>

> > 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?
> 
>         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 =' 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 =' 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.



  reply	other threads:[~2017-10-19 17:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 15:19 Emacs pretest: highlight line number in display-line-numbers-mode? Sivaram Neelakantan
2017-10-19 15:37 ` Robert Pluim
2017-10-19 17:18   ` Drew Adams [this message]
2017-10-19 20:09     ` Eli Zaretskii
     [not found]     ` <<834lquew6p.fsf@gnu.org>
2017-10-19 20:43       ` Drew Adams
2017-10-20  6:34         ` Eli Zaretskii
2017-10-20 13:49           ` Robert Pluim
2017-10-20 14:49             ` Eli Zaretskii
     [not found]           ` <<87mv4mexpo.fsf@gmail.com>
     [not found]             ` <<83h8utdgcq.fsf@gnu.org>
2017-10-20 15:18               ` Drew Adams
2017-10-20 15:42                 ` Eli Zaretskii
     [not found]         ` <<83376ee39c.fsf@gnu.org>
2017-10-20 15:18           ` Drew Adams
2017-10-20 15:52             ` Eli Zaretskii
     [not found] <<<krpqx3tvyv413v.fsf@gmail.com>
     [not found] <<krpqx3tvyv413v.fsf@gmail.com>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25a064f1-c267-49f7-a8de-b28baee928ac@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=nsivaram.net@gmail.com \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.