Babel: active code in Org-mode

Overview

#+NAME: <name>
#+BEGIN_SRC <language> <switches> <header arguments>
   <body>
#+END_SRC

#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp -n 20  ;; Show line numbers starting from 20
#+BEGIN_SRC emacs-lisp +n 20  ;; Show line numbers ending with 20
#+NAME: named-block
#+HEADER: :var data=2
#+BEGIN_SRC emacs-lisp
  (message "data:%S" data)
#+END_SRC

#+RESULTS: named-block
  : data:2
#+NAME:
optional, can be refered with the name from some other elements in the document
#+HEADER:
put headers in separated lines

How-to

Reference