From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: [babel] noweb does not work (as expected) Date: Sun, 08 Nov 2009 23:41:58 -0500 Message-ID: <87y6mge2cp.fsf@stats.ox.ac.uk> References: <200911091247.48775.torsten.wagner@googlemail.com> 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 1N7M4y-0003GD-8V for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 23:42:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7M4s-0003CO-PK for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 23:42:10 -0500 Received: from [199.232.76.173] (port=37773 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7M4s-0003CA-CB for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 23:42:06 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:35143) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7M4r-0000fJ-Tq for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 23:42:06 -0500 In-Reply-To: <200911091247.48775.torsten.wagner@googlemail.com> (Torsten Wagner's message of "Mon, 9 Nov 2009 12:47:48 +0900") 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: Torsten Wagner Cc: Org Mode Mailing List Hi Torsten, Torsten Wagner 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 ? <> inserts the body of block 'block-1'. < inserts the *result* of evaluating block-1, and <> 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 <> #+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 > <> > <> > <> > <> > <> > #+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 > <> 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