Closed justinjk007 closed 7 years ago
I'm not sure if you can nest use-package
reliably. Try this:
(use-package powerline)
(use-package airline-themes
:after powerline
:config
(if (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame)
(select-frame frame)
(load-theme 'airline-solarized-alternate-gui)))
(load-theme 'airline-solarized-alternate-gui)))
For what it's worth I am using almost the same in my config but without using the :after
property. It is a nice way to define load order though.
Doing that I get the same error on terminal when trying to start the client, which is
*ERROR*: Unable to find theme file for `airline-solarized-alternate-gui'
No problem with the just emacs thou, only problem is the client works for the first time, then if we close it and start the client again, it spits out the error and vanishes.
Hmm, I'm not sure what's going on. I tried your use-package invocation exactly as is within my config and am not getting that error.
I launch emacs --daemon
and then start emacsclient -c
. A new frame is created with the *scratch*
buffer but the airline modeline is not applied there (or in *messages*
). If I open a new file or buffer it appears correctly then.
Why is the after-make-frame-functions
hook needed in this case? Does loading the theme once not behave as expected?
I'll try cloning your dotfiles and see if I can reproduce it.
Thanks, I am not that good with elisp, this is a solution I found somewhere when I first started using emacsclient , and that worked. When I recently migrated to use-package it stopped working again.
I launch emacs --daemon and then start emacsclient -c. A new frame is created with the scratch buffer but the airline modeline is not applied there (or in messages). If I open a new file or buffer it appears correctly then.
Yes, that is the behavior I am used to too. But now its not working anymore.
@AnthonyDiGirolamo
Problem Solved, I had these in my custom set variables
'(custom-theme-load-path
(quote
("~/.emacs.d/elpa/airline-themes-20170425.1646"
"~/.emacs.d/elpa/solarized-theme-1.2.2" custom-theme-directory t)))
but the directory I was referring had the old version number. I corrected that and the theme loads like it is supposed to even in emacsclient. Thanks
But I should ask you, is there any way to completely remove this custom-theme-load-path
or at least move it to use-package so I can keep track of it every-time a new update comes?
Thank you very much for sticking around anyways.
I fixed this long time ago...why is this still open ..lol
This is what I have in my config
In the past when I was not using use package this is what I used and this cleared all problems with emacsclient failing
Any clue how to fix this thanks