aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorAugusto Stoffel2021-08-15 14:00:49 +0200
committerLars Ingebrigtsen2021-08-15 14:00:49 +0200
commit926eeb7dd4b35a311d51cb651cc0c64fa4a5ab2c (patch)
treeeeb18f5292473607cbb02ec88628b24b4cbf1ce4 /lisp/progmodes/python.el
parent42a98feb5b8ff2d60701da4462864699c434562c (diff)
downloademacs-926eeb7dd4b35a311d51cb651cc0c64fa4a5ab2c.tar.gz
emacs-926eeb7dd4b35a311d51cb651cc0c64fa4a5ab2c.zip
Allow evaluating Python code across machines
* python.el (python-shell-send-string): Ensure that the temporary file is created in the host running the Python process (bug#50057).
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 2557704e403..20299c20d28 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3085,7 +3085,8 @@ t when called interactively."
3085 (list (read-string "Python command: ") nil t)) 3085 (list (read-string "Python command: ") nil t))
3086 (let ((process (or process (python-shell-get-process-or-error msg)))) 3086 (let ((process (or process (python-shell-get-process-or-error msg))))
3087 (if (string-match ".\n+." string) ;Multiline. 3087 (if (string-match ".\n+." string) ;Multiline.
3088 (let* ((temp-file-name (python-shell--save-temp-file string)) 3088 (let* ((temp-file-name (with-current-buffer (process-buffer process)
3089 (python-shell--save-temp-file string)))
3089 (file-name (or (buffer-file-name) temp-file-name))) 3090 (file-name (or (buffer-file-name) temp-file-name)))
3090 (python-shell-send-file file-name process temp-file-name t)) 3091 (python-shell-send-file file-name process temp-file-name t))
3091 (comint-send-string process string) 3092 (comint-send-string process string)