From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neeum Zawan Subject: Re: Literate Programming - Continue a Source Block? Date: Thu, 16 Jun 2011 21:30:15 -0700 Message-ID: <878vt15bc8.fsf@fester.com> References: <87pqmokh6d.fsf@fester.com> <80k4cw22uf.fsf@somewhere.org> <87fwnkjqoh.fsf@fester.com> <87mxhsnmcf.fsf@gmail.com> <877h8wj9za.fsf@fester.com> <877h8tv6yh.fsf@gmail.com> <87fwnhgps2.fsf@fester.com> <871uz0m8q9.fsf@gmail.com> <87oc238vby.fsf@fester.com> <87zkllie03.fsf@gmail.com> <871uyv7jxm.fsf@fester.com> <871uyvuhqy.fsf@gmail.com> <87wrgm6g3a.fsf@fester.com> <87hb7qcr3z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXQee-0001fw-0F for emacs-orgmode@gnu.org; Fri, 17 Jun 2011 00:27:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXQec-0005rN-UC for emacs-orgmode@gnu.org; Fri, 17 Jun 2011 00:27:35 -0400 Received: from lo.gmane.org ([80.91.229.12]:46108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXQec-0005rJ-KF for emacs-orgmode@gnu.org; Fri, 17 Jun 2011 00:27:34 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QXQeY-0006gn-KY for emacs-orgmode@gnu.org; Fri, 17 Jun 2011 06:27:30 +0200 Received: from c-71-237-233-41.hsd1.or.comcast.net ([71.237.233.41]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jun 2011 06:27:30 +0200 Received: from mailinglists by c-71-237-233-41.hsd1.or.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jun 2011 06:27:30 +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 Eric Schulte writes: > How about the following solution, which is based on a new :noweb-ref > header argument. > > When expanding ``noweb'' style references the bodies of all code block > with /either/ a block name matching the reference name /or/ a :noweb-ref > header argument matching the reference name will be concatenated > together to form the replacement text. > > By setting this header argument at the sub-tree or file level, simple > code block concatenation may be achieved. For example, when tangling > the following Org-mode file, the bodies of code blocks will be > concatenated into the resulting pure code file. Hi, Your example is not completely clear. I noticed you didn't put any names for the source blocks that use the noweb-ref. Is it necessary not to name them, or can one name them but their names will still have to be unique and are orthogonal to concatenation (i.e. they have names, but the concatenation is due to whatever the argument of noweb-ref is)? I think either way, this solution serves my purpose. My original suggestion was to have a header whose value would be "append" to allow for concatenation if the name matches a previous source block. It seems your solution above is the same except instead of looking at the name of the source block, it looks at the argument of noweb-ref. Overwriting is still not supported, but I don't know if that's all that important (I don't have an immediate need for it). And noweb by default did not have it either, so perhaps it's not needed for most tasks (OTOH, you may want to think about what the best solution is if later on you decide to add overwriting capability). Thanks. Hope to see this or something like it soon.