From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52905: 29.0.50; "fixed-pitch" face doesn't respect the font in "default-frame-alist" Date: Fri, 31 Dec 2021 09:26:44 +0200 Message-ID: <83v8z5grpn.fsf@gnu.org> References: <87a6ghc0ev.fsf@secretsauce.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40804"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52905@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 31 08:27:22 2021 Return-path: Envelope-to: geb-bug-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 1n3CJt-000AOA-6u for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Dec 2021 08:27:21 +0100 Original-Received: from localhost ([::1]:56030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3CJr-0005QQ-D3 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Dec 2021 02:27:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3CJc-0005QH-I8 for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 02:27:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3CJZ-0007us-Rc for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 02:27:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3CJZ-0007Qd-Kt for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 02:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Dec 2021 07:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52905 X-GNU-PR-Package: emacs Original-Received: via spool by 52905-submit@debbugs.gnu.org id=B52905.164093560628528 (code B ref 52905); Fri, 31 Dec 2021 07:27:01 +0000 Original-Received: (at 52905) by debbugs.gnu.org; 31 Dec 2021 07:26:46 +0000 Original-Received: from localhost ([127.0.0.1]:54999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3CJK-0007Q4-4l for submit@debbugs.gnu.org; Fri, 31 Dec 2021 02:26:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3CJI-0007Pr-L1 for 52905@debbugs.gnu.org; Fri, 31 Dec 2021 02:26:45 -0500 Original-Received: from [2001:470:142:3::e] (port=42706 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3CJD-0007oc-6Z; Fri, 31 Dec 2021 02:26:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/HfEyq/6BYdZVhyii6qC8aVJCCG+DNuyV0M+e6alQpk=; b=IMEslWJl3RgH R9af8qeS1Se5Oylih4jtb/aL1xQL2zJlSAIBNP6AaSOeX9dwKsJP15hYI4YE9PLmpLa8pqg9+DEIZ PTOggWn51t9iOXUwqbc5p2C0Uu99SZJ5afJdprd/xr/eHbHQ7NrosQ8IoQtno6jyQiwYzbj7dSv1p 6yt1GdGbOSjOSg1ek7YJ/Jrc8ZNv3oO9VS/ohjaKWdGtlDJekS3DqjeVNqkKEVG/LPBRSovNGf8rt bX4kkfuKZK0SBdt9w7of7Qr+5t3Eb1u+oPEEzY4+C8DveUjnwBSidVZ6ymgLFW3nlQcTvKl6w1qAt bn7CH7kMFcmzSmpdgTTnIA==; Original-Received: from [87.69.77.57] (port=4752 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3CJB-0004H7-Jn; Fri, 31 Dec 2021 02:26:37 -0500 In-Reply-To: <87a6ghc0ev.fsf@secretsauce.net> (message from Dima Kogan on Thu, 30 Dec 2021 12:17:44 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223463 Archived-At: > From: Dima Kogan > Date: Thu, 30 Dec 2021 12:17:44 -0800 > > In the last few months I've been observing some font handling updates in > emacs that cause an inconsistency with the way things are displayed. As > suggested by the emacs documentation, I set the font I want by touching > default-frame-alist. The docs are here: > > https://www.gnu.org/software/emacs/manual/html_node/emacs/Fonts.html > > I've had this setting in my .emacs for many years. Today this isn't > respected everywhere. A recipe: > > emacs -Q --eval \ > "(progn > (setf (alist-get 'font default-frame-alist) > \"-adobe-courier-medium-r-*-*-14-*-*-*-*-*-iso8859-*\") > (org-mode) > (insert \"abc\\n#+begin_\"))" > > Here I start up emacs without .emacs, but with some default-frame-alist > setting. I enter org-mode and insert some text. > > Invoking C-u C-x = on any of "abc" tells me that no particular face is > active there, and that my default font is being used. > > Invoking C-u C-x = on any of "#+begin_" tells me that the org-meta-line > face is active there. This face ultimately derives from the fixed-pitch > face, which uses a different monospace font: ftcrhb:-Bits-Bitstream Vera > Sans Mono-regular-normal-normal-*-14-*-*-*-m-0-iso10646-1. > > But I already selected a monospaced font in default-frame-alist, so I > expect to get the same font here, which was the case for many years. The > fixed-pitch face is defined like this in faces.el: > > (defface fixed-pitch > '((t :family "Monospace")) > "The basic fixed-pitch face." > :group 'basic-faces) > > I can "fix" this by resetting the fixed-pitch face to use the default: > > (defface fixed-pitch > '((t)) > "The basic fixed-pitch face." > :group 'basic-faces) > > > So is this a "bug"? Is this a documentation problem? Setting the default > font to a monospace font, as described by the emacs docs should end up > being picked up by the fixed-pitch face. You seem to assume that the default face's font is also the font used by the fixed-pitch face? There's no basis for this assumption: as long as a face defines :font or :family attributes, the font for that face is selected independently. The "Monospace" family doesn't stand for "the monospace font selected fro thedefault face", it stands for some font that belongs to the "Monospace" family. What exactly does that family include depends on your font back-end and the fonts installed on your system, but Vera Sans Mono doesn't sound like it shouldn't be in that family, it sounds right to me. So, given the data you presented, I don't yet see any bug, but a well-documented and expected behavior. If you want the same font for the fixed-pitch face, you should customize that face as well, e.g. by using set-face-attribute, to set its font attribute, or by using set-face-font directly.