From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Using noweb with org-mode source Date: Thu, 06 Jan 2011 08:59:04 +0100 Message-ID: <4D257648.7080600@christianmoe.com> References: <4D24D1F7.1050307@christianmoe.com> <87tyhmeeid.fsf@gmail.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=47978 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pakhx-0006d0-Jg for emacs-orgmode@gnu.org; Thu, 06 Jan 2011 02:56:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pakhw-0000w6-AR for emacs-orgmode@gnu.org; Thu, 06 Jan 2011 02:56:29 -0500 Received: from mars.hitrost.net ([91.185.211.18]:23010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pakhv-0000vW-SB for emacs-orgmode@gnu.org; Thu, 06 Jan 2011 02:56:28 -0500 In-Reply-To: <87tyhmeeid.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org, Phil Branigan Hi, Eric, Thanks, it's working now. I had tried ":results raw" before, and perhaps "replace" too. I had dropped them again, because it still didn't work. Why not was forehead-slappingly obvious after a good night's sleep... Hi, Phil, In addition to what Eric writes below (":results replace raw"), you also need to *activate Org as a Babel language.* In your .emacs, you need something like (org-babel-do-load-languages 'org-babel-load-languages '((org . t))) -- with any other languages you need in the same list. Now it should do exactly what you want. Yours, Christian On 1/6/11 7:24 AM, Eric Schulte wrote: > Hi Christian, > > The following should remove the enclosing begin_src org blocks, and > results in the org-mode exporting normally, rather than verbatim. > Notice the :results header arguments on the last code block, such header > arguments can be set on a file-wide basis to reduce code clutter. > > Best -- Eric > > * One section, exported to a particular document > > #+srcname: primates > #+begin_src org > ,- chimps :: strong, smart and savage > ,- bonobos :: less savage, sexy, smart > ,- orangutans :: kinda asocial, with big arms > ,- gorillas :: really strong, but shy > #+end_src > > Lots of text here. > > * Another section, exported to a different document > > Let's review what we know about the primate group. > > #+begin_src org :noweb yes :results replace raw > <> > #+end_src > > > Christian Moe writes: > >> Hi, >> >> This should get you part of the way: Use `org' as the language name, >> not `org-mode'. Enclose the noweb reference in another src block with >> noweb explicitly turned on. Reworked example follows. >> >> I can't seem to get rid of the code block around it, though, however I >> play with the header arguments. >> >> Yours, >> Christian >> >> >> * One section, exported to a particular document >> >> #+srcname: primates >> #+begin_src org >> ,- chimps :: strong, smart and savage >> ,- bonobos :: less savage, sexy, smart >> ,- orangutans :: kinda asocial, with big arms >> ,- gorillas :: really strong, but shy >> #+end_src >> >> Lots of text here. >> >> * Another section, exported to a different document >> >> Let's review what we know about the primate group. >> >> #+begin_src org :noweb yes >> <> >> #+end_src >> >> On 1/5/11 6:59 PM, Phil Branigan wrote: >>> In making up lecture and teaching materials, I would find it useful to >>> be able to use noweb references to replicate blocks of org-mode text >>> directly, rather than source code from latex or another language. But >>> org-mode isn't one of the babel-supported languages. Can anyone >>> suggest a tricky way to achieve this result? >>> >>> What I have in mind is something like the following: >>> >>> * One section, exported to a particular document >>> >>> #+srcname: primates >>> #+begin_src org-mode >>> - chimps :: strong, smart and savage >>> - bonobos :: less savage, sexy, smart >>> - orangutans :: kinda asocial, with big arms >>> - gorillas :: really strong, but shy >>> #+end_src >>> >>> Lots of text here. >>> >>> * Another section, exported to a different document >>> >>> Let's review what we know about the primate group. >>> >>> <> >>> >>> >>> -- >>> Phil Branigan >>> >>> >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >