Hi Michael,

The patch seems to be working, the only thing I noticed is having
http://www.emacswiki.org/emacs/setup-cygwin.el loaded together with the
patched ob-core.el makes tramp prepend "/cygwin" to /tmp/. When I disabled
(require 'setup-cygwin) the patch works as expected. Outside of org/babel
setup-cygwin has no effect on Tramp.

Thanks,
Alex


On Tue, Sep 24, 2013 at 1:40 PM, Michael Albinus <michael.albi...@gmx.de>wrote:

> Alexander Vorobiev <alexander.vorob...@gmail.com> writes:
>
> > Hi Michael,
>
> Hi Alex,
>
> > Here it is.
>
> Thanks. I believe, the following patch shall cure it:
>
> --8<---------------cut here---------------start------------->8---
> --- a/lisp/ob-core.el
> +++ b/lisp/ob-core.el
> @@ -2735,8 +2735,12 @@
>  value of `temporary-file-directory' temporarily set to the value
>  of `org-babel-temporary-directory'."
>    (if (file-remote-p default-directory)
>        (let ((prefix
> +            ;; We cannot use `temporary-file-directory' as local part
> +            ;; on the remote host, because it might be another OS
> +            ;; there.  So we assume "/tmp", which ought to exist on
> +            ;; relevant architectures.
>               (concat (file-remote-p default-directory)
> -                     (expand-file-name prefix temporary-file-directory))))
> +                     (expand-file-name prefix "/tmp/"))))
>          (make-temp-file prefix nil suffix))
>      (let ((temporary-file-directory
>            (or (and (boundp 'org-babel-temporary-directory)
> --8<---------------cut here---------------end--------------->8---
>
> Could you, please, test?
>
> > Thanks,
> > Alex
>
> Best regards, Michael.
>

Reply via email to