Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not fully loading theme #3

Open
markjfisher opened this issue Nov 19, 2013 · 6 comments
Open

Not fully loading theme #3

markjfisher opened this issue Nov 19, 2013 · 6 comments

Comments

@markjfisher
Copy link

I've got a git install of prelude, and have following in personal/start.el

(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(disable-theme 'zenburn)
(load-theme 'noctilux t)

The problem is that only part of the theme seems to load correctly; the background is still "light" (as per default), but highlighted lines are dark (from noctilux). If I remove the "load-theme" line, then the default theme is working as expected.

i've tried this with other themes (deeper-blue, zenburn for instance) and it works as expected, the background is properly set when it initially loads.

If i manually run M-x load-theme noctilux, it loads correctly, just not on initialising through startup files.

I'm on OS X 10.9, running daemon with "emacs --daemon", and starting the GUI with "emacsclient -c -n". emacs is installed from brew with cocoa and srgb flags (i tried it also without srgb, same result).

@sjrmanning
Copy link
Owner

I don't have any experience with prelude unfortunately, but I can look into it. What happens if you remove the (disable-theme 'zenburn) line?

@markjfisher
Copy link
Author

I get the zenburn's background colour with noctilux mix-in

@markjfisher
Copy link
Author

i've removed prelude and just have this in my .emacs.d/init.el now:

;; add colour themes
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(load-theme 'noctilux t)

and it still fails to load the background colour until i force load the theme.

@sjrmanning
Copy link
Owner

Really strange. I've done a bit of playing and I think it's something in the theme setup that doesn't get run properly in daemon mode. If you leave your config the same as you originally had it, but start without daemon mode, does it work? I'll look into this and try work out exactly what's failing.

@sjrmanning
Copy link
Owner

Alright I think I've found the cause and I've got a temporary fix, but it's pretty late here and I'd like to clean it up and confirm (the whole thing needs a cleanup really) before pushing the changes.

In the mean time, if you like, replace your version of noctilux-definitions.el with this: https://gist.github.com/stafu/de4cba2bb363b53f987f

Basically the original solarized definitions do a bunch of tricky things when it comes to displaying on a terminal with 16 colors or less, including relying on the user to use a custom foreground and background to fake 18 color availability. For some reason starting with --daemon makes the theme load with settings for a 16 color terminal.

There's some discussion of this issue about --daemon missing out on window-system reliant init here: http://emacs.1067599.n5.nabble.com/daemon-vs-server-start-td200799.html

The other option, I think, is to use (server-start) in your init over using emacs --daemon, and have your emacsclient alias set --alternate-editor to start the app normally if the daemon hasn't been started by (server-start) yet.

@markjfisher
Copy link
Author

That gist is working here, cheers, seems a better solution than forcing the server-start in the initialisation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants