From cd080b025a47eb8cf89497294c62e6740f4094fb Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 23 Apr 2012 11:39:28 -0400 Subject: [PATCH] ensure newline precedes automatically-added returns for Python code blocks * lisp/ob-python.el (org-babel-execute:python): Ensure newline precedes automatically-added returns. --- lisp/ob-python.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-python.el b/lisp/ob-python.el index 0dc744aaa..348248f35 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -64,7 +64,7 @@ This function is called by `org-babel-execute-src-block'." (preamble (cdr (assoc :preamble params))) (full-body (org-babel-expand-body:generic - (concat body (if return-val (format "return %s" return-val) "")) + (concat body (if return-val (format "\nreturn %s" return-val) "")) params (org-babel-variable-assignments:python params))) (result (org-babel-python-evaluate session full-body result-type result-params preamble)))