caldwell / build-emacs

Build scripts for www.emacsformacosx.com
http://www.emacsformacosx.com/about
GNU General Public License v3.0
364 stars 61 forks source link

using emacsclient issues #102

Closed duhd1993 closed 2 years ago

duhd1993 commented 3 years ago

Hello, thanks for the build. I'm having issues using emacsclient.

I set up emacsclient according to https://emacsformacosx.com/tips. When I use ec xxx.txt, it opens a graphical frame but emacsclient cannot socket to it. It seems because the emacs need some time to finish loading.

  1. emacsclient -a "" -c alone works for me. It opens the app and the file. But closing the GUI APP also closes the daemon. Is it possible to close the GUI app and leave the daemon in the background? emacs --daemon opens a daemon in the background. And it seems the GUI app can take advantage of it. But then it's absorbed and would be closed together when you quit the GUI app.
  2. alias em=emacsclient -a "" -c won't open the GUI app. This is very strange. I cannot use alias on this. But this can be avoided by adding a script to path.

If it's not proper to ask here, could you direct me to where I can get some help as a newbie?

caldwell commented 2 years ago

You are not missing anything. The Emacs daemon works a little weird on MacOS—it's not nearly as seamless as it is with X Windows. This is an emacs issue though, not really a build issue.

FWIW, I start a normal gui emacs session and then do M-x server-start to start the daemon and just live with an emacs frame always around…