From 32cfe216b4f5917b1a979e0372edf9b8f1ab62ea Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 25 May 2026 11:54:39 -0500 Subject: fix(theme): register dupre faces so org status colors are themed The dupre theme defined its own faces (dupre-accent, the headings, and the org status faces) only through custom-theme-set-faces, never defface. That leaves them unregistered, so they render through :inherit but silently fail when applied directly as a text property. org-todo-keyword-faces and org-priority-faces apply faces that way, so the org keyword and priority colors never showed as dupre tones. I added a defface registration block to dupre-faces.el for all of dupre's own faces, so they're real faces. The theme still sets their colors. Then I pointed org-todo-keyword-faces and org-priority-faces (in org-config.el) at named dupre-org-* faces, each the closest palette color to its former hard-coded name, and gave each a dimmed variant that auto-dim-config.el swaps in for unfocused windows. A keyword in a dimmed window now shows a darker shade of its own color rather than flat gray or full brightness. A regression test asserts dupre's faces stay registered, since that was the latent bug behind all of this. --- modules/org-config.el | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'modules/org-config.el') diff --git a/modules/org-config.el b/modules/org-config.el index 01586a9e..90dd09b0 100644 --- a/modules/org-config.el +++ b/modules/org-config.el @@ -101,25 +101,29 @@ "DELEGATED(x)" "|" "FAILED(f!)" "DONE(d!)" "CANCELLED(c!)"))) + ;; Keyword and priority colors come from the active theme's dupre-org-* + ;; faces (themes/dupre-faces.el) rather than hard-coded color names, so they + ;; match the palette and dim with the rest of an unfocused window + ;; (auto-dim-config.el remaps each to its -dim variant). (setq org-todo-keyword-faces - '(("TODO" . "green") - ("PROJECT" . "blue") - ("DOING" . "yellow") - ("WAITING" . "white") - ("VERIFY" . "orange") - ("STALLED" . "light blue") - ("DELEGATED" . "green") - ("FAILED" . "red") - ("DONE" . "dark grey") - ("CANCELLED" . "dark grey"))) + '(("TODO" . dupre-org-todo) + ("PROJECT" . dupre-org-project) + ("DOING" . dupre-org-doing) + ("WAITING" . dupre-org-waiting) + ("VERIFY" . dupre-org-verify) + ("STALLED" . dupre-org-stalled) + ("DELEGATED" . dupre-org-todo) + ("FAILED" . dupre-org-failed) + ("DONE" . dupre-org-done) + ("CANCELLED" . dupre-org-done))) (setq org-highest-priority ?A) (setq org-lowest-priority ?D) (setq org-default-priority ?D) - (setq org-priority-faces '((?A . (:foreground "Cyan" :weight bold)) - (?B . (:foreground "Yellow")) - (?C . (:foreground "Green")) - (?D . (:foreground "Grey")))) + (setq org-priority-faces '((?A . dupre-org-priority-a) + (?B . dupre-org-priority-b) + (?C . dupre-org-priority-c) + (?D . dupre-org-priority-d))) (setq org-enforce-todo-dependencies t) (setq org-enforce-todo-checkbox-dependencies t) -- cgit v1.2.3