Re: [O] string joining accumulated noweb references
Achim Gratz writes: > Eric Schulte writes: >> I just pushed up a new customization variable named >> `org-babel-noweb-separator' which is used to join multiple accumulated >> noweb references like the above. The value defaults to a newline giving >> the same behavior resulting from your patch but can be set to any >> string. > > Now, lets say I'd want to accumulate one set of noweb references with > one separator and another set with a different one, maybe even in the > same document. How'd I do that? > Not possible in the same document, although on a document-by-document basis I would recommend the use of file local variables. > > Also, using a customization variable for the purpose of changing the > semantics of documents is generally fraught with peril: if someone does > customize this variable, their documents will break in subtle ways for > somebody with a different or no customization. I suggest that such > changes should always be visible in the source document itself. > That is a very good point. I had originally started to implement this parameter using a header argument, but then decided that it didn't make sense to implement a multi-block parameter using a header argument. Now that you mention this however I do agree that a customization parameter is even less appropriate. Given that header arguments may be set on the file and subtree level, I suppose they do offer the range of application appropriate for this sort of parameter, and they are more likely (though not guaranteed) to have their value present in the buffer. I've just pushed up a change converting the `org-babel-noweb-separator' customization variable to the :noweb-sep header argument. Thanks, > > > Regards, > Achim. -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] string joining accumulated noweb references
Eric Schulte writes: > I just pushed up a new customization variable named > `org-babel-noweb-separator' which is used to join multiple accumulated > noweb references like the above. The value defaults to a newline giving > the same behavior resulting from your patch but can be set to any > string. Now, lets say I'd want to accumulate one set of noweb references with one separator and another set with a different one, maybe even in the same document. How'd I do that? Also, using a customization variable for the purpose of changing the semantics of documents is generally fraught with peril: if someone does customize this variable, their documents will break in subtle ways for somebody with a different or no customization. I suggest that such changes should always be visible in the source document itself. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] string joining accumulated noweb references
Wow - this is /fast/ development :-); now I'm glad my son kept me awake this night, so that I could check my mails sooner than I normaly would have... Eric Schulte writes: > Tom Regner writes: > >> Eric Schulte writes: >> >>> I'd rather not change the default silently in this way. >> I understand that. > > My apologies, now that I understand the issue I see that the current > behavior is most likely confusing and I agree with your original > suggestion to change the default. Yes, well -- but changing current behaviour is always tricky -- you never know, how many people/documents rely on it. That's why I think that... > >> Example document: >> --->% >> * Subtree >> :PROPERTIES: [...] > > I just pushed up a new customization variable named > `org-babel-noweb-separator' which is used to join multiple accumulated > noweb references like the above. The value defaults to a newline giving > the same behavior resulting from your patch but can be set to any > string. ...this change is way better than my proposal; as it now does the "right thing"™ per default, but existing workflows depending on the old behaviour are easily mended. Thanks again -- impressive speed in reacting and thinking, and overall a polite and civil environment for contributors. I like that. Kind regards, Tom
Re: [O] string joining accumulated noweb references Was: (no subject)
Tom Regner writes: > Eric Schulte writes: > >> I'd rather not change the default silently in this way. > I understand that. My apologies, now that I understand the issue I see that the current behavior is most likely confusing and I agree with your original suggestion to change the default. > Example document: > --->% > * Subtree > :PROPERTIES: > :noweb-ref: subtree > :END: > ** Part 1 > #+begin_src sh > Line One > #+end_src sh > ** Part 2 > #+begin_src sh > Line Two > #+end_src sh > * Assamble it > #+begin_src sh :tangle yes :noweb tangle > <> > #+end_src sh I just pushed up a new customization variable named `org-babel-noweb-separator' which is used to join multiple accumulated noweb references like the above. The value defaults to a newline giving the same behavior resulting from your patch but can be set to any string. Thanks for pointing this out, -- Eric Schulte http://cs.unm.edu/~eschulte/