Skip to content

Instantly share code, notes, and snippets.

@sprig
Created March 31, 2016 06:52
Show Gist options
  • Save sprig/5f6250914f4ec3d0e251f41fdccd59c1 to your computer and use it in GitHub Desktop.
Save sprig/5f6250914f4ec3d0e251f41fdccd59c1 to your computer and use it in GitHub Desktop.
Receive URLs or files and forward them to emacsclient in OSX.
set emacsclient to "/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_9/emacsclient -n -c -a \"/Applications/Emacs.app/Contents/MacOS/Emacs\""
on open location input
do shell script emacsclient & "\"" & input & "\""
end open location
on open inputs
repeat with raw_input in inputs
set input to POSIX path of raw_input
do shell script emacsclient & "\"" & input & "\""
end repeat
end open
on run
do shell script emacsclient
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment