In a literate document, you might very well have small chunks of code for one ns scattered around and then finally combined using noweb into one file and tangle the output. Currently, keys like
compile-file (C-c C-k), goto function definition (M-.), do not work at all in the source blocks. This is unfortunate, and makes life very painful. So, first we need to get these keys to work.
Heres how it can possibly be done.
Lets say we want to compile the code in block A. Block B uses noweb syntax to import block A, and then tangles to file src/B.clj. So we need to search for the presence of <<A>> in a tangled code chunk , tangle the chunk to a file, go to the file buffer and position the cursor at the correct relative position, and then invoke the appropriate function (in this case, slime-compile-and-load-file).
Ive attached two files which do this, the first one is an example org file in which you can use the compile keystrokes on (after opening a slime server for clojure). However, it doesnt position the cursor in the tangled file correctly, but this is not needed for compile/load file. Its not a very good implementation, but it works for this case. Also, it doesn't work when the indirect buffer created by C-c ' is open. The advantage of this method is that it can easily be generalized to any language, since the compiler gets what it expects - a file of code to operate on.
Second part of proposal: