Browse Source

removing debugging statements from org-babel-tangle.el, and beefing up test-tangle.org

Eric Schulte 16 years ago
parent
commit
e9c2c6a590
2 changed files with 39 additions and 1 deletions
  1. 1 1
      lisp/org-babel-tangle.el
  2. 38 0
      test-tangle.org

+ 1 - 1
lisp/org-babel-tangle.el

@@ -74,7 +74,7 @@ file into their own source-specific files."
                         blocks))))
       ;; blocks should contain all source-blocks organized by language
       ;; and session
-      (message "blocks=%S" blocks) ;; debugging
+      ;; (message "blocks=%S" blocks) ;; debugging
       (mapc ;; for every language create a file
        (lambda (by-lang)
          (let* ((lang (car by-lang))

+ 38 - 0
test-tangle.org

@@ -1,3 +1,6 @@
+#+TITLE: Testing Org-Babel Tangling
+#+OPTIONS: toc:2 ^:nil
+
 * Some file
 
 Some text here
@@ -9,6 +12,20 @@ echo "line 2"
 
 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
 
 #+BEGIN_SRC sh
@@ -38,3 +55,24 @@ foo foo bar baz
 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