Aquamacs Emacs and the cli emacs can both compile lilypond files.
Emacs.app doesn't seem to load my $PATH correctly, because I get /
bin/bash: lilypond: command not found
I've solved this by having an ~/.MacOSX/environment.plist, which
contains global settings for your user-id.
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/Users/<username>/bin:/sbin:/bin:/usr/bin:/usr/sbin:/usr/
X11R6/bin:/usr/local/bin</string>
</dict
</plist>
Logout and login to see the changes.