From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17532: 24.4.50; Options > `set-frame-font' does not work as documented Date: Wed, 21 May 2014 21:46:42 +0300 Message-ID: <83vbszm0kt.fsf@gnu.org> References: <7f75d016-b170-4502-999a-ab657354e6b2@default> <8361kznkpy.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1400698054 14942 80.91.229.3 (21 May 2014 18:47:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 May 2014 18:47:34 +0000 (UTC) Cc: 17532@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 21 20:47:29 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WnBXz-0005dr-3J for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 May 2014 20:47:27 +0200 Original-Received: from localhost ([::1]:33195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnBXy-00033S-Pk for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 May 2014 14:47:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnBXg-0002nH-Kx for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 14:47:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnBXb-00008b-BK for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 14:47:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnBXb-00008L-6a for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 14:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WnBXa-0007Fp-Ed for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 14:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 May 2014 18:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17532 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17532-submit@debbugs.gnu.org id=B17532.140069800427849 (code B ref 17532); Wed, 21 May 2014 18:47:02 +0000 Original-Received: (at 17532) by debbugs.gnu.org; 21 May 2014 18:46:44 +0000 Original-Received: from localhost ([127.0.0.1]:55598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnBXH-0007F6-Q4 for submit@debbugs.gnu.org; Wed, 21 May 2014 14:46:44 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:56412) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnBXC-0007En-Re for 17532@debbugs.gnu.org; Wed, 21 May 2014 14:46:40 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N5X00900SWAI700@mtaout28.012.net.il> for 17532@debbugs.gnu.org; Wed, 21 May 2014 21:44:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5X008WGTEBCC30@mtaout28.012.net.il>; Wed, 21 May 2014 21:44:35 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89333 Archived-At: > Date: Wed, 21 May 2014 11:03:44 -0700 (PDT) > From: Drew Adams > Cc: 17532@debbugs.gnu.org > > > > > But that doesn't cover future frames, either. It only affects the > > > > existing GUI frames, per the doc string (and the code, which see). > > > ^^^^^^^^^^^^^^^^^^ > > > > > > Where are you getting this? `C-h f set-frame-font' says clearly: > > > > > > Also, if FRAME is non-nil, alter the user's Customization settings as > > > though the font-related attributes of the `default' face had been > > > "set in this session", so that the font is applied to future frames. > > > > > > One of us seems to be sorely missing something. ;-) > > > > You are missing the previous sentence of the doc string. > > No, I was not missing that previous sentence: > > "If FRAMES is non-nil, it should be a list of frames to act upon, > or t meaning all graphical frames." > > Where does it say that only existing frames should be affected? It says that to me, because it doesn't mention future frames. Now I made that clear by saying that explicitly. > > > A face, including face `default', is not something that is frame-specific. > > > > Faces are _always_ frame-specific in Emacs. That includes the > > 'default' face. Thus, changing the 'default' face does not imply the > > change affects all frames, let alone future frames. > > That's not my understanding. Your understanding is wrong. > A face is defined independently of any place it might be displayed, > including any frame. > > A face _attribute_ can have different values for a given face on > different frames. That's what I meant: the 'font' attribute of the 'default' face can be different on each frame. > That does not mean that the face itself is different. You are playing word games. I explained above what I meant by saying "faces are frame-specific". My point still stands: it is a legitimate use case to have the default font different on different frames. > A face's default attributes are what apply to newly created frames. > Changing the default font of a face, in particular, should affect new > frames. And particularly for face `default'. That's not how Emacs works. If it did, you wouldn't need default-frame-alist. > What's more, the doc says clearly that a `t' value for `set-face-attribute' > parameter FRAME " sets the attributes for all existing frames, as well > as for newly created frames." But set-frame-font doesn't call set-face-attribute with that argument set to t, it calls set-face-attribute separately for each frame returned by frame-list. So only on those frames we modify the font of the default face, and of course those frames are only those that exist at the moment of the call. > The following commands and functions mostly provide compatibility > with old versions of Emacs. They work by calling `set-face-attribute'. > Values of `t' and `nil' for their FRAME argument are handled just like > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > `set-face-attribute' and `face-attribute'. The commands read their > ^^^^^^^^^^^^^^^^^^^^ > arguments using the minibuffer, if called interactively. > > Why you would think that `set-face-font' should not do like this doc > says and should be an exception to the rule that `t' affects newly > created frames as well as existing frames, is beyond me. I just read the code, and it tells a different story. > > The very next bullet is about a different method of changing the font, > > so it's not really relevant to what this first bullet describes. > > A different method of doing the same thing: changing the font for > new frames! That's your interpretation; the text doesn't say that. > the doc is pretty much right in suggesting that new frames are also > affected; the product is wrong in not respecting that. "The product" never did. In fact, the argument FRAMES appeared only in Emacs 24.1; before that, you couldn't even set the font for more than just the selected frame. I wish it had stayed that way, but that's me.