Created
May 4, 2010 06:16
-
-
Save VoQn/389026 to your computer and use it in GitHub Desktop.
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
;; -*- mode: emacs-lisp; coding: utf-8 -*- | |
;; set applescript to open and run Spde sketch | |
(defvar apple-script-file | |
"~/.emacs.d/etc/openAndRunSketch.applescript") | |
;; set application name of Spde | |
(defvar application-name "Spde") | |
;; run applescript | |
(defun run-apple-script () | |
(shell-command-to-string | |
(format "osascript %s %s %s" | |
apple-script-file | |
application-name | |
buffer-file-name))) | |
(add-hook | |
'after-save-hook | |
'(lambda () | |
(cond ((string-match "\.pde$" buffer-file-name) | |
(run-apple-script))))) | |
;; EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment