all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-priority-faces has no effect - how to define line colors in org-mode?
@ 2012-09-27  5:14 M
  2012-09-27  6:00 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: M @ 2012-09-27  5:14 UTC (permalink / raw)
  To: emacs orgmode-mailinglist


My problem is: my agenda is very long and very cluttered.
I'd like to visually emphasize all lines
A) with priority A or deadline today
B) priority B and scheduled today or before today
 

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.

Martin

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

* Re: org-priority-faces has no effect - how to define line colors in org-mode?
  2012-09-27  5:14 org-priority-faces has no effect - how to define line colors in org-mode? M
@ 2012-09-27  6:00 ` Nick Dokos
  2012-09-27  7:05   ` elwood151
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2012-09-27  6:00 UTC (permalink / raw)
  To: M; +Cc: emacs orgmode-mailinglist

M <Elwood151@web.de> wrote:

> 
> My problem is: my agenda is very long and very cluttered.
> I'd like to visually emphasize all lines
> A) with priority A or deadline today
> B) priority B and scheduled today or before today
>  
> 
> 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
> 
> 
> 

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

* Re: org-priority-faces has no effect - how to define line colors in org-mode?
  2012-09-27  6:00 ` Nick Dokos
@ 2012-09-27  7:05   ` elwood151
  2012-09-27  7:24     ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: elwood151 @ 2012-09-27  7:05 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs orgmode-mailinglist

[-- Attachment #1: Type: text/html, Size: 3981 bytes --]

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

* Re: org-priority-faces has no effect - how to define line colors in org-mode?
  2012-09-27  7:05   ` elwood151
@ 2012-09-27  7:24     ` Nick Dokos
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2012-09-27  7:24 UTC (permalink / raw)
  To: elwood151; +Cc: emacs orgmode-mailinglist

elwood151@web.de wrote:

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

?A is elisp syntax for the character A. That's different from the string containing
A which is denoted "A". As the docstring for the variable indicates, it expects
a *character* as the car of the pair.

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

OK - sorry I screwed that up.

> (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

Probably the "Emacs Lisp Intro" tutorial which comes with your emacs I believe:

C-h i m Emacs Lisp Intro RET

> - and what wildcards can/have to be used

No wildcards used here - not sure what you mean. If you mean the ? in ?A it's
most definitely *not* a wildcard.

> - and what "car" and "cdr" and "cons" mean?
> 

These are obscure (but hallowed by long history) names of the basic operations
in Lisp. Lisp's basic data structure is called a (dotted) pair: cons takes two
things and constructs a dotted pair out of them. car and cdr (the names mean
nothing unless you happen to know the architecture of some ancient IBM computer
where Lisp was first developed) are selectors: car takes a pair and returns
the first part of it, cdr returns the second part.

Nick

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

end of thread, other threads:[~2012-09-27  7:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27  5:14 org-priority-faces has no effect - how to define line colors in org-mode? M
2012-09-27  6:00 ` Nick Dokos
2012-09-27  7:05   ` elwood151
2012-09-27  7:24     ` Nick Dokos

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.