Skip to content

Instantly share code, notes, and snippets.

@hara-y-u
Created July 24, 2011 16:07
Show Gist options
  • Save hara-y-u/1102770 to your computer and use it in GitHub Desktop.
Save hara-y-u/1102770 to your computer and use it in GitHub Desktop.
run coffee script file bound to current buffer
(defun coffee-run-file-saving ()
"Run coffee script in current buffer in new window"
(interactive)
(if buffer-file-name
(progn
(save-buffer)
(set-buffer
(apply 'make-comint "CoffeeRun"
coffee-command nil (cons buffer-file-name '())))
(display-buffer "*CoffeeRun*")
(read-string "press some key to close..")
(kill-buffer "*CoffeeRun*"))
(message "Please save buffer to file first.")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment