Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allows using a Python shell from TRAMP buffers again.
  • Loading branch information
matthewlmcclure committed Sep 4, 2012
1 parent 5ee1861 commit 8afa8fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lisp/progmodes/python.el
Expand Up @@ -1824,7 +1824,13 @@ When MSG is non-nil messages the first line of STRING."
(lines (split-string string "\n" t)))
(and msg (message "Sent: %s..." (nth 0 lines)))
(if (> (length lines) 1)
(let* ((temp-file-name (make-temp-file "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"))
(temp-file-name (or (file-remote-p f 'localname) f))
(file-name (or (buffer-file-name) temp-file-name)))
(with-temp-file temp-file-name
(insert string)
Expand Down

0 comments on commit 8afa8fa

Please sign in to comment.