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

Sometimes powerline does not load #33

Closed
trishume opened this issue Oct 24, 2014 · 5 comments
Closed

Sometimes powerline does not load #33

trishume opened this issue Oct 24, 2014 · 5 comments
Labels

Comments

@trishume
Copy link
Contributor

Some types of file opening don't load the powerline after startup. I think this is caused by over-zealous lazy loading. This only happens for certain file types, which leads me to suspect it is something to do with less-fancy major modes not trying to modify the modeline and thus not calling the hooks that lazy-load powerline.

It happens when loading files in any way and for certain types including: directories, .plist files, some other things I don't remember.

Reproducible Steps

  • Start spacemacs
  • Open a directory with emacsclient (or any other method)
  • Modeline is blank

If this is due to lazy loading, this could potentially be fixed by not lazy-loading powerline. This makes sense since when would you ever start emacs and do a bunch of actions where you want none of them to have a powerline?

Error Messages

Note in the second message it mentions some flycheck-mode thing being void. This makes me suspect it is a lazy loading problem, and that this issue happens for any file type that flycheck does not support.

This is this error I get in messages after startup:

Eager macro-expansion failure: (error "Autoloading failed to define function defpowerline")
Error: (file-error "Cannot open load file" "no such file or directory" "powerline")
Error: (file-error "Cannot open load file" "no such file or directory" "tex-site")

And then this error after loading one of the aforementioned file types:

Error during redisplay: (eval (let* ((active (powerline-selected-window-active)) (line-face (if active (quote mode-line) (quote mode-line-inactive))) (face1 (if active (quote powerline-active1) (quote powerline-inactive1))) (face2 (if active (quote powerline-active2) (quote powerline-inactive2))) (state-face (if active (spacemacs/current-state-face) face2)) (flycheckp (and spacemacs-mode-line-flycheckp (symbolp flycheck-mode) (symbol-value flycheck-mode) (or flycheck-current-errors (eq (quote running) flycheck-last-status-change)))) (vc-face (if (or flycheckp spacemacs-mode-line-minor-modesp) face1 line-face)) (separator-left (intern (format "powerline-%s-%s" powerline-default-separator (car powerline-default-separator-dir)))) (separator-right (intern (format "powerline-%s-%s" powerline-default-separator (cdr powerline-default-separator-dir)))) (lhs (append (list (powerline-raw (spacemacs/window-number) state-face)) (if anzu--state (list (funcall separator-right state-face face1) (powerline-raw (anzu--update-mode-line) face1) (funcall separator-right face1 line-face)) (list (funcall separator-right state-face line-face))) (list (powerline-raw "%*" line-face (quote l)) (powerline-buffer-size line-face (quote l)) (powerline-buffer-id line-face (quote l)) (powerline-raw " " line-face) (funcall separator-left line-face face1) (powerline-major-mode face1 (quote l)) (powerline-raw " " face1) (funcall separator-right face1 line-face)) (if flycheckp (list (powerline-raw " " line-face) (powerline-raw (spacemacs//custom-flycheck-lighter error) (quote spacemacs-mode-line-error-face)) (powerline-raw (spacemacs//custom-flycheck-lighter warning) (quote spacemacs-mode-line-warning-face)) (powerline-raw (spacemacs//custom-flycheck-lighter info) (quote spacemacs-mode-line-info-face)))) (if (and flycheckp spacemacs-mode-line-minor-modesp) (list (funcall separator-left line-face face1) (powerline-raw "  " face1) (funcall separator-right face1 line-face))) (if spacemacs-mode-line-minor-modesp (list (powerline-minor-modes line-face (quote l)) (powerline-raw mode-line-process line-face (quote l)) (powerline-raw " " line-face))) (if (or flycheckp spacemacs-mode-line-minor-modesp) (list (funcall separator-left (if vc-face line-face face1) vc-face))) (list (powerline-vc vc-face) (powerline-raw " " vc-face) (funcall separator-right vc-face face2)))) (rhs (list (funcall separator-right face2 face1) (powerline-raw " " face1) (powerline-raw "%l:%2c" face1 (quote r)) (funcall separator-left face1 line-face) (powerline-raw " " line-face) (powerline-raw "%p" line-face (quote r)) (powerline-chamfer-left line-face face1) (let ((progress (format-mode-line "%p"))) (if (string-match "%" progress) (powerline-hud state-face face1)))))) (concat (powerline-render lhs) (powerline-fill face2 (powerline-width rhs)) (powerline-render rhs)))) signaled (void-variable flycheck-mode)
@syl20bnr
Copy link
Owner

Thank you for the detailed description of the issue. I think I fixed it with this commit 0144604, can you pull it and let me know if you can reproduce it ?

@syl20bnr
Copy link
Owner

@trishume Just did the repo steps and the Eager macro-expansion error is still here.

@syl20bnr
Copy link
Owner

I reinstalled the powerline package by deleting it in elpa folder and I restarted Emacs. The issue is gone.
Do you have 24.4 and 23.4 installed ?
I'm moving on 24.4 so maybe the byte-compiled version from 24.3 was not fully compatible.

Tell me if reinstalling/recompiling the powerline package did the trick for you too.

@trishume
Copy link
Contributor Author

I pulled the latest code and that fixed the modeline problems. I also reinstalled powerline and that fixed the startup error.

Thanks!

@syl20bnr
Copy link
Owner

Great I close this one so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants