From c57b901c21534f529e605acf4a29f72496bc8fa9 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Wed, 26 May 2010 23:13:50 -0700 Subject: [PATCH] fix emacsclient with this new Emacs on OS X --- zsh/zshrc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index e26b59b..8416c1a 100755 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -34,12 +34,15 @@ fi # default editors if mac; then - export EDITOR="emacsclient" - export VISUAL="emacsclient" - export MANPATH="/opt/local/lib/erlang/man:$MANPATH" + # wtf, you must be kidding + alias emacsclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient \ + -s \$(find /var/folders -name server -type s -uid $(id -u) 2>| /dev/null | grep emacs) \$*" + export EDITOR="emacsclient" + export VISUAL="emacsclient" + export MANPATH="/opt/local/lib/erlang/man:$MANPATH" elif linux; then - export EDITOR="emacs -nw" - export VISUAL="emacs" + export EDITOR="emacs -nw" + export VISUAL="emacs" fi