[OS X Emacs] Aquamacs / aquamacs cmd line / emacsclient

Jack Repenning jrepenning at collab.net
Mon Sep 20 13:17:18 EDT 2010


On Sep 18, 2010, at 9:03 PM, Michael Kohlhase wrote:

> export EDITOR="/Applications/Aquamacs.app/Contents/MacOS/bin/emacsclient"
> alias ec="/Applications/Aquamacs.app/Contents/MacOS/bin/emacsclient"
> and it  works like a charm exactly as you want it.

That combination would not work quite as I want. What I have is

Aquamacs.app is a "Login Item" in my account
~/.Aquamacs/Preferences.el includes (server-start)
export EDITOR="/Applications/Aquamacs.app/Contents/MacOS/bin/emacsclient"
alias e="open -a /Applications/Aquamacs.app"

The Login Item + the (server-start) ensure that there's always an Emacs somewhere, including a server.

The $EDITOR setting works for tools that want to launch an editor, such as version-control comments.

The alias is used when typing at the command line. It causes the files to be loaded while returning my shell prompt so I can do more stuff in that window. This also ensures that Aquamacs gets restarted, in the relatively rare cases where it's croaked for some reason. The one problem with it is that it's no good at creating a new file: if I "e nonesuch", where "nonesuch" does not already exist, "open" refuses to go further.

-==-
Jack Repenning
Chief Technology Officer
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
twitter: http://twitter.com/jrep










More information about the MacOSX-Emacs mailing list