emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-priority-faces has no effect - how to define line colors in


From: elwood151
Subject: Re: [O] org-priority-faces has no effect - how to define line colors in org-mode?
Date: Thu, 27 Sep 2012 09:05:11 +0200 (CEST)

Thanks a lot for your help!

I originally defined the variable in the customize interface, but it seems that I entered the wrong characters...
If I copy your code in the scratch buffer and evaluate it, it works and the agenda is formatted as defined. :-)


Why Do I need to type '?A' for priority 'A' ?

A little remark: the bold face has to be entered without double quotes:
':weight "bold"' has no effect, but ':weight bold' works well.

(setq org-priority-faces '((?A . (:foreground "red" :weight bold))
(?B . (:foreground "yellow"))
(?C . (:foreground "green"))))

This syntax is quite confusing for me
- is there a tutorial anywhere which explains how to do such customizations
- and what wildcards can/have to be used
- and what "car" and "cdr" and "cons" mean?

Kind regards

Martin

Gesendet: Donnerstag, 27. September 2012 um 08:00 Uhr
Von: "Nick Dokos" <address@hidden>
An: M <address@hidden>
Cc: "emacs orgmode-mailinglist" <address@hidden>
Betreff: Re: [O] org-priority-faces has no effect - how to define line colors in org-mode?
M <address@hidden> wrote:

>
(...)
> I'm using org-mode 7.8.11 with Emacs 24.1.1 and I want to change the colors
> used to display agenda lines, so that e. g. all lines with priority "A" are
> shown in red bold font.
>
> I tried to change the variable org-priority-faces but it has no effect:
>
> org-priority-faces is a variable defined in `org-faces.el'.
> Its value is (("A" :foreground "#E01B4C" :weight bold)
> ("B" :foreground "#1739BF")
> ("#C" :foreground "#575757"))
>
> What am I doing wrong? Could other configurations overwrite this new
> setting?
>
> I tried a lot of things, but I must be doing something wrong with the
> org-priority-faces values.
>

You should probably use customize to set the value. Setting it by hand
is possible (but not advisable) in this case, but you have to pay
attention to some details. The docstring of the variable says

,----
| This is a list of cons cells, with priority character in the car
| and faces in the cdr. The face can be a symbol, a color as
| as a string, or a property list of attributes, like
| (:foreground "blue" :weight bold :underline t).
`----

so you need to set it with something like this:

--8<---------------cut here---------------start------------->8---
(setq org-priority-faces '((?A . (:foreground "red" :weight "bold"))
(?B . (:foreground "yellow"))
(?C . (:foreground "green"))))
--8<---------------cut here---------------end--------------->8---

Nick

> Martin
>
>
>



reply via email to

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