Avdi Grimm <gro...@inbox.avdi.org> writes: > Presently there are three noweb modes: yes, no, and tangle. I would > like a fourth, which would behave as follows: > > On tangle: normal noweb expansion is performed. > On evaluation: normal noweb expansion is performed. > On export: noweb references are STRIPPED. Not just ignored, but the > lines containing the references are removed before export. > > The use case is this: I find myself writing articles where I have a > series of code examples like this: > > #+begin_src ruby > <<boilerplate>> > 2 + 2 # => > #+end_src > > The boilerplate is required to make the sample work, but I don't want > to have the boilerplate code show up in the finished article, because > it would be repeated for every example. I also don't want the noweb > reference to show up in the finished article, because it will confuse > readers and syntax highlighters. > > Is this possible now, and/or a feature that could be easily added? >
I've just added tested and documented such a "strip-export" argument to :noweb. Please let me know if it doesn't work as you expected. Best, > > Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte/