@Drew was right: in some other part of my init.el
, I had overwritten org-todo
with custom-set-faces
:
(custom-set-faces
'(org-todo ((t (:overline t)))))
This seems to reset the :foreground
property. Instead, I should have used:
(face-spec-set 'org-todo '((t (:overline t))))
See http://ergoemacs.org/emacs/elisp_define_face.html.
Eventually, however, I found an even better way, in my view, to highlight and discern checked and unchecked checkboxes. Based on the proposal here, the checkbox text is colorized rather than the brackets:

(defface org-checkbox-todo-text
'((t (:inherit org-todo)))
"Face for the text part of an unchecked org-mode checkbox.")
(font-lock-add-keywords
'org-mode
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?: \\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 1 'org-checkbox-todo-text prepend))
'append)
(defface org-checkbox-done-text
'((t (:inherit org-done)))
"Face for the text part of a checked org-mode checkbox.")
(font-lock-add-keywords
'org-mode
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 1 'org-checkbox-done-text prepend))
'append)
emacs -Q
? Maybe something else changes it later (?). What's the effect - no effect? Better question: Why not just useM-x customize-face
? – Drew Oct 11 '18 at 13:50