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

emacsclient path not symlinked as part of installation #88

Open
SreenivasVRao opened this issue Mar 24, 2024 · 7 comments
Open

emacsclient path not symlinked as part of installation #88

SreenivasVRao opened this issue Mar 24, 2024 · 7 comments

Comments

@SreenivasVRao
Copy link

hi alex - many thanks for maintaining the emacs-snap :)

I did a clean-install of emacs / ubuntu 22.04 and had some trouble getting magit to use emacsclient.
Based on magit/with-editor#125 - I had to run this command:

sudo ln -s /snap/bin/emacsclient /usr/local/bin/emacsclient

would be helpful if this was added to the install workflow. unsure where it gets added or I'd have opened a PR

@alexmurray
Copy link
Owner

The snap should set up an automatic alias for emacsclient - can you list the output of: snap aliases? There should already be a symlink in /snap/bin/emacsclient.

@SreenivasVRao
Copy link
Author

sreenivas@arceus:~$ snap aliases
Command              Alias        Notes
emacs.ebrowse        ebrowse      -
emacs.emacsclient    emacsclient  -
firefox.geckodriver  geckodriver  -
sreenivas@arceus:~$ 

@alexmurray
Copy link
Owner

Yep so the alias is there - and there should be a symlink in /snap/bin/emacsclient as well then. So from what I can see, the emacs snap is doing all that it can to ensure an emacsclient is in PATH - snaps are not able to write to /usr/local/bin so it is not feasible for the snap to add such a symlink. Do you know why with-editor is expecting such a symlink to exist?

@SreenivasVRao
Copy link
Author

no sadly - just passing on what I found from the other issue, but looks like it may be a problem with with-editor in this case

@alexmurray
Copy link
Owner

I think it may be more likely a problem with your system - have you by chance manually compiled and installed emacs previously? If so, I suspect there may be symlinks left over in /usr/local/bin - can you please have a look?

ls -la /usr/local/bin/emacs*

@SreenivasVRao
Copy link
Author

no - this is all on a fresh install of ubuntu 22.04 - only installed via snap

sreenivas@arceus:~/.config$ ls -la /usr/local/bin/emacs*
lrwxrwxrwx 1 root root 21 Mar 24 18:27 /usr/local/bin/emacsclient -> /snap/bin/emacsclient

@alexmurray
Copy link
Owner

Hmm weird - so I use magit myself and have never had any issues with it and the emacs snap. On my machine I see with-editor-emacsclient-executable has the value of /snap/emacs/2430/usr/bin/emacsclient - and I have no specific customisations for the with-editor package.

So I can only presume this is an issue with your local configuration... I'll close this issue since there isn't a lot we can do on the snap side of things but am happy to help you try and diagnose what is happening if you need.

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

2 participants