From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avdi Grimm Subject: Feature request for noweb mode that strips references on export Date: Mon, 30 Jan 2012 23:11:15 -0500 Message-ID: Reply-To: avdi@avdi.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs54E-0002Fv-5r for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 23:11:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rs54C-0003zz-9r for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 23:11:38 -0500 Received: from mail-tul01m020-f169.google.com ([209.85.214.169]:57357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs54C-0003zv-6p for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 23:11:36 -0500 Received: by obbta7 with SMTP id ta7so6115627obb.0 for ; Mon, 30 Jan 2012 20:11:35 -0800 (PST) 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: 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 <> 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