Skip to content

Instantly share code, notes, and snippets.

@VoQn
Created May 4, 2010 06:16
Show Gist options
  • Save VoQn/389026 to your computer and use it in GitHub Desktop.
Save VoQn/389026 to your computer and use it in GitHub Desktop.
;; -*- 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