From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Best Subject: Re: remote execution in heterogeneous environment Date: Thu, 29 Nov 2012 16:07:30 -0600 Message-ID: References: <9582.1354209403@alphaville> <11047.1354217134@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeCGb-0000AU-Gt for emacs-orgmode@gnu.org; Thu, 29 Nov 2012 17:07:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeCGa-0004yz-D1 for emacs-orgmode@gnu.org; Thu, 29 Nov 2012 17:07:33 -0500 Received: from mailhost.anl.gov ([130.202.113.50]:36564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeCGa-0004ym-8k for emacs-orgmode@gnu.org; Thu, 29 Nov 2012 17:07:32 -0500 Received: from mailhost.anl.gov (mailhost.anl.gov [130.202.113.50]) by localhost.anl.gov (Postfix) with ESMTP id 81C2953 for ; Thu, 29 Nov 2012 16:07:31 -0600 (CST) Received: from zimbra.anl.gov (zimbra.anl.gov [130.202.101.12]) by mailhost.anl.gov (Postfix) with ESMTP id 7502B98 for ; Thu, 29 Nov 2012 16:07:31 -0600 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.anl.gov (Postfix) with ESMTP id 60C1E13C23 for ; Thu, 29 Nov 2012 16:07:31 -0600 (CST) Received: from zimbra.anl.gov ([127.0.0.1]) by localhost (zimbra.anl.gov [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CggO+-tfMuKn for ; Thu, 29 Nov 2012 16:07:31 -0600 (CST) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by zimbra.anl.gov (Postfix) with ESMTPSA id 2B6F313C09 for ; Thu, 29 Nov 2012 16:07:31 -0600 (CST) Received: by mail-vc0-f169.google.com with SMTP id gb30so10331270vcb.0 for ; Thu, 29 Nov 2012 14:07:30 -0800 (PST) In-Reply-To: <11047.1354217134@alphaville> 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: nicholas.dokos@hp.com, emacs-orgmode@gnu.org On Thu, Nov 29, 2012 at 1:25 PM, Nick Dokos wrote: > >> But your earlier mail says that it is trying to create the temp file on the remote >> >> ,---- >> | > Tramp: Decoding region into remote file >> | > /ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wm0000gn/T/sh-510999vN...done >> | > byte-code: Couldn't write region to >> | > `/ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wm0000gn/T/sh-510999vN' >> `---- >> >> Not sure what causes tramp to use /var/folders/2y for remote temp files >> but that seems to be the main problem here. >> > > If you evaluate > > (tramp-compat-temporary-file-directory) > > on your local system, what do you get? > > tramp may be assuming that whatever temp directory you are using > on your local system should work on the remote as well, an > assumption that's not true in your case. You may have to provide > your own function to get around this - or use /tmp just like the > rest of the world. > It's exactly as you suspected, Nick. That crazy /var/folders/... value was apparently hard-coded in the value of temporary-file-directory out of the box. That must be something that happens in Macports. When I changed it to "/tmp" things appear to work better: #+BEGIN_SRC sh :dir /midway:~ echo "Executed by `whoami` on `hostname` in `pwd`" #+END_SRC #+RESULTS: : Executed by nbest on lep in /Users/nbest The temp file problem was preventing any results from appearing, but now we see that the code is being executed locally, as suspected. There is a work-around for this, however: M-x ssh. #+BEGIN_SRC sh :session *ssh-midway* echo "Executed by `whoami` on `hostname` in `pwd`" #+END_SRC #+RESULTS: : Executed by nbest on midway-login1 in /pwd/from/that/session This opens up some possibilities but probably does not address the shortcomings detailed in the thread that Nick points to. The elisp hacking going on there is over my head so I will play with this some more and watch for updates.