From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: :noweb header argument Date: Tue, 10 Jan 2012 09:44:05 -0700 Message-ID: <87ty43ik2y.fsf@gmx.com> References: <801ur8rnjg.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkeoZ-0000B0-8P for emacs-orgmode@gnu.org; Tue, 10 Jan 2012 11:44:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkeoS-0001yq-U0 for emacs-orgmode@gnu.org; Tue, 10 Jan 2012 11:44:47 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:39106) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RkeoS-0001ya-Mt for emacs-orgmode@gnu.org; Tue, 10 Jan 2012 11:44:40 -0500 In-Reply-To: (Thomas S. Dye's message of "Tue, 10 Jan 2012 05:41:23 -1000") 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: "Thomas S. Dye" Cc: Sebastien Vauban , emacs-orgmode@gnu.org tsd@tsdye.com (Thomas S. Dye) writes: > 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. > Great, I'll apply your documentation patch. > > >>> | tangle | - | + | - | >>> |--------+------+--------+--------| >>> | need | + | + | - | >>> What should the name for such an option be? >>> >>> 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. > As I recall this was originally implemented and then later removed because it was causing more confusion and problems than it was worth. I hope it hasn't crossed the line of existence more than once. At some point it should be placed behind a user-customizable variable, preferably something like `org-babel-export-code-format' which defaults to something like "%code" but could be augmented to something like "Block Name: *%name*\n %code". It is not immediately clear if such a variable should have different values for different export backends or (likely preferable) should expand into Org-mode text *before* export. Cheers, > >> >> 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 -- Eric Schulte http://cs.unm.edu/~eschulte/