From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: org-file using tramp + babel? Date: Fri, 15 Jan 2016 09:36:55 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJzsZ-0004HB-Vd for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 03:37:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJzsW-0001U8-OP for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 03:37:07 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:38342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJzsW-0001U2-FN for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 03:37:04 -0500 Received: by mail-wm0-f46.google.com with SMTP id b14so13239120wmb.1 for ; Fri, 15 Jan 2016 00:37:04 -0800 (PST) In-Reply-To: (Charles C. Berry's message of "Thu, 14 Jan 2016 19:33:41 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Charles C. Berry" Cc: emacs-orgmode , John Kitchin --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable "Charles C. Berry" 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_n6h6k= jttbmdw0000gn/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 fi= x=20 > I used. > > I think this is a temporary-file-directory issue, but nothing in my init= =20 > 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=20 > setting it is enough to get emacs and/or tramp to use my local client for= =20 > 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_fh0000g= n/T/tramp.560h4h' using `base64-encode-region'...done > Tramp: Decoding remote file `/scp::/tmp/ob-input-560Uu= b' using `base64 -d -i >%s'...done > Tramp: Encoding local file `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fh0000g= n/T/tramp.5607Mu' using `base64-encode-region'...done > Tramp: Decoding remote file `/scp::/tmp/ob-error-560uC= o' using `base64 -d -i >%s'...done > ... I get: ,---- | Tramp: Encoding local file `/var/folders/50/wcr5bjwn75q595n6x82gxj280000g= n/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/wcr5bjwn75q595n6x82gxj280000g= n/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/wcr5bjwn75q595n6x82gxj280000g= n/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/wcr5bjwn75q595n6x82gxj280000g= n/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/wcr5bjwn75q595n6x82gxj280000g= n/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/wcr5bjwn75q595n6x82gxj280000g= n/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 th= e remote file, > I get the same `/var/folders/...' which is what `echo $TMPDIR' shows loca= lly. Here I have: ,---- | Its value is "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/" `---- Also on Mac, remote is Debian. Cheers, Rainer > > HTH, > > Chuck > > =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWmK+rAAoJENvXNx4PUvmCraEH/jpeG+EeNkZAueOyOcnrNyHv 9xNpHYm1RlNmuz/PcBbTwgW6JkwFTWFop6sH899eGzsS7eM+wIDNYl+zratZae26 uLXe7DkX6zWumMpiwtXZ5y8s9loD028ojdYoIOSm7/ufasmoLCXA5TsA1dR4sKQc /YgZ+44Vwrd94P1cekIoPDLZxk/1Sq8hdvnHIYbrhMRLEJXuZWCpxmrT1/xaDKZv 3RyWRcILP6kdlFMc/h6n8SE1IaVrYSCE40czYBv7RknpJMpSed0YK/Zqh+j8yiEe CzZNP8c3Z1IegoOFfyIzGbb8NACtBQpqbEYS8RfLafqEI4CrD3ZwgsM6y7i/J20= =NNl1 -----END PGP SIGNATURE----- --=-=-=--