Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; -*- 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
Add Comment
Please, Sign In to add comment