From mboxrd@z Thu Jan 1 00:00:00 1970 From: aditya siram Subject: Re: [SOLVED] [org-babel] References Not Expanding Date: Sun, 22 Aug 2010 16:21:58 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016e65b581c3da1f0048e701fd2 Return-path: Received: from [140.186.70.92] (port=55971 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnHzN-0003h4-5T for emacs-orgmode@gnu.org; Sun, 22 Aug 2010 17:22:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnHzL-0005hp-Ol for emacs-orgmode@gnu.org; Sun, 22 Aug 2010 17:22:01 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:37661) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnHzL-0005hO-GM for emacs-orgmode@gnu.org; Sun, 22 Aug 2010 17:21:59 -0400 Received: by wyg36 with SMTP id 36so6618604wyg.0 for ; Sun, 22 Aug 2010 14:21:58 -0700 (PDT) In-Reply-To: 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: emacs-orgmode@gnu.org --0016e65b581c3da1f0048e701fd2 Content-Type: multipart/alternative; boundary=0016e65b581c3da1e7048e701fd0 --0016e65b581c3da1e7048e701fd0 Content-Type: text/plain; charset=ISO-8859-1 The function that loads the code block into the interpreter org-babel-load-in-session does not do noweb reference expansion. I have included a git patch that adds that functionality. -deech On Sat, Aug 21, 2010 at 4:42 PM, aditya siram wrote: > Hi all, > I have the development version of org-mode and org-babel noweb style > references are not expanding during evaluation, they are instead copied > literally into the temp file. They seem to expand fine when tangling. Here > is file that is failing: > * Root > #+begin_src haskell :noweb yes :tangle Main.hs > <> > <> > main = print $ test [1,2,3] > #+end_src > > * Imports > #+srcname: Imports > #+begin_src haskell > import Control.Monad.State > #+end_src > > * Append Function > #+srcname: Test > #+begin_src haskell > test = length > #+end_src > > I have tried unsuccessfully to make "Imports" and "Append Function" > children of "Root". > > Thanks! > -deech > --0016e65b581c3da1e7048e701fd0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The function that loads the code block into the interpreter org-babel-load-= in-session does not do noweb reference expansion.

I have included a = git patch that adds that functionality.

-deech

On Sat, Aug 21, 2010 at 4:42 PM, aditya siram <aditya.siram@gmail.com> wr= ote:
Hi all,
I have the development version of org-mode and org-babel noweb = style references are not expanding during evaluation, they are instead copi= ed literally into the temp file. They seem to expand fine when tangling. He= re is file that is failing:
* Root
#+begin_src haskell :noweb yes :tangle Main.hs
=A0 <<Imp= orts>>
=A0 <<Test>>
=A0 main =3D print $ test [1,2,= 3]
#+end_src

* Imports
#+srcname: Imports
#+begin_src haske= ll
=A0 import Control.Monad.State
#+end_src

* Append Function
#+= srcname: Test
#+begin_src haskell
=A0 test =3D length
#+end_src
I have tried unsuccessfully to make "Imports" and "App= end Function" children of "Root".

Thanks!
-deech

--0016e65b581c3da1e7048e701fd0-- --0016e65b581c3da1f0048e701fd2 Content-Type: text/x-diff; charset=US-ASCII; name="noweb_references_expand_on_session_load.patch" Content-Disposition: attachment; filename="noweb_references_expand_on_session_load.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gd6eklpu0 RnJvbSBlZWVlY2UyNmJlNDQzNDM4MzI1YmI5ODU0ODhiZGRjNzg0NDMyZTk3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBZGl0eWEgU2lyYW0gPGFkaXR5YS5zaXJhbUBnbWFpbC5jb20+ CkRhdGU6IFN1biwgMjIgQXVnIDIwMTAgMTY6MTI6MTcgLTA1MDAKU3ViamVjdDogW1BBVENIXSBO b3dlYiBzdHlsZSByZWZlcmVuY2VzIGFyZSBub3cgZXhwYW5kZWQgd2l0aCBsb2FkaW5nIGEgY29k ZSBibG9jayBpbiBhIHNlc3Npb24uCgotLS0KIGxpc3Avb2IuZWwgfCAgICA2ICsrKysrLQogMSBm aWxlcyBjaGFuZ2VkLCA1IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0 IGEvbGlzcC9vYi5lbCBiL2xpc3Avb2IuZWwKaW5kZXggODU1N2YwOS4uMmVjYzFkYiAxMDA2NDQK LS0tIGEvbGlzcC9vYi5lbAorKysgYi9saXNwL29iLmVsCkBAIC00MjEsOCArNDIxLDEyIEBAIHNl c3Npb24uIgogICAoaW50ZXJhY3RpdmUpCiAgIChsZXQqICgoaW5mbyAob3IgaW5mbyAob3JnLWJh YmVsLWdldC1zcmMtYmxvY2staW5mbykpKQogICAgICAgICAgKGxhbmcgKG50aCAwIGluZm8pKQot ICAgICAgICAgKGJvZHkgKG50aCAxIGluZm8pKQogICAgICAgICAgKHBhcmFtcyAobnRoIDIgaW5m bykpCisgICAgICAgICAoYm9keSAoc2V0ZiAobnRoIDEgaW5mbykKKwkJICAgICAoaWYgKGFuZCAo Y2RyIChhc3NvYyA6bm93ZWIgcGFyYW1zKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChzdHJpbmc9ICJ5ZXMiIChjZHIgKGFzc29jIDpub3dlYiBwYXJhbXMpKSkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgKG9yZy1iYWJlbC1leHBhbmQtbm93ZWItcmVmZXJlbmNlcyBpbmZvKQor CQkgICAgICAgKG50aCAxIGluZm8pKSkpCiAgICAgICAgICAoc2Vzc2lvbiAoY2RyIChhc3NvYyA6 c2Vzc2lvbiBwYXJhbXMpKSkKIAkgKGRpciAoY2RyIChhc3NvYyA6ZGlyIHBhcmFtcykpKQogCSAo ZGVmYXVsdC1kaXJlY3RvcnkKLS0gCjEuNy4wLjQKCg== --0016e65b581c3da1f0048e701fd2 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --0016e65b581c3da1f0048e701fd2--