10

I have configured Org mode with a face attribute for priorities with these lines in my init.el:

(set-face-attribute 'org-priority nil
                    :foreground "aquamarine1"
                    :background "black"
                    :inherit font-lock-keyword-face
                    :inverse-video t
                    :box '(:line-width 2
                           :color "orange"
                           :style released-button))

But I'm wondering if there is a way to set different colors for priorities #A, #B & #C.

13

You can customize org-priority-faces to give specific attributes for each priority.


From C-h v org-priority-faces,

Documentation:
Faces for specific Priorities.
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).
If it is a color string, the variable org-faces-easy-properties determines if it is a foreground or a background color.

Edit:

For example, this is my current setup:

'((65 :foreground "red" :background "yellow")
  (66 :foreground "black" :background "yellow")
  (67 . "blue"))

The numbers 65, etc. correspond to the priority letters (ASCII 65 for A, etc.).

This is most easily configured using the customize-variable interface.

  • Any chance you could provide some example code, please? – Dan Oct 14 '15 at 22:55
6

Here a example of customization

(setq org-priority-faces '((?A . (:foreground "red" :weight 'bold))
                           (?B . (:foreground "yellow"))
                           (?C . (:foreground "green"))))
  • bold should not be quoted. – SabreWolfy Apr 12 '16 at 10:56
  • 1
    I was wondering what is the variable name to change the text itself of the priority entry, not the A, B or C. Any ideas? Thanks! – Emmanuel Goldstein Jan 23 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.