1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-04 08:47:03 +00:00

Add material to introduction of source code chapter

This commit is contained in:
Dan Davison 2010-04-11 14:57:09 -04:00
parent b056b2cd77
commit ba5e0f06a1

View File

@ -1,4 +1,31 @@
@chapter Working with source code or Embedded Source Code
@chapter Working With Source Code or Embedded Source Code
Source code can be included in Org-mode documents using a @samp{src} block:
FIXME: This example is also in the Literal Examples section.
@example
#+BEGIN_SRC emacs-lisp
(defun org-xor (a b)
"Exclusive or."
(if a (not b) b))
#+END_SRC
@end example
Org supports the following ways of working with such code blocks:
@itemize @bullet
@item
Editing in the appropriate Emacs major-mode (@kbd{C-c '})
@item
Export with appropriate markup
@item
Extraction (``tangling'') into pure code files.
@item
Execution, with results captured in the Org buffer
@item
Using code blocks in table formulas
@end itemize
@section Syntax
:PROPERTIES: