Created
July 22, 2010 16:10
-
-
Save developernotes/486174 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Send the file to our running Emacs and bring it to the foreground. | |
~/tools/emacs/bin/emacsclient "${1}" \ | |
2> /dev/null \ | |
# If that failed, then open a new emacs visiting the file. | |
if [ $? -ne 0 ]; then | |
dir=sed "/s/\/cygdrive\//g/" ${PWD} 2> /dev/null | |
EOPEN_DIR="${dir}" EOPEN_FILE="${1}" ~/tools/emacs/bin/runemacs.exe | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment