How to launch GUI Emacs from command line in OSX?

Call the following script “emacs” and put it in your PATH somewhere:

#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs "$@"

That covers #2, #3, and #4.

For #1, put this somewhere in your .emacs file:

(x-focus-frame nil)

The emacsformacosx.com site now has a How-To page, which is where the top snippet came from. There’s more info there about running emacsclient and hooking Emacs up to git mergetool.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)