From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Andresen Subject: Re: org-babel: interactive terminal support Date: Sat, 26 Sep 2009 01:29:24 +0200 Message-ID: <873a6aob6z.fsf@in-ulm.de> References: <87vdjabh2w.fsf@in-ulm.de> <87hbuq631d.fsf@stats.ox.ac.uk> 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 1MrKEl-00024K-Cx for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 19:30:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrKEh-00023w-3u for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 19:30:02 -0400 Received: from [199.232.76.173] (port=37730 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrKEg-00023t-Qy for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 19:29:58 -0400 Received: from mail.in-ulm.de ([217.10.8.10]:34821) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MrKEg-0006uk-4K for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 19:29:58 -0400 In-Reply-To: <87hbuq631d.fsf@stats.ox.ac.uk> (Dan Davison's message of "Fri, 25 Sep 2009 19:02:54 -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 Hey Dan, Dan Davison writes: > Hi Benny, > > This looks very interesting and I think it's extremely likely that we'll > want to include your code -- thanks very much. Having said that, I'm > being a bit dense: would you mind expanding a bit on what this currently > does, and what it has the potential to do? All it currently does it show you a terminal which gets the source code block send to. Just like an inferior process. I've made a gif of the channels.org example from my first mail: http://github.com/bandresen/org-babel-screen/blob/master/channels.anim.gif The way I currently see it, it somehow works as an interactive makefile. An example of a use that I have is that want to extract several frames out of a video file and convert them to a gif animation. It's a commented org file with several steps such as: * find the part you want to extract #+begin_src screen :session create-gif mplayer -ao null -osdlevel 3 /tmp/videofile.avi #+end_src [...snip...] * convert selected frames to gif #+begin_src screen :session create-gif convert -delay 100 -loop 0 .qiv-select/* animation.gif #+end_src I don't know how useful it is to other people, but because it basically gives you the power over a terminal emulator you could do anything in it that you can do in a normal terminal. Except better controlled and documented. Or one could use a standardized notation for keypresses and let screen translate them for you. Example: #+begin_src screen :session vimtutorial vimtutor 85G fcx EEx llx ^Vjjjjlllx #+end_src Which might be useful in some way. Another thing that might be possible is to simulate an 'expect' like behavior by using screen's capability to dump the output of commands. It's certainly possible, but replacing an app like 'expect' is no small task. :-) br, benny