Skip to content

Instantly share code, notes, and snippets.

@wesen
Created August 22, 2011 06:35
Show Gist options
  • Save wesen/1161798 to your computer and use it in GitHub Desktop.
Save wesen/1161798 to your computer and use it in GitHub Desktop.
Run a file in a new iterm emacs
on run {input}
set the_path to POSIX path of input
set cmd to "emacsclient -nw " & quoted form of the_path
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
set number of columns to 120
set number of rows to 60
launch session "Default"
set _session to current session
end tell
tell _session
write text cmd
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment