* [PATCH] Babel: add results value support to Scala
@ 2012-10-15 19:39 Asrail
2012-10-17 13:16 ` Asrail
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Asrail @ 2012-10-15 19:39 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
* lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an 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.
[-- Attachment #2: 0001-Babel-add-results-value-support-to-Scala.patch --]
[-- Type: application/octet-stream, Size: 1058 bytes --]
From 0d7b1b3e7e5d63a77a1fe47cee80fd7f7bcb4cce Mon Sep 17 00:00:00 2001
From: Caio Tiago Oliveira <asrail@gmail.com>
Date: Mon, 15 Oct 2012 15:52:50 -0300
Subject: [PATCH] Babel: add results value support to Scala
* lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an 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
---
lisp/ob-scala.el | 12 ++++++++++--
1 file 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)
")
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Babel: add results value support to Scala
2012-10-15 19:39 [PATCH] Babel: add results value support to Scala Asrail
@ 2012-10-17 13:16 ` Asrail
2012-10-17 15:08 ` Eric Schulte
2012-10-24 13:09 ` Bastien
2 siblings, 0 replies; 6+ messages in thread
From: Asrail @ 2012-10-17 13:16 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
Hi,
Could someone please review this patch?
On Oct 15, 2012 4:39 PM, "Asrail" <asrail@gmail.com> wrote:
> * lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an 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.
>
[-- Attachment #2: Type: text/html, Size: 658 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Babel: add results value support to Scala
2012-10-15 19:39 [PATCH] Babel: add results value support to Scala Asrail
2012-10-17 13:16 ` Asrail
@ 2012-10-17 15:08 ` Eric Schulte
2012-10-24 13:09 ` Bastien
2 siblings, 0 replies; 6+ messages in thread
From: Eric Schulte @ 2012-10-17 15:08 UTC (permalink / raw)
To: Asrail; +Cc: emacs-orgmode
Asrail <asrail@gmail.com> writes:
> * lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an 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.
>
Hi Asrail,
Perhaps you can contact the author of ob-scala (Andrzej Lichnerowicz)
directly if he is not reading the mailing list every day.
Best,
--
Eric Schulte
http://cs.unm.edu/~eschulte
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Babel: add results value support to Scala
2012-10-15 19:39 [PATCH] Babel: add results value support to Scala Asrail
2012-10-17 13:16 ` Asrail
2012-10-17 15:08 ` Eric Schulte
@ 2012-10-24 13:09 ` Bastien
2012-10-25 8:24 ` Andrzej Lichnerowicz
2 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2012-10-24 13:09 UTC (permalink / raw)
To: Andrzej Lichnerowicz; +Cc: emacs-orgmode, Asrail
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
Hi Andrzej,
Asrail posted this patch against ob-scala.el a while ago.
Can you confirm it is okay to apply it? I'm reattaching
the patch in case you are not reading the Orgmode mailing
list anymore.
Thanks in advance!
Asrail <asrail@gmail.com> writes:
> * lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an scala
> block enclosing the submitted code
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Babel-add-results-value-support-to-Scala.patch --]
[-- Type: text/x-patch, Size: 1058 bytes --]
From 0d7b1b3e7e5d63a77a1fe47cee80fd7f7bcb4cce Mon Sep 17 00:00:00 2001
From: Caio Tiago Oliveira <asrail@gmail.com>
Date: Mon, 15 Oct 2012 15:52:50 -0300
Subject: [PATCH] Babel: add results value support to Scala
* lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an 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
---
lisp/ob-scala.el | 12 ++++++++++--
1 file 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)
")
--
1.7.10.4
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-25 8:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 19:39 [PATCH] Babel: add results value support to Scala Asrail
2012-10-17 13:16 ` Asrail
2012-10-17 15:08 ` Eric Schulte
2012-10-24 13:09 ` Bastien
2012-10-25 8:24 ` Andrzej Lichnerowicz
2012-10-25 8:57 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).