Hi Torsten, Torsten Wagner <torsten.wag...@gmail.com> writes:
> Hi everyone, > > I tried to use the noweb-syntax to tangle all the pieces of source code > blocks > together as proposed by Tom. > > However, for some reasons it does not work. > I notice there are two different syntax for noweb. One propsed on worg and > the > other in examples here in the mailing list. Which one will be correct ? or > are > both correct but with different purpose ? <<block-1>> inserts the body of block 'block-1'. <<block-1()> inserts the *result* of evaluating block-1, and <<block-1(x=3.3)>> inserts the result of evaluating it with the specified argument value. I've just added documentation of this to Worg. > > I used the latest git-version and even tried the branch noweb-evaluate > > What I used was a source code block at the end of my org-file like: > All other blocks are defined above. Can you provide the exact contents of the file you're having trouble with? If I have ---------------------------------------------------------------- * test tangle #+srcname: block1 #+begin_src python x = 1 #+end_src #+srcname: makefile() #+begin_src python :tangle simulate_ofdm :exports none This is makefile <<block1>> #+end_src ---------------------------------------------------------------- then for me org-babel-tangle produces ---------------------------------------------------------------- #!/usr/bin/env python # generated by org-babel-tangle # [[file:/tmp/zz.org::*test%20tangle][makefile]] This is makefile x = 1 # makefile ends here ---------------------------------------------------------------- Dan > > #+srcname: makefile() > #+begin_src python :tangle simulate_ofdm :exports none > <<block1>> > <<block2>> > <<block3>> > <<block4>> > <<block5>> > #+end_src > #+resname: makefile > > However > the tangled file results only in > > #!/usr/bin/env python > # generated by org-babel-tangle > # [[file:~/test_noweb.org::*Result][makefile]] > > # makefile ends here > > An execution of block shows nothing on the *Shell output* buffer > It seems somehow I missunderstand which part of a block will replace a > <<noweb>> variable. I thouht it will be replaced by the complete source > block > content during tangle. > > Any ideas ? > > Thanks, > > Torsten > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode