From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: Emacs pretest: highlight line number in display-line-numbers-mode? Date: Fri, 20 Oct 2017 15:49:07 +0200 Message-ID: <87mv4mexpo.fsf@gmail.com> References: > <87a80ntah3.fsf@gmail.com> <25a064f1-c267-49f7-a8de-b28baee928ac@default>> <834lquew6p.fsf@gnu.org>> <0da3bf1b-7d66-4462-8097-e9afe759e99d@default> <83376ee39c.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508507420 29674 195.159.176.226 (20 Oct 2017 13:50:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 13:50:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 20 15:50:16 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 1e5Xgd-0005hJ-WF for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 15:50:08 +0200 Original-Received: from localhost ([::1]:54134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Xgg-0004af-52 for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 09:50:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Xfp-0004Z5-8B for help-gnu-emacs@gnu.org; Fri, 20 Oct 2017 09:49:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5Xfk-00085G-VC for help-gnu-emacs@gnu.org; Fri, 20 Oct 2017 09:49:17 -0400 Original-Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]:45825) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5Xfk-00084S-O4; Fri, 20 Oct 2017 09:49:12 -0400 Original-Received: by mail-wr0-x22c.google.com with SMTP id k7so11426588wre.2; Fri, 20 Oct 2017 06:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=yh1vyMN6R1e0vdwQUKaAeBt6geN7lirMTy+CGkGgWnE=; b=s+uq9c1D3wA6cVpZn/c0NQkvONEnmsa1HG5dJdadpBuubQn56XwEjuZnhA2z7Ppk5J lgyvndoIhv3gKASw69oL56E3rmdL5iDFM1n3QVuwtfIBrgzq10nBKTQfsKOb4+nWS1x7 OInOd/fWHoxOq6NW+b0NFMbKwqb8UYbjnRZTFVFR5L32oZTU2SCtE32ntBnskImuObP1 VMavCaH90DEn1vn1QBKVppZ8J+5kdmHEOEd6Qc5prBikOQBuxEwuwwDhQ2JM9OqF2WMg pq7xs8/zjYLYCJdBP8dU9R+Jr28FqQqmT8cWA15e5TSGShWRmpG5ql5mwvqucdoZN4Gq +plg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=yh1vyMN6R1e0vdwQUKaAeBt6geN7lirMTy+CGkGgWnE=; b=o6fLf/ftDpRi+cMNlRlJfwkF9I17b+ZKt+HiT2DtfeLB5e841hH63C/dZbxneMZAm+ rk/66kF09eXuG+U7VoDYnpS5JElEbkaekfLVhU1hkfQaJ8ZpiwP+EOt9xBHZAkhvJdf4 Ov48Eh0xndQsXlD77gMxjg86H6jywEs4Ucyj2fHpf2KcOLBV0hjt2kEKv/3v6ZJLlJnL uWqDuia1EAVkusnZhKP0h5ZiIJIo3LrAUE/znpCT+l2Zx4hFfnnIZcX2kMDmxawmdZRa hEORyHPzvSnSfyx3ZlnILlTIYTYT5H0PFhuDCMAVlGPPxHMoagUWLShCKipU70JDc1KK E8Mg== X-Gm-Message-State: AMCzsaX5Oq0ZYnmCbFd/89oYsGPzWu0h7kdUlZoQP6kpdqW9lBR1nKrY p+OfwQK9v/PEnZZGs3ju3iW4+N3m X-Google-Smtp-Source: ABhQp+TaCC15P4+OX0SrmDYDTC8uZZxDZ7aC3F2pMVvbkFsAimhNiqYeN7Qvn+MfNTahFdw8olqmGA== X-Received: by 10.223.199.76 with SMTP id b12mr4936760wrh.14.1508507350618; Fri, 20 Oct 2017 06:49:10 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id h185sm2254827wma.19.2017.10.20.06.49.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2017 06:49:09 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <83376ee39c.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Oct 2017 09:34:39 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22c 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:114587 Archived-At: Eli Zaretskii writes: >> Date: Thu, 19 Oct 2017 13:43:06 -0700 (PDT) >> From: Drew Adams >> >> > This face is by default the same as line-number because of 2 reasons: >> > >> > . linum-mode did the same >> >> ...chasing that rabbit: Why did `linum-mode' do that? > > I don't know, but too many differences from a previous feature tend to > annoy people IME. nlinum-mode has an option to highlight the current line, disabled by default (I never turned it on because I didn't know it existed, but I do have it turned on for the builtin support) I'd vote for having the current line face have a background colour set. Calculating line numbers is going to slow things down anyway, so a little less speed doesn't matter to me. Something like: diff --git i/lisp/faces.el w/lisp/faces.el index a5f1d1dd32..a2bb2cd1b3 100644 --- i/lisp/faces.el +++ w/lisp/faces.el @@ -2487,7 +2487,12 @@ line-number :group 'display-line-numbers) (defface line-number-current-line - '((t :inherit line-number)) + '((((class color) (background light)) + :inherit line-number :background "grey95") + (((class color) (background dark)) + :inherit line-number :background "grey10") + (t + :inherit line-number :background "gray")) "Face for displaying the current line number. This face is used when `display-line-numbers' is non-nil. Robert