On 1/5/2011 11:18 PM, Eric Schulte wrote:
Mark Engelberg<mark.engelb...@gmail.com> writes:
On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte<schulte.e...@gmail.com> wrote:
For the most up-to-date and comprehensive documentation of using
Org-mode to work with code blocks (e.g. Literate Programming or
Reproducible Research) the online manual is also very useful.
In literate programming org-mode, will Clojure code be properly
highlighted and indented?
yes, Clojure code is displayed using the Emacs major mode for Clojure
code, so the appearance is as you would expect. See this screenshot
from the file I am working on at the moment, the upper frame is a .clj
file and the lower is a .org file. http://i.imgur.com/kdbDp.png
Is there a keystroke (like Ctrl-c,Ctrl-k) that will evaluate the
Clojure code in the entire file and send it to the swank REPL?
Yes, C-c C-c evaluates the code block under the point, and many other
keystrokes bind to various other functions [1], specifically C-c C-v b
executes the entire buffer.
Will stacktraces point at the correct line number?
No, this is one of the reasons that I currently tend to do large-scale
development in .clj files and reserve embedded code for shorter chunks
of code. That said I have successfully completed large clojure projects
in which the entirety of the code was tangled from a single literate
.org file.
Can you post examples of these? I'd love to see some other examples.
Cheers -- Eric
Footnotes:
[1] M-x org-babel-describe-bindings
Major Mode Bindings Starting With C-c C-v:
key binding
--- -------
C-c C-v a org-babel-sha1-hash
C-c C-v b org-babel-execute-buffer
C-c C-v d org-babel-demarcate-block
C-c C-v e org-babel-execute-maybe
C-c C-v f org-babel-tangle-file
C-c C-v g org-babel-goto-named-src-block
C-c C-v h org-babel-describe-bindings
C-c C-v i org-babel-lob-ingest
C-c C-v l org-babel-load-in-session
C-c C-v n org-babel-next-src-block
C-c C-v o org-babel-open-src-block-result
C-c C-v p org-babel-previous-src-block
C-c C-v r org-babel-goto-named-result
C-c C-v s org-babel-execute-subtree
C-c C-v t org-babel-tangle
C-c C-v u org-babel-goto-src-block-head
C-c C-v v org-babel-expand-src-block
C-c C-v x org-babel-do-key-sequence-in-edit-buffer
C-c C-v z org-babel-switch-to-session-with-code
--
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