all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 17532@debbugs.gnu.org
Subject: bug#17532: 24.4.50; Options > `set-frame-font' does not work as documented
Date: Wed, 21 May 2014 19:46:17 +0300	[thread overview]
Message-ID: <8361kznkpy.fsf@gnu.org> (raw)
In-Reply-To: <7f75d016-b170-4502-999a-ab657354e6b2@default>

> Date: Tue, 20 May 2014 14:00:36 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 17532@debbugs.gnu.org
> 
> > Then this is expected behavior: selecting a new font from that menu
> > only changes the font for the existing frames, not for the future
> > ones.
> 
> That's not what the *doc* says.  You don't see that stated anywhere,
> do you?

I do.

> And why should that be the case?

Not relevant to the documentation issue.  (Personally, I think that
menu item should have changed the font only on the current frame, but
that's water under the bridge.)

> And what happens when you "save this for future sessions" (node
> Fonts)?

Not relevant to the issue (and IMO explained in the doc).

> What good could it do, and what meaning could it have, to save
> something that is only for existing frames (not new frames) in this
> session?

Fonts are attributes of faces, and faces are always frame-specific.
It is reasonable to give the user a possibility to change the font
only of some frames and not others.

> > > Anyway, when you use menu item `Set Default Font', it invokes `menu-set-font',
> > > which calls `set-frame-font' *non-interactively*, and with `t' as the
> > > value for FRAMES.
> > 
> > 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.  I have now
made it say clearly that only the existing frames are affected.

> (That's a typo, BTW: FRAME here should be FRAMES.)

Fixed.

> > > In addition, the doc string for `menu-set-font' says that it makes the
> > > font you choose "the default".  It does NOT at all suggest that it changes
> > > the font only for the current frame.  Similarly, the menu item itself speaks
> > > of "Default".
> > 
> > "Default font" means the font of the default face, that's all.  Yes,
> > that's ambiguous.
> 
> 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.

> > > It likens the behavior of `Set Default Font' to modifying `default-frame-
> > > alist'.
> > 
> > No, it doesn't mention default-frame-alist at all.
> 
> It most certainly does - the very next bullet!

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.

Anyway, I made the changes that clarify the current behavior.  The
part that seems to say that Customize settings are changed to affect
the font change on all future frames does not correspond to what
actually happens.  This could be a code bug or a documentation bug;
someone who can decipher the Customize-related code in set-frame-font
will have to look into this, and fix either the doc string or the code
as appropriate.  For now, I left that part of the doc string
unaltered.





  reply	other threads:[~2014-05-21 16:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<81d6f14f-eaa2-4809-80c4-a41de85af8b8@default>
     [not found] ` <<83sio4ns46.fsf@gnu.org>
2014-05-20 21:00   ` bug#17532: 24.4.50; Options > `set-frame-font' does not work as documented Drew Adams
2014-05-21 16:46     ` Eli Zaretskii [this message]
     [not found] <<7f75d016-b170-4502-999a-ab657354e6b2@default>
     [not found] ` <<8361kznkpy.fsf@gnu.org>
2014-05-21 18:03   ` Drew Adams
2014-05-21 18:46     ` Eli Zaretskii
2016-04-29 19:59       ` Lars Ingebrigtsen
     [not found] <<718d27e5-9390-4581-9c8e-e11b86ba4e45@default>
     [not found] ` <<838upwbdtb.fsf@gnu.org>
2014-05-20 17:49   ` Drew Adams
2014-05-20 19:54     ` Eli Zaretskii
2014-05-19 20:34 Drew Adams
2014-05-20 16:44 ` Eli Zaretskii

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=8361kznkpy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17532@debbugs.gnu.org \
    --cc=drew.adams@oracle.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.