org-mode/etc
Jack Kamm cc89d5523f ob-python: Fix several issues with :session :results value
* lisp/ob-python.el (org-babel-python-evaluate-session): Fix a few
related issues with :session :results value blocks, including broken
if-else statements, indented blocks with blank lines, and returning
the wrong value when underscore has been used.
(org-babel-python--eval-ast): New constant variable, a string
consisting of Python code to execute a source block using ast.

Previously, python blocks with parameters ":session :results value"
were entered line-by-line into the Python session, which could cause
issues around indentation and new lines.  Now, such python blocks are
written to temp files, then the built-in ast python module is used to
parse and execute them, and to extract the last line separately to
return as a result.  Introduces a change in behavior, requiring that
the last line must be a top-level expression statement if its result
is to be saved (otherwise, the result is None).
2020-02-03 21:17:38 -08:00
..
schema Clean up spacing to pass Emacs's pre-commit check 2017-06-22 13:31:04 -04:00
styles Update copyright year to 2020 2020-01-01 13:38:46 -05:00
Makefile move schema files to etc/ and modify makefile to install them into $(datadir) 2012-04-20 21:04:12 +02:00
ORG-NEWS ob-python: Fix several issues with :session :results value 2020-02-03 21:17:38 -08:00