Commit eed0bb91 authored by Michael Albinus's avatar Michael Albinus
Browse files

* progmodes/python.el (python-send-region): Ensure, that the

temporary file is created also in the remote case.
parent b7bb5838
......@@ -8,6 +8,9 @@
* files.el (enable-remote-dir-locals): New option.
(hack-dir-local-variables): Use it. (Bug#1933, Bug#6731)
 
* progmodes/python.el (python-send-region): Ensure, that the
temporary file is created also in the remote case.
2012-06-06 Glenn Morris <rgm@gnu.org>
 
* vc/vc-rcs.el (vc-rcs-rcs2log-program): New.
......
......@@ -1601,13 +1601,18 @@ behavior, change `python-remove-cwd-from-path' to nil."
;; Fixme: Write a `coding' header to the temp file if the region is
;; non-ASCII.
(interactive "r")
(let* ((f (make-temp-file "py" nil ".py"))
(let* ((temporary-file-directory
(if (file-remote-p default-directory)
(concat (file-remote-p default-directory) "/tmp")
temporary-file-directory))
(f (make-temp-file "py" nil ".py"))
(f-local (or (file-remote-p f 'localname) f))
(command
;; IPython puts the FakeModule module into __main__ so
;; emacs.eexecfile becomes useless.
(if (string-match "^ipython" python-command)
(format "execfile %S" f)
(format "emacs.eexecfile(%S)" f)))
(format "execfile %S" f-local)
(format "emacs.eexecfile(%S)" f-local)))
(orig-start (copy-marker start)))
(when (save-excursion
(goto-char start)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment