Hi Tom > Would something like run-code-blocks (below) do what you want? I put > a source block like this at the top of my org-babel file, where I can > find it quickly. > > #+srcrname: run-code-blocks > #+begin_src python :noweb > <<block-1>> > <<block-2>> > #+end_src > > #+srcname: block-1 > #+begin_src python > a = 1 > a > #+end_src > > #+srcname: block-2 > #+begin_src python > b = 1 > b > #+end_src
Actually, that is a very nice and smart idea :) It could be something like a Makefile allowing me to switch on and off different blocks (e.g., for debugging if there is an error somewhere), switch between different blocks (e.g. real data from file and test data set) or even modify temporarily variables in between For example I could write: #+srcrname: run-code-blocks #+begin_src python :noweb # <<block-1>> # choose between real data <<block-test>> # and test data # wondering whether it would work with negative values a = -1 <<block-2>> #+end_src #+srcname: block-1 #+begin_src python a = open("foo.txt","r") a #+end_src #+srcname: block-test #+begin_src python a = 1 a #+end_src #+srcname: block-2 #+begin_src python b = 1 b #+end_src Nice, will try it and many thanks for sharing Greetings Torsten _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode