2

I would like to customize the headline and keyword inside of an org file. In this question is shown how to change the faces of each keyword, but not the headlines.

For the moment, I haven't achieve it and I don't have any idea what to do?

I have the 9.2 version of org-mode.

The header in my org file is:

#+TODO: TODO(t!) HIGHLIGHT(h!) WAIT(w@/!) | DONE(d!) CANCELED(c@) 

And the footer is:

# Local Variables:
# org-fontify-done-headline: t
# org-todo-keyword-faces: (("TODO" . org-warning) 
#                          ("HIGHLIGHT" . (:foreground "yellow" :background "red" :weight bold)) 
#                          ("WAIT" . "yellow")
#                          ("CANCELED" . (:foreground "red" :background "white" :weight bold)) 
#                          ("DONE" . (:foreground "green" :strike-through t)))
# End:

PS: I can change the faces for the keywords HIGHLIGHT, WAIT and CANCELED. However, the TODO and DONE items keep unchanged.

  • I had to hack the code at several locations to have org-mode treat some file-local settings correctly, including making some variables buffer-local instead of global. Due to the different versions of org-mode that people use, and due to the frequent changes in the master, it may be necessary to submit a bug report to the org-mode developers. Before submitting a bug report, however, be sure to try out the latest version. – lawlist Jan 30 at 16:30
  • Thanks for the reply. I'm using the version 9.2 and changed the question to reflect this. – Maikol Solís Jan 30 at 19:42
1

Set org-fontify-done-headlines to t and then org-headline-done face to the desired face

Non-nil means change the face of a headline if it is marked DONE. Normally, only the TODO/DONE keyword indicates the state of a headline. When this is non-nil, the headline after the keyword is set to the ‘org-headline-done’ as an additional indication.

However, this global not per-file.

0

You can similarly customize the variable org-level-faces.

# org-level-faces: ((:foreground "yellow") (:foreground "red") )

This will customize the faces of org-level-1 org-level-2 ... by order.

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.