I installed Aquamacs in a fresh OS X desktop, and wanted to be able to call the program from the commandline.
Calling the file inside the app seems to work just fine:
Amoss-iMac:bin amosjyng$ /Applications/Aquamacs.app/Contents/MacOS/Aquamacs
But of course, the Emacs when called from the Terminal is still version 22. So I log in as root and try
sh-3.2# rm emacs
sh-3.2# ln -s /Applications/Aquamacs.app/Contents/MacOS/Aquamacs emacs
Using the symbolic link now, however, generates a bunch of problems:
Amoss-iMac:bin amosjyng$ emacs
Warning: arch-dependent data dir (/Users/dr/Nightly/Cocoa23ub/aquamacs-emacs.git/nextstep/Aquamacs.app/Contents/MacOS/libexec/emacs/23.3.50/i386-apple-darwin9.8.0/) does not exist.
Warning: arch-independent data dir (/Users/dr/Nightly/Cocoa23ub/aquamacs-emacs.git/nextstep/Aquamacs.app/Contents/Resources/share/emacs/23.3.50/etc/) does not exist.
Error: charsets directory (/Users/dr/Nightly/Cocoa23ub/aquamacs-emacs.git/nextstep/Aquamacs.app/Contents/Resources/share/emacs/23.3.50/etc/charsets) does not exist.
Emacs will not function correctly without the character map files.
Please check your installation!
Warning: Could not find simple.el nor simple.elc
What could I do to fix this?
EDIT:
So I removed the link to Aquamacs, and instead wrote a script file named emacs
consisting entirely of
/Applications/Aquamacs.app/Contents/MacOS/Aquamacs
And now calling emacs
from the Terminal works.
Does anybody have any other ways to do this?
"$@"
to the end/Applications/Aquamacs.app/Contents/MacOS/Aquamacs
in your shell script, so that the script's command-line arguments are passed on to Emacs itself.