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

Does not support multiple frames opened in both GUI and terminal #78

Open
lingnand opened this issue May 1, 2017 · 9 comments
Open

Comments

@lingnand
Copy link

lingnand commented May 1, 2017

I run emacs daemon and have all my emacs frames connect to the daemon via emacsclient. As I understand the theme right now detects GUI/terminal env on theme loading during emacs startup - meaning that once the emacs daemon is up and running, if it is started within the GUI env, all the terminal (tty) frames that later connect to it will have wrong colors loaded - even though the theme itself does know what the colors should be for the tty.

I'm no expert on how to configure emacs to solve this problem - but a quick google shows that one should define the faces by specifying the display environment the faces are for explicitly: https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html

@nashamri
Copy link
Owner

nashamri commented May 2, 2017

Hey @lynnard thanks for reporting this 😄

Can you provide some screenshots and some info about your setup? (OS, terminal emulator, etc...)

I see some issues when I used a tty and a gui at the same time but I need to make sure it's the theme's fault and not some weird issue with the terminal emulator.

Defining faces, I think, is out side the scope of the theme as they are usually defined by the modes.

@lingnand
Copy link
Author

lingnand commented May 2, 2017

This is what it looks like when I have an emacsclient -nw in terminal connecting to an existing daemon started in GUI mode.

image

This is when I start a fresh -nw emacs instance in the same terminal.

image

Regarding faces - I got the hint here https://emacs.stackexchange.com/questions/2096/different-themes-for-terminal-and-graphical-frames-when-using-emacs-daemon - in the solution it does look like defining a theme though.

@nashamri
Copy link
Owner

nashamri commented May 2, 2017

Yeah I'm getting the same dark blue lines in your first screenshot and it seems like an issue with the theme. Thanks for the link, I'll look into it 👍

@nashamri
Copy link
Owner

nashamri commented May 2, 2017

@lynnard this one seems a bit complicated 😄
As a workaround, from the emacs stackexchang link, this package https://github.com/vic/color-theme-buffer-local might be useful and should allow you to set a theme per buffer. I did not test it though.

@lingnand
Copy link
Author

lingnand commented May 7, 2017 via email

@MichaelStergianis
Copy link

MichaelStergianis commented Aug 19, 2017

I am having a similar problem, a temporary solution (works as long as your daemon is running until it is closed) is to call

(load-theme 'spacemacs-dark)
(spaceline-compile)

The reason I call spaceline compile is because loading the theme seems to load some of the spaceline colours incorrectly.

jabranham added a commit to jabranham/spacemacs-theme that referenced this issue Sep 21, 2017
This fixes issue nashamri#78, and possibly nashamri#65
@gagbo
Copy link

gagbo commented Jun 11, 2019

A solution for this would be to specify the 2 classes in the theme. That's what was done in srcery-theme, and what I eventually did for my personal theme which follows more closely your architecture. It makes the code a lot more verbose but I don't have the issue anymore

@nashamri
Copy link
Owner

Could this be related? #144. I think some of the loading issues for the theme are solved by this.

@gagbo
Copy link

gagbo commented Jun 11, 2019

It is probably related, I removed the "dyn-let" before too, and I still had to reload the theme to have the changes appear properly between term and GUI. I have no need to reload anything with the 2 classes in the face definition

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

4 participants