Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
run or emacsclient on Mac OS X
function e() {
if [ -z `pgrep Emacs` ]; then
env LANG=C open -a Emacs "$@"
local client="/Applications/MacPorts/"
local uid=`id -u`
local socket="$TMPDIR"/emacs"$uid"/server
if [ ! -e "$socket" ]; then
socket=`getconf DARWIN_USER_TEMP_DIR`emacs"$uid"/server
$client -n -s $socket "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment