diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-10 06:37:44 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-10 06:37:44 -0500 |
| commit | 326ec0198b57855ed61523ea2f476b8e88cd3d50 (patch) | |
| tree | 99fcfbc0f871c5eb63f577ff133f565988b77665 /modules | |
| parent | 216e10b4df8ce93aa42f005033ed07210d38a929 (diff) | |
| download | dotemacs-326ec0198b57855ed61523ea2f476b8e88cd3d50.tar.gz dotemacs-326ec0198b57855ed61523ea2f476b8e88cd3d50.zip | |
fix(auto-dim): dim the remaining org faces, and test for the next one
Four rounds of this bug had one shape: a face nobody enumerated, sitting ahead of a mapped face in a face list and outranking it. A table header renders as (org-table-header org-table), so the mapped org-table underneath never got a say.
So this round adds a test instead of another guess. It fontifies a representative org buffer, collects every face the buffer actually uses (including the line-prefix and wrap-prefix that org-indent hangs its faces on), and fails on anything neither mapped nor deliberately excluded. It caught org-checkbox while I was writing it.
Newly dimmed: org-table-header, org-formula, org-checkbox, org-checkbox-statistics-done, org-headline-done, org-drill-visible-cloze-face.
org-indent joins org-hide and org-superstar-leading on the -hide face. All three resolve to the background colour, which is what makes folded text, leading stars and indent prefixes invisible. Flat-dimming any of them reveals what I hid.
bold, italic and underline stay unmapped on purpose. They carry no foreground even through inheritance, so they take their colour from default and dim for free.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/auto-dim-config.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/auto-dim-config.el b/modules/auto-dim-config.el index fae00b48..faa4101c 100644 --- a/modules/auto-dim-config.el +++ b/modules/auto-dim-config.el @@ -83,6 +83,20 @@ focus cue on a split-displayed dashboard, accepted as a fair trade." (font-lock-builtin-face . (auto-dim-other-buffers . nil)) (font-lock-preprocessor-face . (auto-dim-other-buffers . nil)) (font-lock-warning-face . (auto-dim-other-buffers . nil)) + ;; Faces that sit AHEAD of a mapped face in a face list and outrank it, so + ;; the text under them stayed lit until each was named here: a table header + ;; renders as (org-table-header org-table), a TODO line as + ;; (org-faces-todo org-level-3). tests/test-auto-dim-config.el walks a + ;; fontified org buffer and fails when a built-in org face is left out. + (org-table-header . (auto-dim-other-buffers . nil)) + (org-formula . (auto-dim-other-buffers . nil)) + (org-checkbox . (auto-dim-other-buffers . nil)) + (org-checkbox-statistics-done . (auto-dim-other-buffers . nil)) + (org-headline-done . (auto-dim-other-buffers . nil)) + (org-drill-visible-cloze-face . (auto-dim-other-buffers . nil)) + ;; org-indent inherits org-hide, so its foreground IS the background: that + ;; is what makes indent prefixes invisible. -hide face, never the flat dim. + (org-indent . (auto-dim-other-buffers-hide . nil)) ;; org-superstar draws heading stars and list bullets, and puts its own face ;; ahead of the org face beneath, so a star renders as ;; (org-superstar-header-bullet org-level-1) and outranks the dimmed level. |
