From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torsten Wagner Subject: Re: How-to evaluate Java-snippets in org-mode/org-babel? Date: Wed, 06 Jul 2011 21:28:54 +0900 Message-ID: <4E145506.70802@gmail.com> References: <4E12B6DB.4090001@gmail.com> <87tyb1jdtk.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeRDy-0004D5-AW for emacs-orgmode@gnu.org; Wed, 06 Jul 2011 08:29:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeRDw-0006pY-GO for emacs-orgmode@gnu.org; Wed, 06 Jul 2011 08:29:02 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:63857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeRDw-0006pM-2z for emacs-orgmode@gnu.org; Wed, 06 Jul 2011 08:29:00 -0400 Received: by pvc12 with SMTP id 12so7837124pvc.0 for ; Wed, 06 Jul 2011 05:28:58 -0700 (PDT) In-Reply-To: <87tyb1jdtk.fsf@pinto.chemeng.ucl.ac.uk> 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: Org Mode Mailing List Hi Eric, Somehow I was pretty sure you would answer ;) I tried your example and it work great so far. I have three points which I would like to discuss 1. I thought it might be nice to declare the package and class name for the java-stuff as variable in a property node then I could do something like: * Coursework 1 :PROPERTIES: :var: PKGNAME="cw1" :var: CLASS="calc" :END: ** Snippet 1 ** Snippet 2 * Coursework 2 :PROPERTIES: :var: PKGNAME="cw2" :var: CLASS="string" :END: ** Snippet 1 ** Snippet 2 Unfortunately, org-mode does not allow multiple definition of the same property. I know there is a work around with a table. However, I thought I could use simply a list. :var: vars="(cw1 calc)" and use this in my shell script. However, this doesn't work. I can't index them. Any idea? Should it work in principle? Could I e.g., use :var: vars="{'x': 128, 'y': 210}" and put this in a python block accessing them by vars['x'] and vars['y']? That would be great! 2. I'm not totally sure but it seems that tangling creates the desired file if it is not existing so fare but it does not create folders thus, :tangle path/filename seems not to work. Any reason for this or maybe good idea to add it as a feature? For now, I added a little shell-based block "start" which takes care of this. 3. Tangleing and executing the code via a shell blocks works great. I saw somewhere that you could even tangle from the command line by calling emacs in batch mode. That's maybe a bit overcomplex for my task but some additional style to noweb might be nice. Instead of placing the code block at the point of call, tangle the code block. Then I could call <> <> <> If I understood right, noweb for now only place the code of the block at the particular place. Maybe, I could write a lisp-block "tangle" which tangles the code and call it via <> Just want to know if this might be a good idea in general or if this works already in some other way. All the best Totti