sellout / emacs-color-theme-solarized

Emacs highlighting using Ethan Schoonover’s Solarized color scheme
http://ethanschoonover.com/solarized
MIT License
1.15k stars 201 forks source link

In emacs 24 I cannot get load-theme to recognize solarized. #18

Closed milkypostman closed 12 years ago

milkypostman commented 13 years ago

I have the directory in my load path. but load-theme (and even enable-theme) do not recognize the theme as being installed.

jwhitley commented 13 years ago

It appears that emacs 24 (built from revno 104333 of the emacs bzr repo) has a different mechanism for loading themes than documented for solarized, as well as some API breakage. From custom.el, emacs now looks for files of the form THEME-theme.el in ~/.emacs.d/ by default (one can specify additional directories via custom-theme-load-path).

It appears that the zenburn theme has done a port for emacs 24; I add it here as a reference to the new API: https://github.com/djcb/elisp/blob/master/themes/zenburn-theme.el

This post on the zenburn emacs 24 port has a few useful tips for users as well: http://emacs-fu.blogspot.com/2011/05/porting-zenburn-theme-to-emacs-24.html

andersjohansson commented 12 years ago

For me it just worked putting solarized-definitions.el, solarized-dark-theme.el and solarized-light-theme.el as of commit 3448 in ~/.emacs.d/ and then using load-theme with solarized-(light|dark). I don't know if the files are really "properly" ported considering jwhitley's comment though.

Using GNU Emacs 24.0.92.1

drewwells commented 12 years ago

Is this getting fixed?

sellout commented 12 years ago

Is the fix for this just to change the README from

Add the emacs-color-theme-solarized directory to your Emacs load-path.

to

Add the emacs-color-theme-solarized directory to your Emacs load-path and custom-theme-load-path.

The reason it needs to be in both is because the theme files reference solarized-definitons.el, so that file needs to be in the load-path.

@jwhitley – What is the API breakage? Solarized's definition is a bit complicated because I'm using one form to generate both light and dark themes and both color-theme and Emacs 24 themes, so it's not quite as straightforward as a normal theme definition. That said, I am having trouble getting the Emacs 24 light theme to work properly (it loads, but colors are often wrong), while the other three all are.

drewwells commented 12 years ago

Perhaps this would help: https://github.com/purcell/color-theme-sanityinc-solarized/commit/4f115a2a342a4c0f71e275f24d34d1aae11748ef purcell's version works quite well with the new package manager

My only reference in .emacs

(package-initialize)
(load-theme 'solarized-dark t)
sellout commented 12 years ago

@drewwells That's all you should need in mine, too. It seems your complaint is more that solarized isn't in ELPA. Is that right? I can definitely get it added.

sellout commented 12 years ago

@drewwells Actually, I forgot, but solarized is already in the Marmalade repo.

drewwells commented 12 years ago

Actually I was a bit confused, there are three variations of solarized in Marmalade/ELPA repos. One of them is a fork, and only one of the other two worked when I installed it. The one I installed uses (load-theme 'solarized-dark t).

sellout commented 12 years ago

@drewwells “color-theme-solarized” is this one. Did that one work for you?

drewwells commented 12 years ago

No, it doesn't show up under load-theme or enable-theme. I think the commit above solves that problem

hineios commented 5 years ago

Have you considered including this on Melpa too?

(apparently Marmalade has an expired certificate, is no longer ELPA compatible and is discontinued?

drewwells commented 1 year ago

lol, i'm still seeing this issue. Do the install instructions need to include load-path? I don't see anything new that tells people how to get the el files included as part of load-path