On Tue, 16 Feb 2016, Alan Schmitt wrote:
On 2016-02-16 12:42, John Kitchin <jkitc...@andrew.cmu.edu> writes:
I think you are seeing that the blocks are tangled in reverse. If I add a third
arbitrary lang it comes in reverse.
Interesting! Thanks a lot for trying it.
I see that I made the typical scientific method mistake of testing for
my hypothesis, instead of testing against.
If they are all the same language, they are in the right order. It looks like
org collects by language, so your strategy won't work with org-babel tangle I
guess.
I've found a workaround, as it is only for a few blocks I manually
change their headers, so it is fine at the moment.
Another workaround would be to add after advice to
`org-babel-get-src-block-info' to map your faux languages to a common
variant.
I still think it
would be great to have better control on the order in which blocks are
tangled.
If you want to do this inside org/emacs (and not stitch a bunch of tangled
files together with other tools), try this in your *.org file and execute
it. The result is what you might work with (i.e. customize or advice the
function below).
#+BEGIN_SRC emacs-lisp :results pp :tangle foo.ml
(org-babel-tangle-collect-blocks)
#+END_SRC
HTH,
Chuck