0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-20 17:48:35 +00:00

[BUG FIX] DONE problem with newlines in output when :results value

This commit is contained in:
Eric Schulte 2009-08-14 15:33:49 -06:00
parent 4db86bd66f
commit d07c2f3b5c
2 changed files with 21 additions and 4 deletions

View file

@ -668,7 +668,8 @@ This is taken almost directly from `org-read-prop'."
(defun org-babel-number-p (string)
"Return t if STRING represents a number"
(if (string-match "^[[:digit:]]*\\.?[[:digit:]]*$" string)
(if (and (string-match "^[[:digit:]]*\\.?[[:digit:]]*$" string)
(= (match-end 0) (length string)))
(string-to-number string)))
(defun org-babel-import-elisp-from-file (file-name)

View file

@ -2819,7 +2819,7 @@ dot("$(2a,0)$",(2,0),N+E);
*** DONE sh
* Bugs [34/41]
* Bugs [35/41]
** TODO Python session evaluation bug
The following block evaluates correctly with :session none
(set :results to output), but fails with session-based evaluation
@ -2915,7 +2915,7 @@ I have this error showing up:
executing Ruby source code block
apply: Searching for program: no such file or directory, irb
** TODO problem with newlines in output when :results value
** DONE problem with newlines in output when :results value
#+begin_src python :results value
'\n'.join(map(str, range(4)))
@ -2923,7 +2923,9 @@ apply: Searching for program: no such file or directory, irb
#+resname:
: 0
: 1
: 2
: 3
Whereas I was hoping for
@ -2932,6 +2934,20 @@ Whereas I was hoping for
| 2 |
| 3 |
This is now working, it doesn't return as a table because the value
returned is technically a string. To return the table mentioned above
try something like the following.
#+begin_src python
[[0], [1], [2], [3]]
#+end_src
#+resname:
| 0 |
| 1 |
| 2 |
| 3 |
This is some sort of non-printing char / quoting issue I think. Note
that