Created
March 14, 2014 02:09
-
-
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
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 | |
# 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