TheBB / spaceline

Powerline theme from Spacemacs
GNU General Public License v3.0
537 stars 60 forks source link

hard to read color contrast when using emacsclient -t #109

Open arronmabrey opened 8 years ago

arronmabrey commented 8 years ago

I'm using a freshly generated .spacemacs from the new v0.200.0 spacemacs release.

when using emacsclient -t it looks like this emacsclient

when using emacs it looks like this emacs

I have a feeling this "contrast issue" is only a symptom of some larger issue, but I'm not 100% sure.

One clue I have been able to find, is during startup of emacsclient -t the following errors occur. This is why I decided to open a spaceline issue vs a spacemacs issue.

Error during redisplay: (eval (spaceline-ml-main)) signaled (wrong-type-argument hash-table-p nil)
Invalid face reference: widget-button
Invalid face reference: font-lock-doc-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-preprocessor-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-function-name-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-doc-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-keyword-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-preprocessor-face
Invalid face reference: widget-button [3 times]
Invalid face reference: font-lock-function-name-face
Invalid face reference: widget-button [14 times]
Error during redisplay: (eval (spaceline-ml-main)) signaled (wrong-type-argument hash-table-p nil)
carbohydratesn commented 7 years ago

I'm getting the same error using emacs, no client -

Error during redisplay: (eval (spaceline-ml-main)) signaled (wrong-type-argument hash-table-p nil)

Perhaps it's time to open a Spacemacs issue, apparently nobody checks spaceline issues :(

TheBB commented 7 years ago

I check them, however I can't reproduce any such error.

carbohydratesn commented 7 years ago

Ah, awesome! I have reproduced the error message from a clean install of spacemacs, with a minimum number of actions -

clone the spacemacs repo to .emacs.d generate a new .spacemacs, I use evil-mode and ivy

download the 'exwm' layer from https://github.com/CestDiego/spacemacs/tree/SpacemacsOS/layers/%2Bwindow-management

I'm having trouble figuring out how to download that as a .zip again, but put the 'exwm' folder from that dir into your .emacs.d/private/local/layers/

And then add exwm to your dotspacemacs-configuration layers, add persp-mode to your dotspacemacs-excluded-packages, and add (exwm-enable) to your dotspacemacs/user-config

Launch emacs from a virtual terminal (e.g. vt01) with

xinit exec emacs -- :0 vt1 or for vt02, xinit exec emacs -- :1 vt2, etc

emacs will launch and go to fullscreen

Those steps together reproduce the error message for me, leave any one out and it doesn't.

This is just a guess, but emacsclient probably uses some of the same protocols as exwm and xelb. I don't know if arronmabrey uses exwm but this issue is all that came up googling for it.

TheBB commented 7 years ago

If you need a third party layer to reproduce an error message, I think I know who I'd complain to first.

TheBB commented 7 years ago

That's not to say the problem isn't in spaceline, of course.

carbohydratesn commented 7 years ago

The layer is a pretty minimal configuration, I think it would happen with exwm and xelb on their own. The layer mostly just tells emacs to pull them from git. Using the layer is several steps shorter to reproduce than configuring it from scratch.

The error message says something's happening with spaceline, but I can open a new issue with ch11ng over at exwm if you think it would help.

And I doubt arronmabrey uses exwm, their issue was with emacsclient, which (I think, haven't looked into emacsclient's backend) uses many of the same low-level elisp functions xelb does. They both translate 'emacs-ese' to the X server and back. If nothing else they both definitely call redisplays, which is where the error is occurring -

Error during redisplay: (eval (spaceline-ml-main)) signaled (wrong-type-argument hash-table-p nil) [363 times]
QuitError during redisplay: (eval (spaceline-ml-main)) signaled (wrong-type-argument hash-table-p nil)
Error during redisplay: (eval (spaceline-ml-main)) signaled (wrong-type-argument hash-table-p nil) [199 times]

I'm currently trying to bisect spaceline and exwm&co. to figure out when exactly this started happening. Hopefully that will make it clearer whose side of the fence it's on, haha

TheBB commented 7 years ago

It would be simpler to selectively disable segments instead of bisetning I think, since the API hasn't been stable.

jsoo1 commented 7 years ago

I reported low color contrast in #37. Seems likely that we are having the same problem. I don't use exwm, though so i think there is no need to check for interaction between spacemacs and exwm. I do, however, use ivy. Maybe the issue is there?

jsoo1 commented 7 years ago

i ~don't~ do have those error messages, ~either~ too

jsoo1 commented 6 years ago

Is everyone facing this issue using spacemacs? I found a reasonable solution in #37 and I believe my problem is with spacemacs, not spaceline. In light of that, I would not mind if these issues were closed.