emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* No Expansion of noweb references when exporting
@ 2011-05-19  4:35 Mark Cox
  2011-05-19 13:50 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Cox @ 2011-05-19  4:35 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Is it possible for the output of the expansion of a code block to
appear in the exported document?

Consider the example:

#+TITLE: No expansion of noweb references when exporting

* Example
:PROPERTIES:
:tangle: illustration.hpp
:END:
#+srcname: boiler-plate-code-generator()
#+begin_src emacs-lisp :results output :exports none :tangle no
(dolist (type '("int8_t" "uint8_t" "float" "double"))
  (princ (format "template <> %s boiler_plate_code<%s>();\n" type type)))
#+end_src
#+begin_src c++ :noweb yes
<<boiler-plate-code-generator()>>
#+end_src

When I export this to HTML using C-c C-e b, the text
<<boiler-plate-code-generator()>> is present. What I would like to see
is the output that is generated when tangling.

Thanks
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: No Expansion of noweb references when exporting
  2011-05-19  4:35 No Expansion of noweb references when exporting Mark Cox
@ 2011-05-19 13:50 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2011-05-19 13:50 UTC (permalink / raw)
  To: Mark Cox; +Cc: emacs-orgmode

Hi Mark,

Thanks for pointing this out.  After checking the manual [1] for the
noweb header argument I realized you were right, we're not currently
living up to the described behavior.

I've just pushed up a patch which correctly implements the ":noweb yes"
expansion on export behavior.

Best -- Eric

Mark Cox <markcox80@gmail.com> writes:

> Hi,
>
> Is it possible for the output of the expansion of a code block to
> appear in the exported document?
>
> Consider the example:
>
> #+TITLE: No expansion of noweb references when exporting
>
> * Example
> :PROPERTIES:
> :tangle: illustration.hpp
> :END:
> #+srcname: boiler-plate-code-generator()
> #+begin_src emacs-lisp :results output :exports none :tangle no
> (dolist (type '("int8_t" "uint8_t" "float" "double"))
>   (princ (format "template <> %s boiler_plate_code<%s>();\n" type type)))
> #+end_src
> #+begin_src c++ :noweb yes
> <<boiler-plate-code-generator()>>
> #+end_src
>
> When I export this to HTML using C-c C-e b, the text
> <<boiler-plate-code-generator()>> is present. What I would like to see
> is the output that is generated when tangling.
>
> Thanks
> Mark
>


Footnotes: 
[1]  http://orgmode.org/manual/noweb.html

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-19 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19  4:35 No Expansion of noweb references when exporting Mark Cox
2011-05-19 13:50 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).