Closed mattduck closed 9 years ago
I want to have something like this, so I’m glad you’ve tried something.
One issue that comes to mind is that the colors mapped to base3
, etc. may be different for each frame (EG, a GUI frame with a light background will have #002b36
, while a frame running in a 16-color terminal in the same Emacs instance will have brightwhite
), so you may want to add custom frame parameters to fake frame-local bindings.
Now, I don’t know what will happen if you reference those frame parameters in my-custom-org-setup
. Does it get the value from whichever frame happens to be frontmost? I would guess so.
It would also be nice to expose something like create-face-spec
(which should probably be called solarized-create-face-spec
) that does just the spec part (without consing on name
), so that maybe you could do
(setq org-todo-keyword-faces
`(("TODO" . ,(sol-spec '(:foreground solarized-orange)))
("HOLD" . ,(sol-spec '(:foreground solarized-base3)))
("DONE" . ,(sol-spec '(:foreground solarized-base01)))))
and have (sol-spec '(:foreground solarized-orange))
expand into
((((background dark) (type graphic)) (:foreground "#cb4b16"))
(((background dark) (type tty) (min-colors 256)) (:foreground "brightred"))
(((background dark) (type tty) (min-colors 16)) (:foreground "brightred"))
(((background dark) (type tty) (min-colors 8)) (:foreground "red"))
(((background light) (type graphic)) (:foreground "#cb4b16"))
(((background light) (type tty) (min-colors 256)) (:foreground "brightred"))
(((background light) (type tty) (min-colors 16)) (:foreground "brightred"))
(((background light) (type tty) (min-colors 8)) (:foreground "red")))
org-todo-keyword-faces
will accept a full spec like that.Anyway, this is just more stuff to think about. I haven’t done anything in this direction myself, and I appreciate that you have.
@sellout Thanks for your thoughts here, some things that I hadn't considered (eg. supporting tty and gui frames).
At some point I will get back to this and write something that fits with the updates you've made this year, but I don't know when it will be yet. In the meantime, as long as #113 is open for discussion, it might make sense to close this PR.
Make color values accessible as
solarized-base01
,solarized-blue
etc, and add asolarized-theme-hook
that runs when those variables are updated (plus some other related functions). You can then use the color variables in ad-hoc situations:I'm not certain this should be merged, it's clumsy and I'm not too familiar with the customization system. It's a solution to this situation:
Is there a more elegant / proper way of achieving this?