Re: Multiple named code blocks

2020-11-30 Thread mooss
Hi Diego, This feature does indeed what I need, I will update my code with it. Thank you for your help. Best regards, Félix

Re: Multiple named code blocks

2020-11-30 Thread mooss
Hi Greg, I don't know why I missed this, it is exactly what I needed. Thank you for your help. Best regards, Félix

Re: Multiple named code blocks

2020-11-29 Thread Diego Zamboni
rted working on a literate programming tool based on it. > One particular technique that I use is having multiple named code blocks, > like so: > > #+begin_src perl :noweb yes :results output > <> > sub foo { > <> > } > foo; > #+end_src > > #+name: Bef

Re: Multiple named code blocks

2020-11-28 Thread Greg Minshall
Félix, i ran into this restriction a while ago. on this list i was helped, and ended up using the suggestion to instead put my common bits in a property in the subtree for a given "name" * aggregate.R :PROPERTIES: :header-args+: :tangle

Re: Multiple named code blocks

2020-11-28 Thread mooss
Hi Tom, The downsides you mention are making perfect sense, especially the cd and rm examples, I did not thought about that and I agree that this would be a dangerous default. Another possibility would be to shield this behaviour behind a header argument, for example by adding a "dimension" to

Re: Multiple named code blocks

2020-11-28 Thread Tom Gillespie
Hi Félix, I think that it is probably not a good idea to implicitly concatenate blocks that share the same name. There are a number of major downsides. One reason is that all the other parts of org-mode assume that there is only a single block with that name, or rather have undefined behavior

Multiple named code blocks

2020-11-28 Thread mooss
Hi, I have been using org-mode for almost three years and I loved it so much that I started working on a literate programming tool based on it. One particular technique that I use is having multiple named code blocks, like so: #+begin_src perl :noweb yes :results output <> sub foo { &l