From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neeum Zawan Subject: Re: Literate Programming - Continue a Source Block? Date: Fri, 10 Jun 2011 18:02:30 -0700 Message-ID: <87boy5goyh.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> <87oc25mqqq.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVCYw-0006za-Pf for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 21:00:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVCYv-0008J0-LV for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 21:00:30 -0400 Received: from lo.gmane.org ([80.91.229.12]:41803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVCYv-0008Iv-Ag for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 21:00:29 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QVCYu-0007Ze-1y for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 03:00:28 +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 ; Sat, 11 Jun 2011 03:00:28 +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 ; Sat, 11 Jun 2011 03:00:28 +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 Achim Gratz writes: > Eric Schulte writes: > >> append the bodies of all blocks of the same name are appended >> during tangling > > several blocks with the same name seem a bit dubious, would it not be > cleaner to have an index part to the block name and a range expression > for the concatenation during tangling? I might want to tangle them in > different order than their appearance in the source, for instance. For my purposes, an index would be too much to maintain, and while I wouldn't mind it as an option, I wouldn't want to *have* to use them if all I want is to append and/or overwrite. The solution I proposed in my response to Eric may meet you halfway there in some ways. When I initially wrote about this problem, my goal was simply to enable what could easily be done with noweb (and of course, I actually had a need for it). I actually have very little experience with LP, so I don't know in practice what will work and what won't. The initial benefit that I can see with indexing is that one may want to add some lines in the middle of a block. However, this can only really work if you just happen to end/begin your source blocks at that point. If you didn't know in advance that you'd add some lines in the middle, then you likely didn't end/begin your blocks at that point, and you'll have to go and artificially begin/end your blocks there. This may seem confusing to a reader, so it makes sense to put an explicit noweb style reference. If, on the other hand, you knew it in advance, you probably should put the noweb reference any way. My comments are from the perspective of my use case for LP, and I can see people may use LP for other reasons, so if you have a better scenario, let us know.