tungd / color-theme-approximate

Makes normal color theme works on terminal
12 stars 1 forks source link

Approximations don't work on initial startup #1

Open Deewiant opened 9 years ago

Deewiant commented 9 years ago

Even with this fairly minimal init.el I simply can't get the approximation to work without having to do some manual work after starting emacs:

(require 'package)
(setq package-archives '(("melpa-unstable" . "http://unstable.melpa.org/packages/")))
(package-initialize)
(unless package-archive-contents (package-refresh-contents))
(unless (package-installed-p 'color-theme-approximate) (package-install 'color-theme-approximate))
(unless (package-installed-p 'sublime-themes) (package-install 'sublime-themes))
(color-theme-approximate-on)
(load-theme 'spolsky t)

Result after emacs -nw and the above init.el: default-approximated theme. Re-enabling the theme e.g. with M-x enable-theme causes the approximation to kick in, but I haven't found a way of getting it to work automatically. I tried using tty-setup-hook to delay calling load-theme but it didn't affect the end result.

emacs --version reports "GNU Emacs 24.4.1".

Am I doing something wrong?

tungd commented 9 years ago

Hi, sorry for the late response,

I'm still looking at this, the cause could be some change related to the advice system.

Thanks.

jcsackett commented 9 years ago

Any progress on this issue? I'm encountering the same problem, same version of emacs, loading the base16-monokai-dark-theme.

tungd commented 8 years ago

Hi, It's been a long time, so sorry. After a while trying to figure out what's changed in the advice system, I gave up. For now the workaround is to delay load theme, the window-setup-hook seems to work for me. My current config:

(color-theme-approximate-on)
(add-hook 'window-setup-hook (lambda () (load-theme 'solarized-dark t)))
sammoth commented 7 years ago

Hi, I have this problem too but the window-setup-hook isn't working for me either.