emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faces applies to new frames


From: Stefan Monnier
Subject: Re: Faces applies to new frames
Date: Sun, 29 Jun 2008 15:42:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> I think we need to change the way faces are specified,
> and use something that is (1) simpler and (2) predictable.

No argument.

>     AFAIK, the main situation where setting face attributes via
>     frame-parameters is useful/used is for things like
>     minibuffer-frame-alist (where I use it to give a special font and
>     background to my minibuffer-only frame(s)), and special-display-regexps.

> Would buffer-based interfaces be good for these jobs?
> They might be better in every way.

Could be, but currently we don't have any easy way to do it within
the buffer.  Especially not for minibuffer-only frames which may show
various buffers, all of them internal.  But yes, it's quite feasible.

> Perhaps we should eliminate the per-frame face attributes, and have
> only per-buffer ways to alter faces from the global specifications.

I'd tend to agree, although of course, having had per-frame faces for so
long has encouraged people to find uses for per-frame faces, some of
which may require a bit of work to port to per-buffer faces.

E.g. I use a dedicated frame for my MPC.el (a front-end to the MPD
daemon, see www.musicpd.org), but that frames contains many different
windows showing different buffer.  I currently set the frame to use
a proportional font (helvetica-like) because it uses a bit less space
and I find it somewhat nicer to look at, and none of those buffers
suffer from the usual alignment/filling problems we encounter with
proportional fonts in Emacs.  Making the setting per-buffer is possible,
but requires changing the face individually in each buffer, which is
less satisfactory.  Not a strong argument in favor of per-frame faces,
just a data point.

> One benefit of that is that it would avoid the uncertainty about
> precedence, which we have now when both users and defaults can specify
> face attributes at various levels.  It would be clear and natural that
> any per-buffer face specification overrides the global ones,
> regardless of who set either one of them.

The mere fact of changing from per-frame to per-buffer won't solve the
underlying precedence problem.  But if we get rid of settings coming
from frame parameters and Xresources, then yes, things become simpler
(both for per-buffer and for per-frame faces).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]