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'
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

1 Answer 1


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):

ls -l /Applications/Emacs.app/Contents/MacOS/
total 110296

-rwxr-xr-x@  1 rful011  admin      3408  2 Sep 19:19 Emacs
-rwxr-xr-x@  1 rful011  admin  18889792  2 Sep 19:19 Emacs-x86_64-10_10
-rwxr-xr-x@  1 rful011  admin  18690016  2 Sep 19:19 Emacs-x86_64-10_14
-rwxr-xr-x@  1 rful011  admin  18883904  2 Sep 19:19 Emacs-x86_64-10_9

and if I make my alias

alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_14 -nw $1'

it works.

  • Pointing out that shell aliases are simple text replacement, and don't do parameter substitution. So the $1 is meaningless and always null and not necessary. Commented Jul 9, 2022 at 3:00
  • Doh! Of course. Silly me! Commented Jul 10, 2022 at 7:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .