From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: Executing org shell blocks on remote machine over ssh Date: Tue, 18 Nov 2014 22:01:16 +0000 Message-ID: References: <874mtxx18q.fsf@duke.edu> <871tp01b19.fsf@uw.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xqqq5-00084P-8O for emacs-orgmode@gnu.org; Tue, 18 Nov 2014 17:01:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xqqpz-0007pk-Qx for emacs-orgmode@gnu.org; Tue, 18 Nov 2014 17:01:33 -0500 Received: from plane.gmane.org ([80.91.229.3]:53214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xqqpy-0007pY-9U for emacs-orgmode@gnu.org; Tue, 18 Nov 2014 17:01:27 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xqqpw-0005wh-FP for emacs-orgmode@gnu.org; Tue, 18 Nov 2014 23:01:24 +0100 Received: from cpc33-cmbg15-2-0-cust4.5-4.cable.virginm.net ([81.102.136.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Nov 2014 23:01:24 +0100 Received: from andreas.leha by cpc33-cmbg15-2-0-cust4.5-4.cable.virginm.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Nov 2014 23:01:24 +0100 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: emacs-orgmode@gnu.org Hi all, Brady Trainor writes: > Ista Zahn writes: > > [snip] >> I guess I'm missing something (like why the OP want's to run a shell >> in a separate window), but why not just >> >> #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session *shell* >> /bin/pwd >> echo $HOSTNAME >> ls -l foo.sh >> echo "---" >> cat foo.sh >> echo "---" >> source ./foo.sh >> echo $FOO >> #+END_SRC > > Tangentially related... > > *term* looks nice too (M-x term instead of M-x shell). This `term' is > like a more literal terminal embedded in Emacs. Even key-bindings are > hijacked. (Amusingly, readline utility gives bash some Emacs-like > key-bindings.) In a stackoverflow question, it is pointed out that > *term* versus *shell*, you miss out on features like isearch (C-s, C-r > etc.). Then, switching around a lot is hindered, since C-x o > (other-window) is hijacked (but the suggested windmove binding still > works). Well, if the code to be executed remotely is long running, I do not want to assume the connection to last during the full execution of that code. Hence, I am interested in sending code to a running tmux session. One possibility is to have tmux attached from withing emacs' term. This might not work too well, unfortunately. For instance, ess is currently not able to talk properly to an R session running inside tmux inside term (which is why I've given up on that idea for now). Regards, Andreas