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

default light theme for emacsclient #12

Open
michalisv opened this issue Oct 7, 2021 · 7 comments
Open

default light theme for emacsclient #12

michalisv opened this issue Oct 7, 2021 · 7 comments

Comments

@michalisv
Copy link

i've downloaded nano-theme through ELPA. This is the init.el:

(require 'nano-theme)
(nano-dark)

load daemon:

emacs --daemon

then from terminal do:

emacsclient -c

this creates a new emacsclient frame which has nano-light theme. But if i open an emacsclient on the same terminal buffer:

emacsclient -t

this time the instance comes up with nano-dark. I would expect based on my config that nano-dark would be loaded in both cases. I can't reproduce this with other themes that i tried (e.g. modus). This is on emacs 27.1 && trunk from 2 weeks ago

@rougier
Copy link
Owner

rougier commented Oct 18, 2021

Thanks for the report. Something's wrong and I need to test why it is the case. Maybe this come from the added possibility of having the two versions of the them on two different frames.

@rougier
Copy link
Owner

rougier commented Oct 18, 2021

Can you try to load the dark theme the usual way (using load-theme) to check if it makes any difference?

@rougier
Copy link
Owner

rougier commented Oct 19, 2021

It might have been fixed with latest commit. Can you try?

@michalisv
Copy link
Author

michalisv commented Nov 22, 2021

apologies for being late here, the notification went under my radar.

re-edit:

ok so i don't know if you pushed these changes in ELPA but i tired 0.2.1 and the behavior is the same as the one described above, even with

(load-theme 'nano-dark t)

added instead of just (nano-dark)

i also checked out the files from this repository directly and had this init.el:

(load-file "~/.emacs.d/nano-theme.el")
(load-file "~/.emacs.d/nano-dark-theme.el")
(load-file "~/.emacs.d/nano-light-theme.el")
(require 'nano-theme)
(load-theme 'nano-dark t)

this time the light theme is loaded in all emacsclient instances (terminal & windowed)

not sure if i'm still doing something horribly wrong

@rougier
Copy link
Owner

rougier commented Dec 1, 2021

Late too, sorry. I've invesitgated a bit and I think the problem comes from the fact that it is possible to have two frames, one with light and one with dark. I tried to fix it (GitHub only, not yet ELPA) but this need more test. If you can test the GitHub version, that would be great else, don't hesitate to spam me before I make the release on ELPA.

@michalisv
Copy link
Author

hi Nicolas, i tried latest github with following init.el:

(load-file "~/.emacs.d/nano-theme.el")
(load-file "~/.emacs.d/nano-dark-theme.el")
(load-file "~/.emacs.d/nano-light-theme.el")
(require 'nano-theme)
(load-theme 'nano-dark t)

emacsclient frames come up with light theme. If i switch the order or just comment out the light-theme:

(load-file "~/.emacs.d/nano-theme.el")
(load-file "~/.emacs.d/nano-light-theme.el")
(load-file "~/.emacs.d/nano-dark-theme.el")
(require 'nano-theme)
(load-theme 'nano-dark t)

frames will be created with the dark mode. Looks like it takes the settings from the latest loaded file. Personally i'm ok with just skipping the light theme loading so feel free to close this issue if you think this is a corner case not worth of further effort :)

@rougier
Copy link
Owner

rougier commented Jan 31, 2022

Thanks for the report. I would prefer to keep the issue until solved.

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