From 64e01ac324fb99b0b9be10e74f065fa09eee36c4 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Thu, 23 Apr 2009 15:57:16 -0700 Subject: [PATCH] fixed bug with exportation of ruby arrays --- litorgy/litorgy-script.el | 4 +++- rorg.org | 4 ++-- test-export.org | 6 ++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/litorgy/litorgy-script.el b/litorgy/litorgy-script.el index d97116af3..11dd80025 100644 --- a/litorgy/litorgy-script.el +++ b/litorgy/litorgy-script.el @@ -48,7 +48,7 @@ automatically generated wrapper for `litorgy-script-execute'.") def main %s end -puts main +puts main().inspect ") (defvar litorgy-script-python-wrapper-method @@ -89,7 +89,9 @@ executed through litorgy." (format "\t%s\n" line)) (butlast body-lines) "\n") (format "\treturn %s\n" (car (last body-lines))))))) + ;; (message (buffer-substring (point-min) (point-max))) ;; debug script (shell-command-on-region (point-min) (point-max) cmd nil 'replace) + ;; (message (buffer-string)) ;; debug results (litorgy-script-table-or-results (buffer-string)))))) (defun litorgy-script-var-to-ruby/python (var) diff --git a/rorg.org b/rorg.org index 43fd4f887..1c8926ee4 100644 --- a/rorg.org +++ b/rorg.org @@ -229,14 +229,14 @@ following message =no result returned by source block=. ** TODO ruby arrays not recognized as such -Something is wrong in [[file:litorgy/ligorgy-script.el]] related to the +Something is wrong in [[file:litorgy/litorgy-script.el]] related to the recognition of ruby arrays as such. #+begin_src ruby :results replace [1, 2, 3, 4] #+end_src -: 1 +| 1 | 2 | 3 | 4 | #+begin_src python :results replace [1, 2, 3, 4] diff --git a/test-export.org b/test-export.org index 01b596c4a..d8d74e52f 100644 --- a/test-export.org +++ b/test-export.org @@ -33,6 +33,12 @@ This is a source block, and lets see the results :the_results #+end_src +lets see the source, and results for a ruby array +#+begin_src ruby :results replace +[1, 2, 3, 4].map{ |n| n * 2 } +#+end_src + + ** emacs-lisp a table