* face-remap-add-relative not executing
@ 2020-11-23 2:44 Christopher Dimech
2020-11-23 12:19 ` Michael Heerdegen
0 siblings, 1 reply; 7+ messages in thread
From: Christopher Dimech @ 2020-11-23 2:44 UTC (permalink / raw)
To: Help Gnu Emacs
I have written this piece, however the colours are not taking effect.
(add-hook 'org-mode-hook
(lambda ()
(face-remap-add-relative
'(org-level-1 ((t (:foreground "00FFFF"))))
'(org-level-2 ((t (:foreground "chartreuse"))))
'(org-level-3 ((t (:foreground "dark orange"))))
'(org-level-4 ((t (:foreground "yellow"))))
'(org-level-5 ((t (:foreground "magenta"))))
'(org-level-6 ((t (:foreground "tan1"))))
'(org-level-7 ((t (:foreground "deep sky blue"))))
'(org-level-8 ((t (:foreground "orange red")))) )))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face-remap-add-relative not executing
2020-11-23 2:44 face-remap-add-relative not executing Christopher Dimech
@ 2020-11-23 12:19 ` Michael Heerdegen
2020-11-23 12:50 ` Christopher Dimech
0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2020-11-23 12:19 UTC (permalink / raw)
To: help-gnu-emacs
Christopher Dimech <dimech@gmx.com> writes:
> I have written this piece, however the colours are not taking effect.
>
> (add-hook 'org-mode-hook
> (lambda ()
> (face-remap-add-relative
> '(org-level-1 ((t (:foreground "00FFFF"))))
> '(org-level-2 ((t (:foreground "chartreuse"))))
> '(org-level-3 ((t (:foreground "dark orange"))))
> '(org-level-4 ((t (:foreground "yellow"))))
> '(org-level-5 ((t (:foreground "magenta"))))
> '(org-level-6 ((t (:foreground "tan1"))))
> '(org-level-7 ((t (:foreground "deep sky blue"))))
> '(org-level-8 ((t (:foreground "orange red")))) )))
Yes, you are using it wrong. The syntax is (see C-h f)
face spec ...
I.e. only one face per call.
Regards,
Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face-remap-add-relative not executing
2020-11-23 12:19 ` Michael Heerdegen
@ 2020-11-23 12:50 ` Christopher Dimech
2020-11-23 13:13 ` Michael Heerdegen
0 siblings, 1 reply; 7+ messages in thread
From: Christopher Dimech @ 2020-11-23 12:50 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
Like so then:
(defun orglev-colours ()
"Sets colours of headings."
(face-remap-add-relative '(org-level-1 ((t (:foreground "00FFFF")))))
(face-remap-add-relative '(org-level-2 ((t (:foreground "chartreuse")))))
(face-remap-add-relative '(org-level-3 ((t (:foreground "dark orange")))))
(face-remap-add-relative '(org-level-4 ((t (:foreground "yellow")))))
(face-remap-add-relative '(org-level-5 ((t (:foreground "magenta")))))
(face-remap-add-relative '(org-level-6 ((t (:foreground "tan1")))))
(face-remap-add-relative '(org-level-7 ((t (:foreground "deep sky blue")))))
(face-remap-add-relative '(org-level-8 ((t (:foreground "orange red"))))) )
> Sent: Monday, November 23, 2020 at 1:19 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: face-remap-add-relative not executing
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > I have written this piece, however the colours are not taking effect.
> >
> > (add-hook 'org-mode-hook
> > (lambda ()
> > (face-remap-add-relative
> > '(org-level-1 ((t (:foreground "00FFFF"))))
> > '(org-level-2 ((t (:foreground "chartreuse"))))
> > '(org-level-3 ((t (:foreground "dark orange"))))
> > '(org-level-4 ((t (:foreground "yellow"))))
> > '(org-level-5 ((t (:foreground "magenta"))))
> > '(org-level-6 ((t (:foreground "tan1"))))
> > '(org-level-7 ((t (:foreground "deep sky blue"))))
> > '(org-level-8 ((t (:foreground "orange red")))) )))
>
> Yes, you are using it wrong. The syntax is (see C-h f)
>
> face spec ...
>
> I.e. only one face per call.
>
>
> Regards,
>
> Michael.
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face-remap-add-relative not executing
2020-11-23 12:50 ` Christopher Dimech
@ 2020-11-23 13:13 ` Michael Heerdegen
2020-11-23 13:30 ` Christopher Dimech
0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2020-11-23 13:13 UTC (permalink / raw)
To: help-gnu-emacs
Christopher Dimech <dimech@gmx.com> writes:
> Like so then:
>
> (defun orglev-colours ()
> "Sets colours of headings."
> (face-remap-add-relative '(org-level-1 ((t (:foreground "00FFFF")))))
No, you provide one argument. The face name is expected to be a
separate argument in `face-remap-add-relative'.
Are you sure you wanted to use the face remapping mechanism for org
faces btw?
Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face-remap-add-relative not executing
2020-11-23 13:13 ` Michael Heerdegen
@ 2020-11-23 13:30 ` Christopher Dimech
2020-11-23 13:46 ` Michael Heerdegen
0 siblings, 1 reply; 7+ messages in thread
From: Christopher Dimech @ 2020-11-23 13:30 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
> Sent: Monday, November 23, 2020 at 2:13 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: face-remap-add-relative not executing
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > Like so then:
> >
> > (defun orglev-colours ()
> > "Sets colours of headings."
> > (face-remap-add-relative '(org-level-1 ((t (:foreground "00FFFF")))))
>
> No, you provide one argument. The face name is expected to be a
> separate argument in `face-remap-add-relative'.
How should it be written, got no clue.
> Are you sure you wanted to use the face remapping mechanism for org
> faces btw?
Just doing it for the fun of it.
> Michael.
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face-remap-add-relative not executing
2020-11-23 13:30 ` Christopher Dimech
@ 2020-11-23 13:46 ` Michael Heerdegen
2020-11-23 16:36 ` Christopher Dimech
0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2020-11-23 13:46 UTC (permalink / raw)
To: help-gnu-emacs
Christopher Dimech <dimech@gmx.com> writes:
> How should it be written, got no clue.
(face-remap-add-relative 'org-level-1 '(:foreground "#00FFFF"))
You can also use face names in the SPECS, like in
(face-remap-add-relative 'org-level-1 'success)
Can be faces you defined yourself of course.
Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face-remap-add-relative not executing
2020-11-23 13:46 ` Michael Heerdegen
@ 2020-11-23 16:36 ` Christopher Dimech
0 siblings, 0 replies; 7+ messages in thread
From: Christopher Dimech @ 2020-11-23 16:36 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
Ok. Have done so and the colours are being applied as I wish them to.
Thank you so very much.
> Sent: Monday, November 23, 2020 at 2:46 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: face-remap-add-relative not executing
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > How should it be written, got no clue.
>
> (face-remap-add-relative 'org-level-1 '(:foreground "#00FFFF"))
>
> You can also use face names in the SPECS, like in
>
> (face-remap-add-relative 'org-level-1 'success)
>
> Can be faces you defined yourself of course.
>
> Michael.
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-11-23 16:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-23 2:44 face-remap-add-relative not executing Christopher Dimech
2020-11-23 12:19 ` Michael Heerdegen
2020-11-23 12:50 ` Christopher Dimech
2020-11-23 13:13 ` Michael Heerdegen
2020-11-23 13:30 ` Christopher Dimech
2020-11-23 13:46 ` Michael Heerdegen
2020-11-23 16:36 ` Christopher Dimech
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).