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

Magit can't access Emacs server on Windows #805

Closed
vermiculus opened this issue Aug 24, 2013 · 4 comments
Closed

Magit can't access Emacs server on Windows #805

vermiculus opened this issue Aug 24, 2013 · 4 comments
Assignees
Milestone

Comments

@vermiculus
Copy link
Contributor

When I go to commit my staged changes, Magit fails and complains that git couldn't access the server file.

@vermiculus
Copy link
Contributor Author

And because I don't actually have this issue anymore, but am posting it and a workable solution from #772, I don't have the specific error message anymore.


Turns out that server.el wasn't looking in the right place for the server file. This probably has nothing to do with magit at this point, but to note that it isn't a magit problem:

(setenv "EMACS_SERVER_FILE" (expand-file-name "server/server" user-emacs-directory))

in .emacs fixes the issue (at least as far as magit is concerned). I am using the as-yet-most-recent MELPA build, so no fancy stuff going on here.

@tarsius
Copy link
Member

tarsius commented Aug 24, 2013

We still have to fix this for all users.

@tarsius tarsius reopened this Aug 24, 2013
@vermiculus
Copy link
Contributor Author

I was under the impression that it was a peculiarity to my (horrendous) emacs setup... my apologies. Can anyone confirm this issue existing elsewhere as well? (Windows 8 w/ native Emacs build)

@tarsius
Copy link
Member

tarsius commented Sep 14, 2013

This is a safer variant:

(when server-use-tcp
  (setenv "EMACS_SERVER_FILE"
          (expand-file-name server-name server-auth-dir)))

But Magit runs this exact code, so that should not be necessary. I think server-use-tcp should always be t on Windows. If connecting to the server is not working it might be worth checking the value of that variable and if it is not then try setting it explicitly before starting the server.

And yes, this was probably an issue specific to your setup. So I am closing this now. You are not having this problem anymore, do you? If you still have the snippet you posted above in your init file then please try if it now works for you without that. If not please reopen.

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

No branches or pull requests

2 participants