Subject: Re: 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'"

From: Michael Albinus <[email-masked]>
Date: Tue, 04 Sep 2012 15:51:05 +0200

Matt McClure <[email-masked]> writes:

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

It looks good, you have derived it from the patch we have created some
weeks ago :-)

However:

> +        (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)))

Shouldn't this be

                 (file-name (or (buffer-file-name) f)))

Best regards, Michael.