Re: [O] org-file using tramp + babel?
( ( Wow... Mind---( ( blown... (___( I just did this (setq temporary-file-directory "/tmp") opened a file using tramp on a remote server, and ran code on the server, with the output showing in my local emacs from the remote server!!! Simple stuff works. It seems to run shell and python fine, although it doesn't load my bashrc file, so some things don't seem to work right that require that. Still, pretty awesome it worked at all! Thanks for the tip about the temp directory! 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:jkitc...@gilgamesh.cheme.cmu.edu:/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/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 > > 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: > > --8<---cut here---start->8--- > Evaluate this shell code block on your system? (y or n) y > executing Shell code block... > Tramp: Encoding local file > `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/tramp.560h4h' using > `base64-encode-region'...done > Tramp: Decoding remote file `/scp::/tmp/ob-input-560Uub' > using `base64 -d -i >%s'...done > Tramp: Encoding local file > `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/tramp.5607Mu' using > `base64-encode-region'...done > Tramp: Decoding remote file `/scp::/tmp/ob-error-560uCo' > using `base64 -d -i >%s'...done > ... > --8<---cut here---end--->8--- > > > 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. > > HTH, > > Chuck -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] org-file using tramp + babel?
Martin Yrjölä writes: > Hi John, > > John Kitchin writes: > >> 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:jkitc...@gilgamesh.cheme.cmu.edu:/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/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. >> >> Some details (not sure they are relevant): >> I am running Emacs on a Mac, and opened a file on a remote Centos5 >> server. > > Howard Abrams has written an extensive answer to this problem in his > blog [1]. The problem is that the Mac uses a different folder for > temporary files. Howard also proposes a fix and refers to a mailing list > message regarding the bug [2]. I think it would be nice if one could find a fix for this in org. > > Hope this helps, > Martin > > [1] http://www.howardism.org/Technical/Emacs/literate-devops.html#fn.2 > [2] http://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg00992.html > > -- Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 signature.asc Description: PGP signature
Re: [O] org-file using tramp + babel?
"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:jkitc...@gilgamesh.cheme.cmu.edu:/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/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_fhgn/T/tramp.560h4h' using > `base64-encode-region'...done > Tramp: Decoding remote file `/scp::/tmp/ob-input-560Uub' > using `base64 -d -i >%s'...done > Tramp: Encoding local file > `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/tramp.5607Mu' using > `base64-encode-region'...done > Tramp: Decoding remote file `/scp::/tmp/ob-error-560uCo' > using `base64 -d -i >%s'...done > ... I get: , | Tramp: Encoding local file `/var/folders/50/wcr5bjwn75q595n6x82gxj28gn/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/wcr5bjwn75q595n6x82gxj28gn/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/wcr5bjwn75q595n6x82gxj28gn/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/wcr5bjwn75q595n6x82gxj28gn/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/wcr5bjwn75q595n6x82gxj28gn/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/wcr5bjwn75q595n6x82gxj28gn/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/wcr5bjwn75q595n6x82gxj28gn/T/" ` Also on Mac, remote is Debian. Cheers, Rainer > > HTH, > > Chuck > > -- Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 signature.asc Description: PGP signature
Re: [O] org-file using tramp + babel?
Hi John, John Kitchin writes: > 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:jkitc...@gilgamesh.cheme.cmu.edu:/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/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. > > Some details (not sure they are relevant): > I am running Emacs on a Mac, and opened a file on a remote Centos5 > server. Howard Abrams has written an extensive answer to this problem in his blog [1]. The problem is that the Mac uses a different folder for temporary files. Howard also proposes a fix and refers to a mailing list message regarding the bug [2]. Hope this helps, Martin [1] http://www.howardism.org/Technical/Emacs/literate-devops.html#fn.2 [2] http://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg00992.html
Re: [O] org-file using tramp + babel?
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:jkitc...@gilgamesh.cheme.cmu.edu:/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/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 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: --8<---cut here---start->8--- Evaluate this shell code block on your system? (y or n) y executing Shell code block... Tramp: Encoding local file `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/tramp.560h4h' using `base64-encode-region'...done Tramp: Decoding remote file `/scp::/tmp/ob-input-560Uub' using `base64 -d -i >%s'...done Tramp: Encoding local file `/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/tramp.5607Mu' using `base64-encode-region'...done Tramp: Decoding remote file `/scp::/tmp/ob-error-560uCo' using `base64 -d -i >%s'...done ... --8<---cut here---end--->8--- 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. HTH, Chuck
[O] org-file using tramp + babel?
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:jkitc...@gilgamesh.cheme.cmu.edu:/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/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. Some details (not sure they are relevant): I am running Emacs on a Mac, and opened a file on a remote Centos5 server. Thanks! -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu