babel: clojure: use shell-command-on-region

This commit is contained in:
Dan Davison 2010-03-03 21:59:32 +00:00
parent a8c1a49b77
commit 54c7b04734

View file

@ -230,13 +230,11 @@ or nil if \"none\" is specified"
'replace) 'replace)
(buffer-string))) (buffer-string)))
(value (value
(let ((tmp-src-file (make-temp-file "clojure_babel_input_")) (let ((tmp-results-file (make-temp-file "clojure_babel_results_")))
(tmp-results-file (make-temp-file "clojure_babel_results_"))) (with-temp-buffer
(with-temp-file tmp-src-file (insert (format org-babel-clojure-wrapper-method body tmp-results-file tmp-results-file))
(insert (format org-babel-clojure-wrapper-method body tmp-results-file tmp-results-file))) (shell-command-on-region (point-min) (point-max)
(shell-command (mapconcat #'identity (org-babel-clojure-babel-clojure-cmd) " ")))
(format "%s %s" (mapconcat #'identity (org-babel-clojure-babel-clojure-cmd) " ")
tmp-src-file))
(org-babel-clojure-table-or-string (org-babel-clojure-table-or-string
(with-temp-buffer (insert-file-contents tmp-results-file) (buffer-string)))))))) (with-temp-buffer (insert-file-contents tmp-results-file) (buffer-string))))))))