Skip to content

Instantly share code, notes, and snippets.

@timcharper
Created March 20, 2012 16:47
Show Gist options
  • Save timcharper/2138121 to your computer and use it in GitHub Desktop.
Save timcharper/2138121 to your computer and use it in GitHub Desktop.
edit in emacs for mac os x
#!/bin/sh
osascript -e 'tell application "Emacs" to activate'
until [ -z "$1" ]; do
filename="$1"
if (echo $filename | grep : > /dev/null); then
linenumber="+"${filename#*:}
filename=${filename%:*}
else
linenumber=""
fi
until ( /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -n $linenumber "$filename" 2> /dev/null ); do
printf .
sleep 1
done
shift
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment