From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Andresen Subject: org-babel: interactive terminal support Date: Wed, 23 Sep 2009 03:11:35 +0200 Message-ID: <87vdjabh2w.fsf@in-ulm.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqGOw-0006zZ-T5 for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 21:12:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqGOs-0006vY-1c for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 21:12:10 -0400 Received: from [199.232.76.173] (port=33215 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqGOr-0006vQ-UF for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 21:12:05 -0400 Received: from mail.in-ulm.de ([217.10.8.10]:46286) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MqGOr-0004kq-9S for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 21:12:05 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, after seeing org-babel I immediately thought of the eev project by Eduardo Ochs (http://angg.twu.net/) Basically I wanted to do what he does in this video: http://angg.twu.net/eev-current/anim/channels.anim.html So I wrote a small org-babel gnu screen interface. Eev does the same with "expect" but is very line-centric. And GNU Screen can slurp in whole files. (I guess one could support several backends if this proves useful) The translated org-babel syntax looks like this: * Listen on port 1234 #+begin_src screen :session receiver :results silent netcat -l -p 1234 #+end_src * Send things to port 1234 #+begin_src screen :session sender :results silent { echo hi sleep 1 echo bye sleep 1 } | netcat -c localhost 1234 #+end_src I've put the code on github if anyone is interested in this: http://github.com/bandresen/org-babel-screen A few things are still hardcoded, like the use of /bin/zsh. If you guys think this is a worthwhile addition to org-babel, let me know what the right parameter would be. HTH, benny