Re: [O] Literate Programming - Continue a Source Block?

2011-06-19 Thread Neeum Zawan
Sebastien Vauban wxhgmqzgw...@spammotel.com writes: The only case that pops up to my mind now, of such a use case where overwriting could be needed (well, let's say useful) is for some pedagogical document that one would write, where code is constructed from a simplistic (and buggy) approach

Re: [O] Literate Programming - Continue a Source Block?

2011-06-17 Thread Sebastien Vauban
Hi Eric and Neeum, Eric Schulte wrote: 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 This was my thinking. (OTOH, you may want

Re: [O] Literate Programming - Continue a Source Block?

2011-06-16 Thread Olaf.Hamann
Am 08.06.2011 17:20, schrieb Neeum Zawan: [...] Now the original noweb allows what I'm asking for. If you begin a source block with a name of an existing block but append an = symbol, it knows to append to that source block. It would be great if org-mode could add that capability. Another

Re: [O] Literate Programming - Continue a Source Block?

2011-06-16 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com 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

Re: [O] Literate Programming - Continue a Source Block?

2011-06-16 Thread Eric Schulte
Neeum Zawan mailingli...@nawaz.org writes: Eric Schulte schulte.e...@gmail.com 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

Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Rather than feeling our way forward step by step it seems that simply following the behavior of noweb would both 1. allow for easy transition between noweb and babel 2. benefit from the years of experience and design accumulated in the noweb project Does anyone on this list know the noweb

Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Hi Neeum, You are correct, the current implementation only specially concatenates blocks during tangling, *not* during noweb resolution. It would be possible to also implement the concatenation behavior during noweb expansion, however I'd prefer to first wait for a response to my recent other

Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes: It would be possible to also implement the concatenation behavior during noweb expansion, however I'd prefer to first wait for a response to my recent other email to this thread asking for a more clear explication of existing noweb behavior. The

Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Achim Gratz
Eric Schulte schulte.e...@gmail.com writes: Does anyone on this list know the noweb system well enough to specify its behavior in this regard, and to describe what functional changes would be required to bring Babel into line with noweb behavior? Far from knowing it well, but the basics are,

Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes: Rather than feeling our way forward step by step it seems that simply following the behavior of noweb would both 1. allow for easy transition between noweb and babel 2. benefit from the years of experience and design accumulated in the noweb

Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes: Eric Schulte schulte.e...@gmail.com writes: Does anyone on this list know the noweb system well enough to specify its behavior in this regard, and to describe what functional changes would be required to bring Babel into line with noweb behavior? Far

Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Neeum Zawan mailingli...@nawaz.org writes: Eric Schulte schulte.e...@gmail.com writes: It would be possible to also implement the concatenation behavior during noweb expansion, however I'd prefer to first wait for a response to my recent other email to this thread asking for a more clear

Re: [O] Literate Programming - Continue a Source Block?

2011-06-14 Thread Achim Gratz
Eric Schulte schulte.e...@gmail.com writes: Thanks for sharing your thoughts. How would you feel about moving away from special source block names and moving towards implementing this behavior with a header argument? I'm not feeling strongly either way... I'm wanting to use Babel for some

Re: [O] Literate Programming - Continue a Source Block?

2011-06-14 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes: Could you try the attached example file? I first evaluated the following elisp code to set the combination variable's value to append. Your example works if there are no noweb references. See the modified one where I have noweb references. Note

Re: [O] Literate Programming - Continue a Source Block?

2011-06-13 Thread Eric Schulte
Hi Neeum, Neeum Zawan mailingli...@nawaz.org writes: Eric Schulte schulte.e...@gmail.com writes: Hi Neeum, Thanks for your feedback. Your point is well taken about the flexibility of header arguments, and the ability of a header argument based solution to overwrite blocks. I would

Re: [O] Literate Programming - Continue a Source Block?

2011-06-13 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes: Eric Schulte schulte.e...@gmail.com writes: I think append is just as clear as concatenate, Fair enough, in my mind append needs an existing entity, but I guess it could be an empty one. and collate implies shuffling which is not happening. Well, I

Re: [O] Literate Programming - Continue a Source Block?

2011-06-12 Thread Achim Gratz
Eric Schulte schulte.e...@gmail.com writes: I think append is just as clear as concatenate, Fair enough, in my mind append needs an existing entity, but I guess it could be an empty one. and collate implies shuffling which is not happening. Well, I was getting ahead of myself... I hope you

Re: [O] Literate Programming - Continue a Source Block?

2011-06-11 Thread Eric Schulte
Hi Neeum, Thanks for your feedback. Your point is well taken about the flexibility of header arguments, and the ability of a header argument based solution to overwrite blocks. I would mention that variables such as the newly introduced `org-babel-tangle-named-block-combination' may be easily

Re: [O] Literate Programming - Continue a Source Block?

2011-06-11 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes: Hi Neeum, Thanks for your feedback. Your point is well taken about the flexibility of header arguments, and the ability of a header argument based solution to overwrite blocks. I would mention that variables such as the newly introduced

Re: [O] Literate Programming - Continue a Source Block?

2011-06-10 Thread Eric Schulte
I like the concision of the =original-name syntax used by noweb, but I would lean towards the use of a :noweb-append type header argument as suggested above because currently the names of blocks in Babel carry no semantic content and I'd prefer to leave it this way. I suppose it may also

Re: [O] Literate Programming - Continue a Source Block?

2011-06-10 Thread Achim Gratz
Eric Schulte schulte.e...@gmail.com writes: append the bodies of all blocks of the same name are appended during tangling Shouldn't this be called concat(enate) or collate? Or, since several blocks with the same name seem a bit dubious, would it not be cleaner to have an index part to

Re: [O] Literate Programming - Continue a Source Block?

2011-06-10 Thread Eric Schulte
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 Shouldn't this be called concat(enate) or collate? I think append is just as clear as concatenate, and collate implies

Re: [O] Literate Programming - Continue a Source Block?

2011-06-10 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes: I like the concision of the =original-name syntax used by noweb, but I would lean towards the use of a :noweb-append type header argument as suggested above because currently the names of blocks in Babel carry no semantic content and I'd prefer to

Re: [O] Literate Programming - Continue a Source Block?

2011-06-10 Thread Neeum Zawan
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

Re: [O] Literate Programming - Continue a Source Block?

2011-06-09 Thread Avdi Grimm
On Wed, Jun 8, 2011 at 5:20 PM, Neeum Zawan mailingli...@nawaz.org wrote: n this case, yes. In a real programming project, it could be a number of them. For example, I may have a code block dedicated to imports/includes which I want to be on the top of the file - and I may have to append to

Re: [O] Literate Programming - Continue a Source Block?

2011-06-08 Thread Sebastien Vauban
Hi Neeum, Neeum Zawan wrote: With noweb, one can continue a source block that one started earlier. Can this not be done with Babel? If not, I'm struggling a little with how to do LP using Babel... Of course, this can be done here as well: simply reuse the same tangle target (file), and

Re: [O] Literate Programming - Continue a Source Block?

2011-06-08 Thread Neeum Zawan
Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Neeum, Neeum Zawan wrote: With noweb, one can continue a source block that one started earlier. Can this not be done with Babel? If not, I'm struggling a little with how to do LP using Babel... Of course, this can be done here as

Re: [O] Literate Programming - Continue a Source Block?

2011-06-08 Thread Eric Schulte
The above is somewhat artificial, but in a proper programming project something like this will occur frequently: A new feature will be added at some later point and I'll want to update various blocks of code. Currently the best method is that suggested previously/below of using named

Re: [O] Literate Programming - Continue a Source Block?

2011-06-08 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes: Second solution: create one sole block that will be tangled, and which contains your other blocks (using the ref syntax), in the order you want. I had thought of this, but I find it somewhat lacking. Consider my example above. I could have

[O] Literate Programming - Continue a Source Block?

2011-06-07 Thread Neeum Zawan
Hi, With noweb, one can continue a source block that one started earlier. Can this not be done with Babel? If not, I'm struggling a little with how to do LP using Babel... Thanks.