From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Feature request for noweb mode that strips references on export Date: Wed, 01 Feb 2012 08:21:58 -0700 Message-ID: <87d39ylgt0.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rsc2B-0001TU-69 for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 10:23:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rsc25-0008PT-7c for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 10:23:43 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:37391) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Rsc24-0008MI-PO for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 10:23:37 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: avdi@avdi.org Cc: emacs-orgmode Avdi Grimm 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 > <> > 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/