[OS X Emacs] aquamacs interacting incorrectly with git (and .org site not working)

Win Treese treese at acm.org
Mon Mar 4 21:53:34 EST 2019

> On Mar 4, 2019, at 3:02 PM, David Romano <dromano at stanford.edu> wrote:
> Here's a quick experiment at the terminal in an empty directory called 'aqua' that shows what I mean:
> $ git config --global  core.editor aquamacs
> $ git init
> $ echo "a" > a
> $ git add .
> $ git commit
> Aborting commit due to empty commit message.
> $
> Here `git commit` triggered an COMMIT_EDITMSG file to be opened, but completed at the same time, preventing me from being able to write anything. This is definitely odd behavior.

When you run aquamacs in the terminal (and I’m assuming that it’s the program that is usually found at /Applications/Aquamacs.app/Contents/MacOS/bin/aquamacs), the key thing is that it detaches itself from the terminal so it can run as a GUI application. You can see this if you just run aquamacs at the shell prompt:

$ aquamacs

It will come back to the shell right away, but the window will pop up. 

From git’s point of view, when it detaches it looks like the editor has finished, so it prints the abort message at the same time Aquamacs is opening its initial windows. It does seem odd in the way it plays out, but it’s really just the difference between the way GUI apps and command-line programs behave. Most of the time, you don’t see this, because there aren’t really many GUI apps on the Mac that people launch from the command line.

It sounds like emacsclient may do the job for you.

If you are doing a lot with git and using Aquamacs, you might also look at the magit package (https://magit.vc), which is a great way to deal with git from within Aquamacs instead of going to the terminal.


More information about the MacOSX-Emacs mailing list