From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: :noweb header argument Date: Tue, 10 Jan 2012 05:41:23 -1000 Message-ID: References: <801ur8rnjg.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkdpV-0003kn-NQ for emacs-orgmode@gnu.org; Tue, 10 Jan 2012 10:41:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkdpP-0006Yp-Ld for emacs-orgmode@gnu.org; Tue, 10 Jan 2012 10:41:41 -0500 Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:46884) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RkdpP-0006YG-C6 for emacs-orgmode@gnu.org; Tue, 10 Jan 2012 10:41:35 -0500 In-Reply-To: <801ur8rnjg.fsf@somewhere.org> (Sebastien Vauban's message of "Tue, 10 Jan 2012 09:04:35 +0100") 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org Hi Seb, "Sebastien Vauban" writes: > Hi Thomas, > > Thomas S. Dye wrote: >> Is there a difference between :noweb tangle and :noweb no? > > Yes: ":noweb no" is the default, and must *not expand* anything. > >> Based on the documentation and some limited testing, I made the following >> table. >> >> *** :noweb parameters >> >> | param | eval | tangle | export | >> |--------+------+--------+--------| >> | yes | + | + | + | >> | no | - | + | - | > > It should be "-", "-", "-" here, if "-" means "no expansion". > Hmm, the manual entry for :noweb no says "However, noweb references will still be expanded during tangling." You're right, though, :noweb no doesn't expand noweb references during tangling. I'll work up a manual patch. >> | tangle | - | + | - | >> |--------+------+--------+--------| >> | need | + | + | - | >> >> I think it might be good to have a parameter that expands noweb >> references on evaluation and tangling, but leaves them alone during >> export. This way the code block would be fully functional, but wouldn't >> duplicate code during export (when the noweb references are to other >> code blocks in the same document). > > I'd find that interesting as well, but then the names of the code blocks must > be visible again (in HTML and PDF exports), something that has disappeared > over time. Alternatively for LaTeX, some way to wrap exported code blocks in a \begin{listing} ... \end{listing} environment, complete with caption and label. This way the code block name could appear in the caption, and with \listoflistings, in the document frontmatter as well. > > Find attached the 2 PDF I had written (in 2009) for comparing NoWeb's > rendering of blocks and Babel's rendering. See > http://lists.gnu.org/archive/html/emacs-orgmode/2009-12/msg00170.html. > > Some time after that, we had block names in the HTML/PDF output, but not > anymore. > > Best regards, > Seb All the best, Tom -- Thomas S. Dye http://www.tsdye.com