[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Feature request for noweb mode that strips references on export
From: |
Daimrod |
Subject: |
Re: [O] Feature request for noweb mode that strips references on export |
Date: |
Sat, 31 Mar 2012 11:04:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) |
"Sean O'Halpin" <address@hidden> writes:
> On Fri, Mar 30, 2012 at 5:39 PM, Daimrod <address@hidden> wrote:
>> 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
>>
> Thanks but that's not my problem. When I use :exports both I get the
> code but not the results output in my exported HTML.
> Do you get the "Hello World" output? If so, it looks like I'll have to
> debug my configuration.
No, you're right, I have to execute evaluate the code manually to
produce
#+RESULTS: example
: Hello World
and then it's exported but only if the code isn't evaluated during the
export. It looks like there is a bug with in the ruby part because the
following code works as expected.
----------
* Title
#+name: boilerplate
#+begin_src emacs-lisp :exports none
(defun hello ()
"Hello World")
#+end_src
Use it
#+name: example
#+begin_src emacs-lisp :exports both :noweb strip-export
<<boilerplate>>
(hello)
#+end_src
----------
It exports to
----------
1 Title
Use it
(hello)
Hello World
----------