From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: Re: Feature request for noweb mode that strips references on export Date: Fri, 30 Mar 2012 18:39:51 +0200 Message-ID: <871uoagi08.fsf@gmail.com> References: <87d39ylgt0.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDerz-0002EQ-IR for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 12:40:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDert-0004yx-AR for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 12:40:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:33881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDert-0004x9-3Y for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 12:40:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SDerr-000229-GG for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 18:40:03 +0200 Received: from anantes-556-1-310-218.w2-9.abo.wanadoo.fr ([2.9.254.218]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Mar 2012 18:40:03 +0200 Received: from daimrod by anantes-556-1-310-218.w2-9.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Mar 2012 18:40:03 +0200 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@gnu.org "Sean O'Halpin" writes: > Hi, > > I've tried to use the new :noweb strip-export feature but I can't work > out the magic combination of headers (working with git head, i.e. > commit 67694297fa0f9b32cf4bfe812ba8a5c5cf4a0859). > > Here is a stripped down example: > > START OF EXAMPLE > > * Example > > Define method > > #+name: boilerplate > #+begin_src ruby > def hello > "Hello World" > end > #+end_src > > Use it > > #+name: example > #+begin_src ruby :exports both :noweb strip-export > «boilerplate» > > hello > #+end_src > > And here is the result: > > #+RESULTS: example > : Hello World > > END OF EXAMPLE > > On export, I expect this to display the result string "Hello World" > after the code "hello" but get nothing. If I change the :noweb > strip-export to :noweb yes, I do get the output (but also the > boilerplate of course). > > Is strip-export meant to work like this? If so, could someone please > post a working example? > > Thanks, > Sean If you don't want to export boilerplate you've to use :exports none in it. #+name: boilerplate #+begin_src ruby :exports none def hello "Hello World" end #+end_src Use it #+name: example #+begin_src ruby :exports both :noweb strip-export <> hello #+end_src