4 ms·
Orgmode also has an amazing extension babel, which allows Literate Programming (or just inserting code snippets). Using the #+BEGIN_SRC <mode-name> tag will al
by josephkern 15y ago
Orgmode also has an amazing extension babel, which allows Literate Programming (or just inserting code snippets).
Using the #+BEGIN_SRC <mode-name> tag will also allow you to edit any code snippet in its own major mode.
- Estragon 15y agoNot working for me. What version of org-mode?
- TeMPOraL 15y ago#+begin_src lisp (defun botsbuildbots () (botsbuildbots)) #+end_src Try moving your point to (defun... and pressing << C-c ' >>. It should work with org-mode bundled in Emacs 23; if not, you can get the newest version from http://orgmode.org http://orgmode.org. With org-babel enabled, you can actually run this code, or use it in literate-programming style to write programs.
- pietrofmaggi 15y agoOne think that you can do in the latest orgmode, is to write code snippets in the org documents, extract the code, compile it (if needed, like for C code), run it, and insert the result back into the org document. This is really nice for writing code example.