From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: org-file using tramp + babel? Date: Fri, 15 Jan 2016 19:15:23 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKEWg-0005zi-E0 for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 19:15:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKEWc-000554-Ba for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 19:15:30 -0500 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:34719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKEWc-000550-52 for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 19:15:26 -0500 Received: by mail-qg0-x230.google.com with SMTP id 6so441772704qgy.1 for ; Fri, 15 Jan 2016 16:15:26 -0800 (PST) In-reply-to: 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 ____ ( ( 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::/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::/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