diff options
Diffstat (limited to 'lisp/org/ob-clojure.el')
| -rw-r--r-- | lisp/org/ob-clojure.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index bc2bbc0d095..25b39f7f733 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el | |||
| @@ -24,17 +24,17 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;;; support for evaluating clojure code, relies on slime for all eval | 27 | ;; Support for evaluating clojure code, relies on slime for all eval. |
| 28 | 28 | ||
| 29 | ;;; Requirements: | 29 | ;;; Requirements: |
| 30 | 30 | ||
| 31 | ;;; - clojure (at least 1.2.0) | 31 | ;; - clojure (at least 1.2.0) |
| 32 | ;;; - clojure-mode | 32 | ;; - clojure-mode |
| 33 | ;;; - slime | 33 | ;; - slime |
| 34 | 34 | ||
| 35 | ;;; By far, the best way to install these components is by following | 35 | ;; By far, the best way to install these components is by following |
| 36 | ;;; the directions as set out by Phil Hagelberg (Technomancy) on the | 36 | ;; the directions as set out by Phil Hagelberg (Technomancy) on the |
| 37 | ;;; web page: http://technomancy.us/126 | 37 | ;; web page: http://technomancy.us/126 |
| 38 | 38 | ||
| 39 | ;;; Code: | 39 | ;;; Code: |
| 40 | (require 'ob) | 40 | (require 'ob) |
| @@ -77,16 +77,16 @@ | |||
| 77 | (require 'slime) | 77 | (require 'slime) |
| 78 | (with-temp-buffer | 78 | (with-temp-buffer |
| 79 | (insert (org-babel-expand-body:clojure body params)) | 79 | (insert (org-babel-expand-body:clojure body params)) |
| 80 | ((lambda (result) | 80 | (let ((result |
| 81 | (let ((result-params (cdr (assoc :result-params params)))) | 81 | (slime-eval |
| 82 | (org-babel-result-cond result-params | 82 | `(swank:eval-and-grab-output |
| 83 | result | 83 | ,(buffer-substring-no-properties (point-min) (point-max))) |
| 84 | (condition-case nil (org-babel-script-escape result) | 84 | (cdr (assoc :package params))))) |
| 85 | (error result))))) | 85 | (let ((result-params (cdr (assoc :result-params params)))) |
| 86 | (slime-eval | 86 | (org-babel-result-cond result-params |
| 87 | `(swank:eval-and-grab-output | 87 | result |
| 88 | ,(buffer-substring-no-properties (point-min) (point-max))) | 88 | (condition-case nil (org-babel-script-escape result) |
| 89 | (cdr (assoc :package params)))))) | 89 | (error result))))))) |
| 90 | 90 | ||
| 91 | (provide 'ob-clojure) | 91 | (provide 'ob-clojure) |
| 92 | 92 | ||