From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: org-file using tramp + babel? Date: Thu, 14 Jan 2016 19:33:41 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJv94-0002xl-0b for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 22:33:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJv8z-00043A-0H for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 22:33:49 -0500 Received: from iport-acv2-out.ucsd.edu ([132.239.0.174]:34665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJv8y-00042w-No for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 22:33:44 -0500 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: 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::/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