valignatev / heaven-and-hell

Emacs light/dark theme toggler
MIT License
58 stars 2 forks source link

no-confirm option for running in daemon mode? #10

Closed cassebas closed 5 years ago

cassebas commented 5 years ago

I would love to use this package, but I run Emacs in daemon mode, I think this doesn't allow me to load the theme? My session isn't started, I guess it's because it's waiting for my confirmation.

This works for me (load-theme 'solarized-light t)

Can I add the t somehow to the heaven-and-hell initilization?

valignatev commented 5 years ago

Hey @cassebas, thanks for reporting an issue and for your interest in the project! Does it work for you without a daemon mode?

cassebas commented 5 years ago

Hi @valignatev thnx for your quick response. I just tried without the daemon mode. It works, although I do get an error, but I think that's from the solarized-theme (or an error in my config perhaps) : Wrong number of arguments: #[(name description color-definitions) etc etc"

This error is shown at the first time I switch with <f6>, when I have to say yes to Loading a theme can run lisp code. Really load? (y or n) y Treat this theme as safe in future sessions? (y or n) y

Another thing is that C-c <f6> only seems to switch to the dark mode, regardless of my heaven-and-hell-theme-type setting.

I must say I'm quite attached to the daemon mode, so if somehow I can automatically trust the loading of the theme upon a switch, that would be awesome. emacs-solarized-theme-error

valignatev commented 5 years ago

Hey @cassebas, I've just added this long overdue no-confirm option (called heaven-and-hell-load-theme-no-confirm). You can set it totand it'll pass NO-CONFIRM to theload-theme`. Hope it'll be useful for you and others.