unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Matt McClure <matthewlmcclure@gmail.com>
To: 12340@debbugs.gnu.org
Subject: bug#12340: 24.2.50; python-shell-switch-to-shell in TRAMP buffer gives "No such file or directory: '/var/folders/vk/p95wm1qx0vdf0087p0z9qzc40000gn/T/py62333GTT'"
Date: Mon, 3 Sep 2012 19:34:09 -0400	[thread overview]
Message-ID: <CAJELnLE9ELLB7ENBVYpfDuD2oBW+9pgR3dGy62cQf0LOF96skg@mail.gmail.com> (raw)
In-Reply-To: <CAJELnLHESkg0pB_h0pR70JLzRcKVNHofOrO_dM_eaaigMT_U5w@mail.gmail.com>

Here's a patch that I think might resolve the issue. Only lightly tested.

--- python.el.orig	2012-09-03 19:30:56.000000000 -0400
+++ python.el	2012-09-03 19:31:56.000000000 -0400
@@ -1824,7 +1824,13 @@
         (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)


-- 
Matt McClure
http://www.matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure





  reply	other threads:[~2012-09-03 23:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 16:34 bug#12340: 24.2.50; python-shell-switch-to-shell in TRAMP buffer gives "No such file or directory: '/var/folders/vk/p95wm1qx0vdf0087p0z9qzc40000gn/T/py62333GTT'" Matt McClure
2012-09-03 23:34 ` Matt McClure [this message]
2012-09-04  1:00   ` Matt McClure
2012-09-04 13:51   ` Michael Albinus
2012-09-04 20:23     ` Matt McClure
2012-09-05 15:03       ` Michael Albinus
2012-09-05 19:05         ` Matt McClure
2012-09-06  4:15           ` Chong Yidong
2012-09-07  2:12             ` Matt McClure
2012-09-07  2:52         ` Matt McClure
2012-09-07 11:45           ` Michael Albinus
2012-09-07 14:36             ` Matt McClure
2012-09-07 14:56               ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJELnLE9ELLB7ENBVYpfDuD2oBW+9pgR3dGy62cQf0LOF96skg@mail.gmail.com \
    --to=matthewlmcclure@gmail.com \
    --cc=12340@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).