Achim Gratz <strom...@nexgo.de> writes: > Eric Schulte <schulte.e...@gmail.com> 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.