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

launching "emacsclient" makes the powerline looks bad #1474

Closed
jonesberg opened this issue May 3, 2015 · 5 comments
Closed

launching "emacsclient" makes the powerline looks bad #1474

jonesberg opened this issue May 3, 2015 · 5 comments

Comments

@jonesberg
Copy link

I've been using emacs client with a command similar to this

#!/bin/bash
exec emacsclient --alternate-editor="" -c "$@"

Since I installed spacemacs, launching this command makes the powerline looks bloated (see screenshot) :

spacemacs-ecw

Launching emacs "the regular way", I get the expected powerline.

spacemacs-regular

Thanks!

@smartass101
Copy link

I can reproduce this problem.

However, if I launch emacs the regular way and then just connect to it via emacsclient -c, the mode line works correctly. So I think this has something to do with the fact that the -a '' option runs emacs --daemon as described in the man page emacsclient(1)

 -a, --alternate-editor=EDITOR
          if the Emacs server is not running, run the specified editor instead. 
          This can also be specified via the `ALTERNATE_EDITOR' environment variable.
          If the value of EDITOR is the empty string, run `emacs --daemon' to start Emacs
          in daemon mode, and try to connect to it.

Therefore, I think this might be related to #1894

Currently a simple workaround is to

  1. specify emacs as the alternate editor
  2. set dotspacemacs-persistent-server to non-nil

because on first run that will start spacemacs and the server and afterwards it will connect to the server. The magic command thus is

emacsclient -c -a emacs

(it works with -t instead of -c too, of course)

I would like to add that the -a emacs option is a very convenient way of starting the daemon in a lazy way on demand. Since spacemacs seems to prefer the lazy-loading approach to reduce loading times, I think that this on demand loading option should be mentioned in the documentation, because I think it's better than the current approach when one has to remember to first start a proper emacs and later use emacsclient.

So the question is whether to

  • mention this -a emacs approach in the documentation as the recommended way and close this issue (and possibly emacs --daemon weird behaviour #1894 unless somebody really needs --daemon) in favor of this workaround
  • properly fix emacs --daemon weird behaviour #1894 by making sure --daemon works and afterwards mention -a '' in the documentation as a a convenient way to load emacs on demand

@TheBB
Copy link
Collaborator

TheBB commented Aug 26, 2015

I agree this is likely the same as #1894 and should be fixed by #2652 when that PR becomes more mature. I'm tagging this as a duplicate since #1894 has more information.

@StreakyCobra
Copy link
Contributor

@jonesberg Now that spacemacs is using spaceline, can you verify this bug still occurs for you? I can not reproduce it. I also know it can be related to #1894, but you know… just to be sure ☺️

@jonesberg
Copy link
Author

It doesn't on my side either. :-)

Thank you so much!

@StreakyCobra
Copy link
Contributor

👍 Nice. I'm happy it's solved for you :-)

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

No branches or pull requests

5 participants