unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'David Reitter'" <david.reitter@gmail.com>,
	<3408@emacsbugs.donarmstrong.com>,
	"'Kenichi Handa'" <handa@m17n.org>
Subject: bug#3408: customize-face not working: seems to apply to frame-face
Date: Thu, 28 May 2009 08:40:28 -0700	[thread overview]
Message-ID: <C099B7C6DF67457BA960A562919BCEB1@us.oracle.com> (raw)
In-Reply-To: <9A46C94D-EA2B-4721-9B22-4109C6E5085D@gmail.com>

> > If the arg FRAME is nil, set-face-attribute changes
> > attributes on all frames plus the default for new frames
> >
> > But customize-face changes only the attributes of existing
> > frames.

If true, that's new. And horribly misguided. It totally redefines the meaning
and behavior of `customize-face'.

> > (customize-face 'default) ;; set :background back to "#ffffff"
> > (face-attribute 'default :background nil) => "#ffffff"
> > (face-attribute 'default :background t) => "gray"
> 
> So is this a new, intentional "feature"?
> 
> I presume there has been a discussion about this... because without  
> knowing the reasoning behind this, I'd say it was a bad call.  Very  
> confusing to users, who, by default, shouldn't be concerned 
> with frame-specific faces.  Note that even "save for future
> sessions" won't set the face for future frames.  How would I
> set a face through the customize interface that is valid for
> current and future frames?

I agree. What you describe is a terrible state of affairs.

Customize should *redefine* a face or option, giving it a new
behavior/appearance/value for now and for the future (session duration, unless
saved). 

If it does not do that - if it affects only existing *occurrences* (uses) of
faces (or options), then you have radically changed the meaning of Customize.

Customize is for changing user preferences, and those apply most importantly to
future use, not just to existing objects. If Customize becomes just about
repainting what's there already, then Customize is no longer about customizing.

If what is described is true (and IIUC), then to get the effect of the Emacs 22
(and 21...) behavior of changing the face definition for future frames also, you
will need to jump through hoops: save the changes, then restart Emacs. Then,
presumably, the preference change takes effect in the new session. And then you
would need to reset the face to what it was before, and resave, if you didn't
want that change to persist.

That is a ridiculous workaround, just to get a face change for future frames:
save, end the session, new session to get where you wanted to be. Then restore
the definition, save again, and exit, so your change lasted only for the
"macro-session" (split into two sessions, just for the workaround).

What was wrong with what we had before? What problem does this significant
change solve?

*Any* way of changing a face (or an option, for that matter) should affect it
for the future.

The question of whether the thing being customized is frame-specific is another
matter. If you customize a face, that should not be for some specific frame.
There should not be any notion of customization for a specific frame.
Customization should change the definition globally - for the session, unless
you save.







  reply	other threads:[~2009-05-28 15:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AD8B1B64-DA4C-4FB1-8B1A-4A4E4FDD503C@gmail.com>
2009-05-28  0:40 ` bug#3408: customize-face not working: seems to apply to frame-face David Reitter
2009-05-28  1:12   ` Glenn Morris
2009-05-28  2:12   ` Kenichi Handa
2009-05-28  3:08     ` David Reitter
2009-05-28 15:40       ` Drew Adams [this message]
2009-05-28  4:53 Chong Yidong
2009-05-28 15:40 ` Drew Adams
2009-05-28 17:08   ` Chong Yidong

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C099B7C6DF67457BA960A562919BCEB1@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=3408@emacsbugs.donarmstrong.com \
    --cc=david.reitter@gmail.com \
    --cc=handa@m17n.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).