unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ergus <spacibba@aol.com>
Cc: "\"T.V Raman\" via \"Emacs development discussions.\""
	<emacs-devel@gnu.org>
Subject: Re: Setting rectangle-preview face in init.
Date: Fri, 11 Oct 2019 12:41:33 -0400	[thread overview]
Message-ID: <jwvftjzw8je.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20191011154429.dcoogy5kqzdhdhh7@Ergus> (Ergus's message of "Fri,  11 Oct 2019 17:44:29 +0200")

> I don't like to use Customize interfaces because:

I don't either, but for faces I've found its advantages are significant
compared to the various problems with set-face-attribute.

> 3) Some complex setups breaks it (like defining conditional faces
> depending of some if conditions (window-system, (display-graphic-p)).)

Given that Emacs can have GUI and tty frames within the same session, if
you want your config to work reliably, the
window-system/display-graphic-p/... tests need to be re-executed for
every frame created (rather than calling set-face-attribute such that it
applies to all frames).

Custom actually does let you deal with that by specifying different
attribute values depending on window-system/display-graphic-p/...
(the UI isn't great for that, so I typically edit the custom-set-faces
by hand to do that, which is of course not recommended either, ...).

> I won't ask for a change for anything of this,

FWIW, I think it'd be good to have Elisp-access to Custom's
face manipulation so you wouldn't have to choose between the two,


        Stefan




  parent reply	other threads:[~2019-10-11 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 12:45 Setting rectangle-preview face in init Ergus
2019-10-11 14:00 ` Stefan Monnier
2019-10-11 14:10   ` Ergus
2019-10-11 14:22     ` Stefan Monnier
2019-10-11 15:44       ` Ergus
2019-10-11 16:13         ` Daniele Nicolodi
2019-10-11 16:41         ` Stefan Monnier [this message]
2019-10-11 18:50         ` Yuri Khan
2019-10-11 14:08 ` Eli Zaretskii
2019-10-11 14:11   ` Ergus
2019-10-11 14:35     ` 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

  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=jwvftjzw8je.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=spacibba@aol.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 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).