From e902f40842a20baa0c4a2ca462b83d9ce949a19f Mon Sep 17 00:00:00 2001 From: Felipe Lema <1232306+FelipeLema@users.noreply.github.com> Date: Fri, 21 Feb 2020 14:34:53 -0300 Subject: [PATCH 1/2] Squashed commit of the following: commit 6ea888f432b5eeb3559706e336a752791f48d7fb Author: Felipe Lema <1232306+FelipeLema@users.noreply.github.com> Date: Fri Feb 21 11:25:51 2020 -0300 fix evaluate python code in remote directory Evaluating an "AST python code" should be local to the process / directory. `file-local-name` will do just this (strip the tramp prefix in path) --- lisp/ob-python.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-python.el b/lisp/ob-python.el index dbcfac08d..85c9644c4 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -345,7 +345,8 @@ last statement in BODY, as elisp." "python-"))) (with-temp-file tmp-src-file (insert body)) (format org-babel-python--eval-ast - tmp-src-file)))) + (file-local-name + tmp-src-file))))) (org-babel-comint-with-output (session org-babel-python-eoe-indicator nil body) (let ((comint-process-echoes nil)) -- 2.16.4