Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

If you only want to be able to call it from the command line, an alias would work pretty well.

Add something like:

alias emacs='/Applications/Aquamacs.app/Contents/MacOS/Aquamacs'

to your shell's startup file (~/.bash_profile or similar). (Doesn't gain you much though.)

share|improve this answer
    
Note that "alias" is also a word for a smart redirecting file in Mac Filesystems, so you should specify that you mean a shell alias. Mac aliases (which you can get from the contextual-menu::Make alias in the finder) are rather more than symbolic links. –  dmckee Jan 16 '12 at 13:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.