emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request for noweb mode that strips references on export
@ 2012-01-31  4:11 Avdi Grimm
  2012-01-31  7:56 ` Sebastien Vauban
  2012-02-01 15:21 ` Eric Schulte
  0 siblings, 2 replies; 16+ messages in thread
From: Avdi Grimm @ 2012-01-31  4:11 UTC (permalink / raw)
  To: emacs-orgmode

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?

Thanks,

-- 
Avdi Grimm
http://avdi.org

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

end of thread, other threads:[~2012-04-01 21:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31  4:11 Feature request for noweb mode that strips references on export Avdi Grimm
2012-01-31  7:56 ` Sebastien Vauban
2012-01-31 17:38   ` Avdi Grimm
2012-01-31 18:48     ` Avdi Grimm
2012-02-01 14:18       ` Eric Schulte
2012-02-01 15:21 ` Eric Schulte
2012-03-15 18:24   ` Avdi Grimm
2012-03-30 16:22     ` Sean O'Halpin
2012-03-30 16:37       ` Nick Dokos
2012-03-31  8:28         ` Sean O'Halpin
2012-03-30 16:39       ` Daimrod
2012-03-31  8:33         ` Sean O'Halpin
2012-03-31  9:04           ` Daimrod
2012-03-31 16:03           ` Nick Dokos
2012-03-31 15:32             ` Eric Schulte
2012-04-01 21:28               ` Sean O'Halpin

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).