forked from mirrors/org-mode
ob-python.el: Fix issue with sessions on remote machines
* lisp/ob-python.el (org-babel-python-evaluate-session): Process temporary file name with `org-babel-process-file-name' before inserting it into code Python code snippets. Before this change, the entire temporary filename was sent to the Python session for execution, causing a 'No such file' error when the filename had a Tramp format such as /ssh:user@server:/tmp/python-ABCDEF. TINYCHANGE
This commit is contained in:
parent
220f2b0d93
commit
312a646fb8
|
@ -335,7 +335,8 @@ last statement in BODY, as elisp."
|
||||||
"python-")))
|
"python-")))
|
||||||
(with-temp-file tmp-src-file (insert body))
|
(with-temp-file tmp-src-file (insert body))
|
||||||
(format org-babel-python--exec-tmpfile
|
(format org-babel-python--exec-tmpfile
|
||||||
tmp-src-file))
|
(org-babel-process-file-name
|
||||||
|
tmp-src-file 'noquote)))
|
||||||
body)))
|
body)))
|
||||||
(mapconcat
|
(mapconcat
|
||||||
#'org-trim
|
#'org-trim
|
||||||
|
@ -353,7 +354,8 @@ last statement in BODY, as elisp."
|
||||||
"python-")))
|
"python-")))
|
||||||
(with-temp-file tmp-src-file (insert body))
|
(with-temp-file tmp-src-file (insert body))
|
||||||
(format org-babel-python--eval-ast
|
(format org-babel-python--eval-ast
|
||||||
tmp-src-file))))
|
(org-babel-process-file-name
|
||||||
|
tmp-src-file 'noquote)))))
|
||||||
(org-babel-comint-with-output
|
(org-babel-comint-with-output
|
||||||
(session org-babel-python-eoe-indicator nil body)
|
(session org-babel-python-eoe-indicator nil body)
|
||||||
(let ((comint-process-echoes nil))
|
(let ((comint-process-echoes nil))
|
||||||
|
|
Loading…
Reference in New Issue