From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] noweb with ob-screen?? Date: Mon, 02 Jan 2012 10:47:49 -0700 Message-ID: <87vcouc6qa.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhmOi-0004JM-75 for emacs-orgmode@gnu.org; Mon, 02 Jan 2012 13:14:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RhmOg-0002jL-EI for emacs-orgmode@gnu.org; Mon, 02 Jan 2012 13:14:12 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:34466) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RhmOg-0002jH-5T for emacs-orgmode@gnu.org; Mon, 02 Jan 2012 13:14:10 -0500 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: Torsten Wagner Cc: Org Mode Mailing List --=-=-= Content-Type: text/plain Torsten Wagner writes: > Hi > this is a follow up on a early post. > I try to get noweb working with ob-screen. > I wrote several code blocks and named them. I finished with a code block > which calls all other blocks using noweb notation adding to its header > :noweb yes. I execute this block by C-c C-c but the noweb reference get > not resolved. > In my understanding they should isn't it? Or do I mix tangling and > execution? In my understanding noweb should work for both cases isn't it? > The expansion should occur as part of executing the code block. For example notice the expansion of the sh code blocks in this example... --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=noweb.org #+begin_src sh :noweb yes :results output <> <> #+end_src #+results: : first : second #+name: first #+begin_src sh echo first #+end_src #+name: second #+begin_src sh echo second #+end_src --=-=-= Content-Type: text/plain > > I looked in the source code of ob-screen and try to get an idea why it > doesn't work. However compare to other babel modes I could not find that > it is missing anything related to noweb. It seems to me that noweb is a > babel mode independent functionality and hence should work with all babel > languages. > This is certainly the case, noweb expansion occurs *before* the language specific code is invoked. In fact I can confirm that an expanded body is passed to the screen execution function. Are you sure that it is only screen code blocks for which you are having trouble with noweb references? Could you ensure that the attached example above expands for sh code blocks, and then try to translate it to screen code blocks? > > If I'm wrong could someone please point me to an example in the source code > how to implement noweb functionality. > The above example should serve, the manual is also a good resource, and finally there any many small examples located at http://eschulte.github.com/org-scraps/ Best -- Eric > > Thanks a lot > > Torsten > > Cc. Sorry all this is written down from memory on my smartphone and hence > no code examples and maybe wrong syntax. -- Eric Schulte http://cs.unm.edu/~eschulte/ --=-=-=--