From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Native line numbers, final testing Date: Mon, 10 Jul 2017 20:00:10 +0300 Message-ID: <83van0i5wl.fsf@gnu.org> References: <83y3s9pm2a.fsf@gnu.org> <87vandz7lw.fsf@lylat> <83wp7tpcav.fsf@gnu.org> <87r2y1z45o.fsf@lylat> <83vandp7wz.fsf@gnu.org> <87mv8pyy7f.fsf@lylat> <83shigpoxq.fsf@gnu.org> <87mv8nkh31.fsf@lylat> <83bmp3pnmb.fsf@gnu.org> <87eftzju5g.fsf@lylat> <837ezqq3gd.fsf@gnu.org> <874luuyuqy.fsf@lylat> <83wp7po86m.fsf@gnu.org> <87fuecc7vg.fsf@lylat> <83y3s2n5pa.fsf@gnu.org> <878tk1rmjx.fsf@lylat> <83a84gn4z9.fsf@gnu.org> <837ezkmwfg.fsf@gnu.org> <874lumps82.fsf@lylat> <8337a5ja4p.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1499706322 20018 195.159.176.226 (10 Jul 2017 17:05:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2017 17:05:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: James Cloos Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 10 19:05:18 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dUc7X-0004sa-Ms for ged-emacs-devel@m.gmane.org; Mon, 10 Jul 2017 19:05:15 +0200 Original-Received: from localhost ([::1]:42139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUc7c-0001CO-UB for ged-emacs-devel@m.gmane.org; Mon, 10 Jul 2017 13:05:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUc2l-0005t2-LV for emacs-devel@gnu.org; Mon, 10 Jul 2017 13:00:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUc2h-0003cV-P1 for emacs-devel@gnu.org; Mon, 10 Jul 2017 13:00:19 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUc2h-0003cR-M8; Mon, 10 Jul 2017 13:00:15 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4257 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dUc2h-00035b-18; Mon, 10 Jul 2017 13:00:15 -0400 In-reply-to: (message from James Cloos on Mon, 10 Jul 2017 01:35:12 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216424 Archived-At: > From: James Cloos > Cc: emacs-devel@gnu.org > Date: Mon, 10 Jul 2017 01:35:12 -0400 > > >>>>> "EZ" == Eli Zaretskii writes: > > EZ> The doc string for the 'line-number' face explicitly tells to use > EZ> fixed-pitch font for the face. > > I hadn't gotten that far; I only called M-x set-variable in a buffer > which was already in variable-pitch-mode, and then toggled v-p-m a > couple of time to compare w/ and w/o. I hadn't gone looking for the > name of the face used by the line numbers. The line-number face by default inherits from the 'default' face. So how did you get into a situation where the frame's default face uses a variable-pitch font? Did you invoke Emacs with -fn option, or do you have some mode which creates a frame with the face parameter that specifies a variable-pitch font? > Perhaps what I should have written is that the default face for line- > number should not be affected by enabling variable-pitch-mode. I didn't think people would have frames whose default face is variable-pitch. Does the patch below give good results? > >> The code might need to check whether the current face provides a glyph > >> for FIGURE SPACE. > > EZ> And if not? > > Then it would have had to ignore FIGURE SPACE and fall back to SPACE... Btw, I don't really see how FIGURE SPACE could solve the problem at hand anyway. AFAIU, that character is simply a space whose width is the same as that of digits. So it's appropriate for when thousands separator is a space, but it cannot magically align a number displayed with a variable-pitch font. Am I missing something? Here's the patch I propose to fix your variable-pitch problem: diff --git a/lisp/faces.el b/lisp/faces.el index c3693d1..52a4db5 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2467,7 +2467,7 @@ trailing-whitespace ;; Definition stolen from linum.el. (defface line-number - '((t :inherit (shadow default))) + '((t :inherit (shadow default) :family "Monospace Serif")) "Face for displaying line numbers. This face is used when `display-line-numbers' is non-nil.