From 970266dba6e85cf706b05728060dbd24013725e4 Mon Sep 17 00:00:00 2001 From: Jochen Lillich Date: Tue, 21 Jun 2011 20:30:26 +0200 Subject: [PATCH] New emacs plugin --- plugins/emacs/emacs.plugin.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/emacs/emacs.plugin.zsh diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh new file mode 100644 index 000000000..ada12fab7 --- /dev/null +++ b/plugins/emacs/emacs.plugin.zsh @@ -0,0 +1,16 @@ +export EMACS_APP="/Applications/Emacs.app" + +# open in background, eventually using running app +export EDITOR="open -a $EMACS_APP" + +# always open new app, wait until closed +export GIT_EDITOR="open -n -W -a $EMACS_APP" + +alias em="$EDITOR" + +# workaround b/c Emacs can only open already existing files +function _emacs_touch_and_edit() { + touch $* + $EDITOR $* +} +alias emt=_emacs_touch_and_edit