emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-file using tramp + babel?


From: Rainer M Krug
Subject: Re: [O] org-file using tramp + babel?
Date: Fri, 15 Jan 2016 09:36:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

"Charles C. Berry" <address@hidden> writes:

> On Thu, 14 Jan 2016, John Kitchin wrote:
>
>> Hi, I opened an org file using tramp on a remote server. It opened fine,
>> and I had no trouble writing text and saving it. For fun I tried running
>> a src block (a shell block that just returned the hostname), and got
>> this error:
>>
>>> %s'...failed
>> tramp-file-name-handler: Couldn't write region to
>> `/scp:address@hidden:/var/folders/5q/lllv2yf95hg_n6h6kjttbmdw0000gn/T/ob-input-30024dza',
>> decode using `base64 -d -i >%s' failed
>>
>> Should this have worked? It looks like it tried to write a local path
>> from my Mac to the server, and that path doesn't exist there.
>
> This works for me from my mac on a remote Centos system.
>
> I think this tripped me up in the past, but my notes do not reveal the fix 
> I used.
>
> I think this is a temporary-file-directory issue, but nothing in my init 
> pertains to that variable or tramp.
>
> In my emacs-init.org, I do have
>
> #+BEGIN_SRC emacs-lisp
> (setq default-directory "/Users/cberry/")
> #+END_SRC

I tried this as I have the same error messages as the John and opened a
flie in tramp afterwards. (I did set the variable in a running emacs
session and did not restart).

>
> and I see a lot of references to this in tramp-compat.el. So, maybe 
> setting it is enough to get emacs and/or tramp to use my local client for 
> temp files.
>
> In *Messages* I see this after running the src block:
>
> Evaluate this shell code block on your system? (y or n) y
> executing Shell code block...
> Tramp: Encoding local file 
> `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fh0000gn/T/tramp.560h4h' using 
> `base64-encode-region'...done
> Tramp: Decoding remote file `/scp:<me at remote host>:/tmp/ob-input-560Uub' 
> using `base64 -d -i >%s'...done
> Tramp: Encoding local file 
> `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fh0000gn/T/tramp.5607Mu' using 
> `base64-encode-region'...done
> Tramp: Decoding remote file `/scp:<me at remote host>:/tmp/ob-error-560uCo' 
> using `base64 -d -i >%s'...done
> ...<and more cycles like that>

I get:

,----
| Tramp: Encoding local file 
`/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/tramp.81150IIU' using 
`base64-encode-region'...done
| Tramp: Decoding remote file `/scp:pogoplug:/tmp/sh-script-8115079N' using 
`base64 -d -i >%s'...done
| Tramp: Encoding local file 
`/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/tramp.81150VSa' using 
`base64-encode-region'...done
| Tramp: Decoding remote file `/scp:pogoplug:/tmp/sh-script-8115079N' using 
`base64 -d -i >%s'...done
| Tramp: Encoding local file 
`/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/tramp.81150vmm' using 
`base64-encode-region'...done
| Tramp: Decoding remote file `/scp:pogoplug:/tmp/ob-input-81150icg' using 
`base64 -d -i >%s'...done
| Tramp: Encoding local file 
`/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/tramp.81150J7y' using 
`base64-encode-region'...done
| Tramp: Decoding remote file `/scp:pogoplug:/tmp/ob-error-811508ws' using 
`base64 -d -i >%s'...done
| Tramp: Encoding local file 
`/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/tramp.811507EC' using 
`base64-encode-region'...done
| Tramp: Decoding remote file `/scp:pogoplug:/tmp/ob-input-81150icg' using 
`base64 -d -i >%s'...done
| Wrote /scp:pogoplug:/tmp/ob-input-81150icg
| Tramp: Inserting `/scp:pogoplug:/tmp/ob-error-811508ws'...
| Tramp: Encoding remote file `/scp:pogoplug:/tmp/ob-error-811508ws' with 
`base64 <%s'...done
| Tramp: Decoding local file 
`/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/tramp.81150IPI' with 
`base64-decode-region'...done
| Tramp: Inserting `/scp:pogoplug:/tmp/ob-error-811508ws'...done
| Babel evaluation exited with code 1
| Code block produced no output.
`----

So there is still a reference to an remote directory.

and I still get the error:

,----
| /bin/sh: 1: /scp:pogoplug:/tmp/sh-script-81150VZO: not found
`----


>
>
> and when I issue `C-h v temporary-file-directory RET' in the buffer of the 
> remote file,
> I get the same `/var/folders/...' which is what `echo $TMPDIR' shows locally.

Here I have:

,----
| Its value is "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/"
`----

Also on Mac, remote is Debian.

Cheers,

Rainer

>
> HTH,
>
> Chuck
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]