Skip to content

Instantly share code, notes, and snippets.

@pao
Created July 9, 2010 03:42
Show Gist options
  • Save pao/468997 to your computer and use it in GitHub Desktop.
Save pao/468997 to your computer and use it in GitHub Desktop.
Emacs stunts
# Insert this into a non-login .rc file (.bashrc is good)
export EDITOR="emacsclient_smartframe.sh"
alias edit="${EDITOR} -n"
#!/bin/sh
if [ `emacsclient -a "" -e "(length (frame-list))"` -gt 1 ]; then
emacsclient -d ${DISPLAY} $@
else
emacsclient -c -d ${DISPLAY} $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment