0

I get the same error as this Stack Overflow asker when trying to use a wrapper script to tell OSX where the emacs server socket is:

I don't think it's a bash issue, as the Emacs PID is correctly identified before the error log appears, and echo $@ returns the appropriate filename:

/ » ec installer.failurerequests
installer.failurerequests
Waiting for Emacs...
-emacs-pid 66202
-error Unknown&_command:&_//installer.failurerequests

For reference, here is the bash code:

#!/bin/bash 

socket_file=$(lsof -c Emacs | grep server | tr -s " " | cut -d' ' -f8)

if [[ $socket_file == "" ]]; then        

    /Application/Emacs.app/Contents/MacOS/Emacs $@ &

else
    ##### THIS IS THE BRANCH THAT IS RUN
    echo "$@"
    emacsclient --socket-name=$socket_file "$@"
fi

Is there some extra escaping needed on the emacs server side or something?

  • What is the value of socket_file? – Lindydancer Jun 15 '16 at 7:12
  • @Lindydancer It depends on the session, but in OSX it looks something like this when emacs-server is running: /var/folders/fq/_rst8fw93jl0dqjsc3vhqzrh0000gn/T/emacs501/server – bright-star Jun 15 '16 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.