diff options
author | Caio Tiago Oliveira <asrail@gmail.com> | 2012-10-15 15:52:50 -0300 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-10-25 10:56:24 +0200 |
commit | de7766f4b0f04d74a69e461b5aad4e07e91a20bc (patch) | |
tree | 2341356ea6ae5960b02660eab18835560c861a65 | |
parent | aba9e2b94dadcd655e462252a5c79edf61bfa65c (diff) | |
download | org-mode-de7766f4b0f04d74a69e461b5aad4e07e91a20bc.tar.gz |
Babel: add results value support to Scala
* lisp/ob-scala.el (org-babel-scala-wrapper-method): Use a Scala
block enclosing the submitted code.
The string representing an well formed block was not an Scala code. I
put the string from the user into an block, surrounded by an call to
replace the default output stream.
TINYCHANGE
-rw-r--r-- | lisp/ob-scala.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ob-scala.el b/lisp/ob-scala.el index bd855a8..ea3c3f2 100644 --- a/lisp/ob-scala.el +++ b/lisp/ob-scala.el @@ -72,9 +72,17 @@ Emacs-lisp table, otherwise return the results as a string." (defvar org-babel-scala-wrapper-method - "( + +"var str_result :String = null; + +Console.withOut(new java.io.OutputStream() {def write(b: Int){ +}}) { + str_result = { %s -) asString print + }.toString +} + +print(str_result) ") |