emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode][babel] noweb does not work (as expected)


From: Thomas S. Dye
Subject: Re: [Orgmode][babel] noweb does not work (as expected)
Date: Mon, 9 Nov 2009 06:32:17 -1000


On Nov 8, 2009, at 9:38 PM, Torsten Wagner wrote:

Hi Tom,

If I try to use the noweb way, I always got error messages which tells me that
org-babel can not read the result correctly


#+srcname: r-load-libraries
#+begin_src R
  library(RMySQL)
  library(reshape)
  library(xtable)
#+end_src


As I see you do not use any special header here which means results is set to value, right? However, there is no special return line to org-babel either. In my understanding and according to my error messages library(xtable) would be
evaluated as the result of this block...

However this results in error messages at least for python.

Which org-babel version due you use (which branch)?

Maybe you or someone else can bring some more light into this :results topic. I somehow miss the option :results none to avoid any results which should be useful if the source code block is just a piece of a bigger arrangement. For literate programming and RR it might be essential to spread blocks over the file which will be tangled together (by tangle or a noweb block). However not all need provide a result but just need to run in the same session. Maybe just the last block of such an arrangement will come up with a result suitable for
org-babel.

Actually I prefer the idea of :noweb instead of tangle, which seems to me more
flexible and faster.

Just need to get it running

Thanks

Torsten

Hi Torsten,

It's not clear to me what outcome you desire. Tangling should result in a source file that can serve as input to a compiler or interpreter. The combination of :noweb and :session lets you write literate programs that are sent directly to an interpreter, which presumably creates some useful output along the way (my example makes some graphs after a lot of data reshaping), but might be used just to set up an environment in the interpreter, which then can be manipulated directly in the session buffer.

I presumed that your reference to makefile meant that you were heading for the :noweb, :session route. I find this useful because I can query the state of variables in the session and put the results in a LaTeX source block. Of course, the same thing would be possible to insert the results into the org file.

I'm using the version of org-babel that comes with org-mode version 6.32trans. I think I last updated about a week ago. I'm not competent to work at the bleeding edge. Besides that, I find the org- babel distributed with org-mode to be mature for such a young piece of software, and it does pretty much everything I ask it to do.

HTH,
Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]