"Sean O'Halpin" <sean.ohal...@gmail.com> writes: > Hi, > > I've tried to use the new :noweb strip-export feature but I can't work > out the magic combination of headers (working with git head, i.e. > commit 67694297fa0f9b32cf4bfe812ba8a5c5cf4a0859). > > Here is a stripped down example: > > START OF EXAMPLE > > * Example > > Define method > > #+name: boilerplate > #+begin_src ruby > def hello > "Hello World" > end > #+end_src > > Use it > > #+name: example > #+begin_src ruby :exports both :noweb strip-export > «boilerplate» > > hello > #+end_src > > And here is the result: > > #+RESULTS: example > : Hello World > > END OF EXAMPLE > > On export, I expect this to display the result string "Hello World" > after the code "hello" but get nothing. If I change the :noweb > strip-export to :noweb yes, I do get the output (but also the > boilerplate of course). > > Is strip-export meant to work like this? If so, could someone please > post a working example? > > Thanks, > Sean
If you don't want to export boilerplate you've to use :exports none in it. #+name: boilerplate #+begin_src ruby :exports none def hello "Hello World" end #+end_src Use it #+name: example #+begin_src ruby :exports both :noweb strip-export <<boilerplate>> hello #+end_src