From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Albinus Subject: Re: remote execution in heterogeneous environment Date: Sat, 01 Dec 2012 10:49:06 +0100 Message-ID: <87wqx22jcd.fsf@gmx.de> References: <87mwxz7d8s.fsf@gmx.de> <877gp2521z.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TejhE-0000U1-Nw for emacs-orgmode@gnu.org; Sat, 01 Dec 2012 04:49:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TejhD-00084q-H7 for emacs-orgmode@gnu.org; Sat, 01 Dec 2012 04:49:16 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:49044) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TejhD-000821-79 for emacs-orgmode@gnu.org; Sat, 01 Dec 2012 04:49:15 -0500 In-Reply-To: (Neil Best's message of "Fri, 30 Nov 2012 14:13:01 -0600") 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: Neil Best Cc: emacs-orgmode@gnu.org Neil Best writes: > I had just recently upgraded Emacs through Macports but had not since > restarted it, that's all. No such luck on the Tramp upgrade. I will > just wait for the next release to propagate through Macports unless > some intolerable behavior crops up. I do have a shiny new version of > Org to play with thanks to ELPA. :) There are still several problems, even with Tramp 2.2.6. I use Org 20121126 from ELPA. 1. test ======= My local and remote hosts use "/tmp", both run Linux. So I have applied prior to the test --8<---------------cut here---------------start------------->8--- (setq temporary-file-directory "~/tmp/") --8<---------------cut here---------------end--------------->8--- This directory is known to exist locally, but not remotely. When I eval the source code block, I don't run into this infloop as you have seen (this is fixed with Tramp 2.2.6, indeed). But there is another error --8<---------------cut here---------------start------------->8--- Tramp: Decoding region into remote file /scpc:ford:/home/albinus/tmp/sh-205735cU...done cond: Couldn't write region to `/scpc:ford:/home/albinus/tmp/sh-205735cU', decode using `base64 -d -i >%s' failed --8<---------------cut here---------------end--------------->8--- Somewhere in the code, the remote temporary directory is created based on `temporary-file-directory', which is wrong. I believe this is in Org's code, must be debugged further. 2. test ======= I keep `temporary-file-directory' as "/tmp". The source code block evaluates fine, but the result is: --8<---------------cut here---------------start------------->8--- #+BEGIN_SRC sh :dir /ford:~ echo "Executed by `whoami` on `hostname` in `pwd`" #+END_SRC #+RESULTS: : Executed by albinus on detlef in /home/albinus --8<---------------cut here---------------end--------------->8--- Obviously, the code is executed on the local host. As far as I could debug it, this is because `org-babel-shell-command-on-region' calls `call-process-region', which is not aware of remote execution. >> PS: it's on my wishlist for a long time to learn org-mode. Maybe I have >> a chance now. > > You won't regret it. Have fun. What's your use case? Accessing lists on different devices, under Linux, Android etc. > How did you happen to get on this thread? Was there a cross-post that > I missed? Nothing special. I have looked into the ML archive for some other reason, and I have seen this thread by accident. > Thanks for pitching in, everyone. Best regards, Michael.