Skip to content

Instantly share code, notes, and snippets.

@t-nissie
Created March 14, 2014 02:09
Show Gist options
  • Save t-nissie/9540948 to your computer and use it in GitHub Desktop.
Save t-nissie/9540948 to your computer and use it in GitHub Desktop.
Mac OS Xで、SafariでプレビューしながらEmacsでSVGを出力するGNUPLOT scriptを編集⇄実行するのに便利なシェルスクリプトgnuplot-safari-emacs.sh
#!/bin/sh
# gnuplot-safari-emacs.sh
# Edit and execute a GNUPLOT script on Emacs
# while previewing an SVG file with Safari on Mac OS X.
# Author: Takeshi NISHIMATSU
# Gist: https://gist.github.com/t-nissie/
# Usage:
# (1) Put this gnuplot-safari-emacs.sh in /usr/local/bin/.
# (2) Add following 3 lines at the end of your GNUPLOT script foo.gp.
# #Local variables:
# # compile-command: "gnuplot-safari-emacs.sh foo.gp"
# #End:
# (3) M-x compile
##
gnuplot $* && /usr/bin/osascript -e 'tell application "Safari"
do JavaScript "location.reload(true);" in document 1
end tell
tell application "Emacs.app" to activate'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment