I'm struggling to workaround the problem discussed in this post. I'm working through the accepted solution (which also references this post, and getting what I think is close, but not quite there. The steps I'm taking—-just to try to recap my integration of multiple SO posts--are:
Putting the following script into a file called emacs_catalina_wrapper
, which now resides in my Laptop-level Applications
folder (i.e. not my user-level Applications
folder). That script (shell set to /bin/bash
, which is what I'm using in Terminal) is exactly:
if ! pgrep Emacs; then
open -a Emacs.app
sleep 1
fi
for f in "$@"
do
/usr/local/bin/emacsclient -cn -d localhost:0 "$f"
done
(I added -d localhost:0
because I was otherwise getting the error discussed here.)
I then run the following from terminal:
MyMac:bin$open -a /Applications/emacs_catalina_wrapper.app my_python_script.py
Whether or not Emacs is already running, that brings up a blank window (which appears to bear the name of that script, but contains none of its text -- my_python_script.py is not new...it's an existing script I'm looking to edit, not create). my_python_script.py lives in the directory I'm running this from, btw.
What am I missing? I'm not even sure what additional information to add here to help you help me!