After installing Catalina on my laptop emacs vanished so I installed the latest version from FSF. Running it in a window (gui mode) works fine but I can't get it to reliably work in character mode in Terminal.
I can run it fine like this
/Applications/Emacs.app/Contents/MacOS/Emacs -nw
but when I try and create an alias I get an unhelpful error:
alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw $1'
emacs
LSOpenURLsWithRole() failed for the application /Applications/Emacs.app with error -10810.
I found references to starting emacs using open in an alias but open keeps grabbing the -nw and if I use the –args to pass -nw to emacs I get the same error 10810 as above
Best Answer
I actually solved this before I posted but decided that it is worth documenting what I found out.
It turns out that
/Applications/Emacs.app/Contents/MacOS/Emacs
is a small ruby script that figures out which binary to run (there are three):and if I make my alias
it works.