org-mode/test-tangle.org

79 lines
941 B
Org Mode
Raw Normal View History

#+TITLE: Testing Org-Babel Tangling
#+OPTIONS: toc:2 ^:nil
* Some file
Some text here
2009-06-27 19:43:47 +00:00
#+BEGIN_SRC sh
echo "line 1"
echo "line 2"
#+END_SRC
more text
#+srcname: ruby-no-session
#+begin_src ruby
def hello
puts "hello world"
end
#+end_src
#+srcname: first-ruby-block
#+begin_src ruby :session special
:block_the_first
#+end_src
** Some subsection
2009-06-27 19:43:47 +00:00
#+BEGIN_SRC sh
echo "line 3"
echo "line 4"
#+END_SRC
blah blah blah
#+BEGIN_EXAMPLE
text line 1
text line 2
text line 3
#+END_EXAMPLE
2009-06-27 20:13:26 +00:00
more stuff
#+srcname: i-have-a-name
#+begin_src sh
echo "I have a name"
#+end_src
foo foo bar baz
2009-06-27 19:43:47 +00:00
#+BEGIN_SRC sh
echo "line 5"
echo "line 6"
#+END_SRC
** Ruby blocks
#+srcname: another-ruby-block
#+begin_src ruby :session special
holder = 98
#+end_src
#+srcname: ruby-plus-2
#+begin_src ruby :session special
def plus_two(n)
n + 2
end
#+end_src
#+srcname: final-ruby
#+begin_src ruby :session special
plus_two(holder)
#+end_src