homebrew-emacs-plus icon indicating copy to clipboard operation
homebrew-emacs-plus copied to clipboard

emacsclient missing in App Container

Open oguzserbetci opened this issue 4 years ago • 13 comments

I had some issues resulting from emacsclient not being present in the app container, which I could resolve by simply copying it into MacOS folder in the container.

I just wanted to raise the issue to see whether there is a reason it was not included in the distribution.

oguzserbetci avatar Oct 24 '19 15:10 oguzserbetci

Hey, sorry for missing your question.

I don't quite understand what you are saying :smile_cat: If you are talking about app file for the emacsclient executable (which is included), like Emacs client.app, so you can run it as a regular Emacs application, then the answer is - just because I never felt the need for it :smile_cat:

d12frosted avatar Nov 17 '19 10:11 d12frosted

One more request for this: #9.

d12frosted avatar Apr 06 '20 15:04 d12frosted

Sorry for not responding. My setup is different now and thus I solved it differently. I will try to explain how my setup is and what I needed to do for it this weekend :)

oguzserbetci avatar Apr 07 '20 11:04 oguzserbetci

@oguzserbetci no problems :) would appreciate if you share your workflow :)

d12frosted avatar Apr 07 '20 11:04 d12frosted

Excuse the wait. I just checked my setup on reinstalling emacs-plus. And removing any external app that might interfere (brew cask install emacsclient for org-protocol handling)

I don't see any problems with the fresh install regarding emacsclient. I think this issue stems from the fact that I didn't understand how to get emacsclient working. However there are some issues I had which I want to shortly mention here, I can open an issue if you find them worth pursuing:

  1. org-protocol doesn't work out-of-the-box. This is possible on emacs-mac port, with the additional emacsclient cask or the app Platypus (steps to follow are here.)
  2. brew services start emacs-plus doesn't enable executing whether server-start inside emacs because a server is already running or emacsclient --no-wait test. If I stop the brew service and run server-start manually, I'm able to get the emacsclient working.

oguzserbetci avatar May 15 '20 09:05 oguzserbetci

@oguzserbetci thank you very much for sharing this.

Regarding the org-protocol, I think it makes sense to enable its support out of box.

d12frosted avatar May 18 '20 10:05 d12frosted

Thank you for the formula! It might help to look at https://github.com/railwaycat/homebrew-emacsmacport which has out of the box support for org-protocol. If you show me where to look, I can try to help. Don't want to get in the way though, if you think it's easier for you to handle :)

oguzserbetci avatar May 18 '20 10:05 oguzserbetci

If you wish to help, go ahead :smile_cat: I would be really grateful. If you need any help, just let me know. :smile_cat:

I think we need to append few lines in the Info.plist to support this protocol. Also I think (it needs to be checked) that by default Emacs.app doesn't work with emacsclient, so the launcher script must be adapted as well.

Regarding the emacs-mac formula - it doesn't do anything special, as macport supports protocol by itself. I think lots of stuff can be salvaged from there.

d12frosted avatar May 18 '20 10:05 d12frosted

I think this issue is conflating two things. https://github.com/sprig/org-capture-extension installs an app called EmacsClient for org-capture-extension. That isn't related to the emacsclient binary for the Emacs server. The emacs-plus cask does include emacsclient, but it doesn't symlink it into /usr/local/bin, so tools don't find it. It would be helpful if that symlink were included, along with symlinks to the other binaries.

shields-fn avatar May 27 '20 00:05 shields-fn

FYI I could make org-protocol to work with Platypus-way described here: https://www.orgroam.com/manual/Installation-_00281_0029.html#Installation-_00281_0029

yewton avatar Jun 18 '20 00:06 yewton

I already had symlinks from /usr/local/bin to /Applications/Emacs.app, presumably from a previous Emacs install. Therefore, I was able to resolve this issue on my install by executing the following:

cd /usr/local/Cellar/emacs-plus@28/28.0.50/Emacs.app/Contents/MacOS
ln -s ../../../bin bin

If you have a different version of Emacs, you'll need to modify the version appropriately.

danking avatar Oct 18 '21 18:10 danking

I already had symlinks from /usr/local/bin to /Applications/Emacs.app, presumably from a previous Emacs install. Therefore, I was able to resolve this issue on my install by executing the following:

cd /usr/local/Cellar/emacs-plus@28/28.0.50/Emacs.app/Contents/MacOS
ln -s ../../../bin bin

If you have a different version of Emacs, you'll need to modify the version appropriately.

This works the only change is not Homebrew packages are located in /opt/homebrew instead of /usr/local.

@d12frosted I have never looked at a Homebrew formula before. Is this linking something that can be done via Homebrew or is this better added as an additional piece of information at the end of the build along with instructions for enabling the daemon and the linking of the homebrew app to /Applications?

ispringle avatar Jan 26 '24 16:01 ispringle