emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
	John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: org-file using tramp + babel?
Date: Fri, 15 Jan 2016 09:36:55 +0100	[thread overview]
Message-ID: <m21t9jme6w.fsf@krugs.de> (raw)
In-Reply-To: <alpine.OSX.2.20.1601141826170.907@charles-berrys-macbook.local> (Charles C. Berry's message of "Thu, 14 Jan 2016 19:33:41 -0800")

[-- Attachment #1: Type: text/plain, Size: 4410 bytes --]

"Charles C. Berry" <ccberry@ucsd.edu> 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:jkitchin@gilgamesh.cheme.cmu.edu:/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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

  reply	other threads:[~2016-01-15  8:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  1:52 org-file using tramp + babel? John Kitchin
2016-01-15  3:33 ` Charles C. Berry
2016-01-15  8:36   ` Rainer M Krug [this message]
2016-01-16  0:15   ` John Kitchin
2016-01-15  6:41 ` Martin Yrjölä
2016-01-15  8:37   ` Rainer M Krug

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.orgmode.org/

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

  git send-email \
    --in-reply-to=m21t9jme6w.fsf@krugs.de \
    --to=rainer@krugs.de \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /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/org-mode.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).