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?