I'm trying to create a symlink to emacs, in order to let git use it as default editor.

ln -s /Applications/Emacs.app/Contents/MacOS/Emacs emacs

Calling /Applications/Emacs.app/Contents/MacOS/Emacs directly from terminal works.

Calling ./emacs in that folder gives a pop-up that says:

"This application will not run on your computer. Sorry!"

The symlink has permissions rwxr-xr-x.

I don't feel this is related to emacs, I've tried other applications. For example chess:

$ /Applications/Chess.app/Contents/MacOS/Chess # working
$ ln -s /Applications/Chess.app/Contents/MacOS/Chess chess
$ ./chess
2017-04-19 14:39:05.479 chess[16972:4178764] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

How can I make a working executable symlink to an application in /Applications?

(next step is to go through a script instead of a symlink, but I'd rather use a symlink.)

  • Is there a reason not to just make the symlink to the app (.app) instead of something within its contents? – NoahL Apr 19 '17 at 15:46
  • @NoahL: I'm not sure I get what you mean. It's a directory? – Gauthier Apr 20 '17 at 6:23

You must log in to answer this question.

Browse other questions tagged .