unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Customizing faces
@ 2015-11-14  8:06 Random832
  2015-11-14 15:01 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Random832 @ 2015-11-14  8:06 UTC (permalink / raw)
  To: help-gnu-emacs

In using customize-face to set face attributes depending on display
properties:

A) Is it possible to have multiple attribute lists that each apply if
the display matches? Like "On all color displays, set these colors" and
"On this particular type of GUI display set this font"? Or is only the
first one that matches applied?

B) Is it possible to get back to the per-display view? After I save, if
I customize the face again I just get a single attribute list
representing the current display.

In both of these cases it is for customizing the default face, if it
matters.

Also, is it possible to set the font family based on availability
(i.e. a list of names, and if one isn't available it moves on to the
next)?




^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Customizing faces
  2015-11-14  8:06 Customizing faces Random832
@ 2015-11-14 15:01 ` Drew Adams
  2015-11-15  5:09   ` Random832
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2015-11-14 15:01 UTC (permalink / raw)
  To: Random832, help-gnu-emacs

> In using customize-face to set face attributes depending on display
> properties:
> 
> A) Is it possible to have multiple attribute lists that each apply if
> the display matches? Like "On all color displays, set these colors" and
> "On this particular type of GUI display set this font"? Or is only the
> first one that matches applied?
> 
> B) Is it possible to get back to the per-display view? After I save, if
> I customize the face again I just get a single attribute list
> representing the current display.
> 
> In both of these cases it is for customizing the default face, if it
> matters.
> 
> Also, is it possible to set the font family based on availability
> (i.e. a list of names, and if one isn't available it moves on to the
> next)?

You can do all of these things using Emacs Lisp.  See
`Defining Faces' in the Elisp manual:
http://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html

But with the Customize UI you can currently define only one
set of face attributes for a given face.  It would be possible
to extend the UI to let you do what you request, but I'm not
sure most users of Customize would be interested.  If this
extra functionality were not "in their face", but were made
available on demand, then the feature could be useful.
To request such an enhancement, use `M-x report-emacs-bug'.

The Customize UI generally allows you to easily change
behavior for the current session, i.e., based on the current
display characteristics etc., and then to save these new
settings for future sessions.  So far, at least, it does not
really cater to defining settings for contexts other than
the current session (different displays etc.).  But it could.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Customizing faces
  2015-11-14 15:01 ` Drew Adams
@ 2015-11-15  5:09   ` Random832
  0 siblings, 0 replies; 3+ messages in thread
From: Random832 @ 2015-11-15  5:09 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams <drew.adams@oracle.com> writes:
> You can do all of these things using Emacs Lisp.  See
> `Defining Faces' in the Elisp manual:
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html
> 
> But with the Customize UI you can currently define only one
> set of face attributes for a given face.

That's not true. When I start customizing a face, I can click the
"State" button and select the "For All Kinds of Displays" menu item to
get a UI for specifying attributes depending on display properties. What
I am asking is how/if, having saved such a face, I can get back to the
same UI for further editing.

And anyway, none of this really answers my other question, which was
whether it is possible to use multiple face specs that all apply to
one display (one for color displays, one for displays of a particular
type, etc), and have them all be applied.

I also can't figure out how to have it go down a list of font families
trying each one, unless I'm just meant to define a bunch of different
face specs using "supports" specifiers.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-15  5:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-14  8:06 Customizing faces Random832
2015-11-14 15:01 ` Drew Adams
2015-11-15  5:09   ` Random832

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).