From: Torsten Wagner <torsten.wagner@gmail.com>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: How-to evaluate Java-snippets in org-mode/org-babel?
Date: Wed, 06 Jul 2011 21:28:54 +0900 [thread overview]
Message-ID: <4E145506.70802@gmail.com> (raw)
In-Reply-To: <87tyb1jdtk.fsf@pinto.chemeng.ucl.ac.uk>
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
<<start>>
<<snippet>>
<<execute>>
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
<<tangle(snippet)>>
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
next prev parent reply other threads:[~2011-07-06 12:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-05 7:01 How-to evaluate Java-snippets in org-mode/org-babel? Torsten Wagner
2011-07-05 9:07 ` Eric S Fraga
2011-07-05 9:22 ` Eric S Fraga
2011-07-05 13:48 ` Jason F. McBrayer
2011-07-06 12:36 ` Torsten Wagner
2011-07-06 13:26 ` Eric Schulte
2011-07-06 15:14 ` Jason F. McBrayer
2011-07-06 17:11 ` Torsten Wagner
2011-07-06 19:15 ` Eric S Fraga
2011-07-06 12:28 ` Torsten Wagner [this message]
2011-07-06 13:38 ` Eric Schulte
2011-07-14 5:42 ` Torsten Wagner
2011-07-15 15:00 ` Eric Schulte
2011-07-18 1:31 ` Torsten Wagner
2011-07-18 14:53 ` Eric Schulte
2011-07-28 10:49 ` Torsten Wagner
2011-07-29 0:06 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E145506.70802@gmail.com \
--to=torsten.wagner@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).