* org-file using tramp + babel?
@ 2016-01-15 1:52 John Kitchin
2016-01-15 3:33 ` Charles C. Berry
2016-01-15 6:41 ` Martin Yrjölä
0 siblings, 2 replies; 6+ messages in thread
From: John Kitchin @ 2016-01-15 1:52 UTC (permalink / raw)
To: emacs-orgmode
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.
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-file using tramp + babel?
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
2016-01-16 0:15 ` John Kitchin
2016-01-15 6:41 ` Martin Yrjölä
1 sibling, 2 replies; 6+ messages in thread
From: Charles C. Berry @ 2016-01-15 3:33 UTC (permalink / raw)
To: John Kitchin; +Cc: emacs-orgmode
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
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_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>
--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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-file using tramp + babel?
2016-01-15 3:33 ` Charles C. Berry
@ 2016-01-15 8:36 ` Rainer M Krug
2016-01-16 0:15 ` John Kitchin
1 sibling, 0 replies; 6+ messages in thread
From: Rainer M Krug @ 2016-01-15 8:36 UTC (permalink / raw)
To: Charles C. Berry; +Cc: emacs-orgmode, John Kitchin
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-file using tramp + babel?
2016-01-15 3:33 ` Charles C. Berry
2016-01-15 8:36 ` Rainer M Krug
@ 2016-01-16 0:15 ` John Kitchin
1 sibling, 0 replies; 6+ messages in thread
From: John Kitchin @ 2016-01-16 0:15 UTC (permalink / raw)
To: Charles C. Berry; +Cc: emacs-orgmode
____
( (
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: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
>
> 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_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>
> --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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-file using tramp + babel?
2016-01-15 1:52 org-file using tramp + babel? John Kitchin
2016-01-15 3:33 ` Charles C. Berry
@ 2016-01-15 6:41 ` Martin Yrjölä
2016-01-15 8:37 ` Rainer M Krug
1 sibling, 1 reply; 6+ messages in thread
From: Martin Yrjölä @ 2016-01-15 6:41 UTC (permalink / raw)
To: John Kitchin; +Cc: emacs-orgmode
Hi John,
John Kitchin <jkitchin@andrew.cmu.edu> 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: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.
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-file using tramp + babel?
2016-01-15 6:41 ` Martin Yrjölä
@ 2016-01-15 8:37 ` Rainer M Krug
0 siblings, 0 replies; 6+ messages in thread
From: Rainer M Krug @ 2016-01-15 8:37 UTC (permalink / raw)
To: Martin Yrjölä; +Cc: emacs-orgmode, John Kitchin
[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]
Martin Yrjölä <martin.yrjola@gmail.com> writes:
> Hi John,
>
> John Kitchin <jkitchin@andrew.cmu.edu> 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: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.
>>
>> 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: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-16 0:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-01-16 0:15 ` John Kitchin
2016-01-15 6:41 ` Martin Yrjölä
2016-01-15 8:37 ` Rainer M Krug
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).