tinted-theming / base16-emacs

Base16 themes for Emacs
MIT License
380 stars 76 forks source link

Org todo/done faces match some heading faces #86

Closed dmringo closed 5 years ago

dmringo commented 5 years ago

TL;DR: org-todo and org-done faces don't always stand out from the org-level-* faces, and could be fixed by either specifying a background or by unifying the colors for org headings.

The Problem

The org-level-[1-8] faces inherit from outline-mode faces, which in turn inherit from font-lock faces. Because the org-todo and org-done faces use colors that are also used for the relevant font lock faces, there are some headings for which TODO and DONE keywords don't stand out. This occurs at second-level headings for TODO keywords and eighth-level headings (admittedly rare) for DONE keywords. This is only a minor annoyance, but the highlighting is nice when you're used to the highlighting guiding your eyes rather than the keywords themselves.

Example using the Ashes theme:

Org heading faces

Potential Solution

The simplest solution (and in my opinion, best) is to just add some other face attribute to org-todo and org-done to help demarcate the keywords. This is what I'm currently using in my init.el as a workaround, in case anyone else finds it useful:

(let ((theme 'base16-ashes))
  (load-theme theme t)
  (require 'org-faces)
  (let ((colors (symbol-value (intern (concat (symbol-name theme) "-colors"))))
        (faces '((org-todo :background base01)
                 (org-done :background base01))))
    (dolist (spec faces)
      ;; prefer set-face-attribute over base16-set-faces because it preserves
      ;; any existing face attributes
      (apply 'set-face-attribute
             `(,(car spec) nil ,@(base16-transform-spec (cdr spec) colors))))))

It's not the prettiest, but it's an improvement imo (again shown with Ashes theme):

Org headings improved

Alternatively, you could let headings all share a color, but I suspect most people are used to org headings having their own colors, since that's the default behavior inherited from outline-mode. You could also change the keyword foreground to something unused by the headings, but I don't think there are two appropriate unused colors.

yilkalargaw commented 5 years ago

It is a problem that irks me. I just use custom-set-faces set-face-attribute to correct it but I really wish I don't have to and that the problem be solved by in the source code.

belak commented 5 years ago

Thanks for your comments! I like how this looks, so I just added a background of base01 to those faces.