forked from mirrors/org-mode
Simplifying python results code.
Move org-babel-python-table-or-results into the :results value branch of org-babel-python-evaluate, and get rid of default case (result-type must always be either output or value). I wonder if the org-babel-trim s are necessary: they don't seem to be needed in the code for ruby.
This commit is contained in:
parent
f4eaee5b46
commit
93a964d236
|
@ -168,10 +168,9 @@ last statement in BODY."
|
|||
(cdr (member org-babel-python-eoe-indicator
|
||||
(reverse (mapcar #'org-babel-trim raw)))))))
|
||||
(setq results (mapcar #'org-babel-python-read-string results))
|
||||
(org-babel-trim (case result-type
|
||||
(output (mapconcat #'identity (reverse (cdr results)) "\n"))
|
||||
(value (car results))
|
||||
(t (reverse results))))))))
|
||||
(case result-type
|
||||
(output (org-babel-trim (mapconcat #'identity (reverse (cdr results)) "\n")))
|
||||
(value (org-babel-python-table-or-results (org-babel-trim (car results)))))))))
|
||||
|
||||
(defun org-babel-python-read-string (string)
|
||||
"Strip 's from around ruby string"
|
||||
|
|
Loading…
Reference in New Issue