all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is there an equivalent to setq-local for faces?
@ 2021-09-21 13:35 Eric S Fraga
  2021-09-21 13:49 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2021-09-21 13:35 UTC (permalink / raw)
  To: help-gnu-emacs

Hello all,

Quick question: In one document, I would like to change specific faces
but only for that file.  Is there a local file variable or setq-local
equivalent for faces?

I know about hi-lock, which is my backup plan, but it's less than ideal
as it involves re-inventing the wheel, sort of.

Thank you,
eric

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.5-dev on Debian 11.0




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

* Re: Is there an equivalent to setq-local for faces?
  2021-09-21 13:35 Is there an equivalent to setq-local for faces? Eric S Fraga
@ 2021-09-21 13:49 ` Eli Zaretskii
  2021-09-22 13:34   ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-09-21 13:49 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> Date: Tue, 21 Sep 2021 14:35:31 +0100
> 
> Quick question: In one document, I would like to change specific faces
> but only for that file.  Is there a local file variable or setq-local
> equivalent for faces?

Faces are frame-local by default.  But you can have buffer-local
modifications of faces via face-remapping-alist.



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

* Re: Is there an equivalent to setq-local for faces?
  2021-09-21 13:49 ` Eli Zaretskii
@ 2021-09-22 13:34   ` Eric S Fraga
  2021-09-22 13:50     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2021-09-22 13:34 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday, 21 Sep 2021 at 16:49, Eli Zaretskii wrote:
> Faces are frame-local by default.  

Interesting.  I wonder whether exwm changes that default?  No matter as
this doesn't help me in any case (just musing out loud)!

> But you can have buffer-local modifications of faces via
> face-remapping-alist.

This is perfect.  Thank you.

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.5-dev on Debian 11.0




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

* Re: Is there an equivalent to setq-local for faces?
  2021-09-22 13:34   ` Eric S Fraga
@ 2021-09-22 13:50     ` Eli Zaretskii
  2021-09-23 14:25       ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-09-22 13:50 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> Date: Wed, 22 Sep 2021 14:34:32 +0100
> 
> On Tuesday, 21 Sep 2021 at 16:49, Eli Zaretskii wrote:
> > Faces are frame-local by default.  
> 
> Interesting.  I wonder whether exwm changes that default?

Why do you think it does?



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

* Re: Is there an equivalent to setq-local for faces?
  2021-09-22 13:50     ` Eli Zaretskii
@ 2021-09-23 14:25       ` Eric S Fraga
  2021-09-23 15:52         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2021-09-23 14:25 UTC (permalink / raw)
  To: help-gnu-emacs

On Wednesday, 22 Sep 2021 at 16:50, Eli Zaretskii wrote:
> Why do you think it does?

I had the impression that any change I made to a face was reflected in
every frame (other monitor specifically in the case of exwm).  But it
could be that I have only done this through customize-face; not sure.

It's not a problem for me either way.  The alist mapping works
beautifully.

Thanks again,
eric

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.6 on Debian 11.0




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

* Re: Is there an equivalent to setq-local for faces?
  2021-09-23 14:25       ` Eric S Fraga
@ 2021-09-23 15:52         ` Eli Zaretskii
  2021-09-24  8:44           ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-09-23 15:52 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> Date: Thu, 23 Sep 2021 15:25:48 +0100
> 
> On Wednesday, 22 Sep 2021 at 16:50, Eli Zaretskii wrote:
> > Why do you think it does?
> 
> I had the impression that any change I made to a face was reflected in
> every frame

That's because many Emacs APIs for changing face attributes by default
actively propagate the changes to all frames.  But you can avoid that
by using the FRAME argument.  See, for example, set-face-attribute.



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

* Re: Is there an equivalent to setq-local for faces?
  2021-09-23 15:52         ` Eli Zaretskii
@ 2021-09-24  8:44           ` Eric S Fraga
  0 siblings, 0 replies; 7+ messages in thread
From: Eric S Fraga @ 2021-09-24  8:44 UTC (permalink / raw)
  To: help-gnu-emacs

Ah, that makes sense.  Thank you for explaining.
-- 
Eric S Fraga via Emacs 28.0.50 & org 9.5-dev on Debian 11.0




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

end of thread, other threads:[~2021-09-24  8:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-21 13:35 Is there an equivalent to setq-local for faces? Eric S Fraga
2021-09-21 13:49 ` Eli Zaretskii
2021-09-22 13:34   ` Eric S Fraga
2021-09-22 13:50     ` Eli Zaretskii
2021-09-23 14:25       ` Eric S Fraga
2021-09-23 15:52         ` Eli Zaretskii
2021-09-24  8:44           ` Eric S Fraga

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.