Hi, Seth <wbu...@gmail.com> writes:
>>Just discovered org-mode myself --- does anyone know of guide to using >>it with clojure for a total newbie? > > I havent actually used it for clojure per se. I was just imagining how > it could be used. You have the ability to embed arbitrary code (from > many different languages). You can edit the code in its own emacs > major mode and then it will automatically be saved back once done. You > can then document it using org-modes awesome abilities. > However, this is sort of clumsy. > There are a variety of options here - you can write *all* of your code in a single large Org-mode file, and tangle out .clj files for compilation. - you can write *all* of your code in .clj files, and simply link to the code from your .org files - you can write some code in external .clj files, and some embedded in .org files - with current versions of Org-mode it is even possible to propagate changes from a tangled .clj file back into the code blocks in a .org file if e.g. you are working on a project with non-org users who would rather edit the .clj files directly. See the `org-babel-detangle' function. > > I would rather be able to have all of my code in all of its 'little > files' arranged in directories. And when im editing the clojure files, > i would like to be like 'oh, i want to document this better/introduce > the motivation etc! And then automatically have the code, or parts of > the code, copied to the org file and then i could document it. And > then jump back to the code to continue developing. And have changes in > the clojure file automatically reflected in the org file. I was > thinking that 'chunk' labels could be embedded in the source code > (like in marginalia in github: just comments like ;;##Block Name) so > that we wouldn't have to have all code in one file in one chunk, but > could split it up. I am a grad student and spend much of my time writing code and running experiments in Clojure. I do all of this in an environment of mixed .org and .clj files. I find I prefer to write larger libraries directly in .clj files, but then I often embed the snippets of code required for running experiments, generating tables/graphs and analyzing experimental results in code blocks embedded in Org-mode files. From these code blocks I can either tangle the clojure code out into executable scripts, or execute it /in situ/ in the .org file with the results dumped directly into my org-mode buffer. I find this to be a *very* comfortable research and development environment, although as one of the main developers of the code block support for Org-mode I'm certainly biased. Cheers -- Eric -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en