Browse Source

org-babel-exp is now using the newer org-exp-blocks.el block definition methods

Eric Schulte 16 years ago
parent
commit
5ae3234bae
1 changed files with 11 additions and 10 deletions
  1. 11 10
      lisp/org-babel-exp.el

+ 11 - 10
lisp/org-babel-exp.el

@@ -31,16 +31,17 @@
 ;;; Code:
 ;;; Code:
 (require 'org-babel)
 (require 'org-babel)
 (require 'org-exp-blocks)
 (require 'org-exp-blocks)
-(add-to-list 'org-export-blocks '(src org-babel-exp-src-blocks))
+(org-export-blocks-add-block '(src org-babel-exp-src-blocks nil))
 (add-to-list 'org-export-interblocks '(src org-babel-exp-inline-src-blocks))
 (add-to-list 'org-export-interblocks '(src org-babel-exp-inline-src-blocks))
 
 
 (defun org-babel-exp-src-blocks (body &rest headers)
 (defun org-babel-exp-src-blocks (body &rest headers)
   "Process src block for export.  Depending on the 'export'
   "Process src block for export.  Depending on the 'export'
 headers argument in replace the source code block with...
 headers argument in replace the source code block with...
 
 
-both ---- the default, display the code and the results
+both ---- display the code and the results
 
 
-code ---- display the code inside the block but do not process
+code ---- the default, display the code inside the block but do
+          not process
 
 
 results - process the block and replace it with the results of
 results - process the block and replace it with the results of
           execution
           execution
@@ -48,7 +49,7 @@ results - process the block and replace it with the results of
 none ----- do not display either code or results upon export"
 none ----- do not display either code or results upon export"
   (interactive)
   (interactive)
   (unless headers (error "org-babel can't process a source block without knowing the source code"))
   (unless headers (error "org-babel can't process a source block without knowing the source code"))
-  (message "org-babel processing...")
+  (message "org-babel-exp processing...")
   (let ((lang (car headers))
   (let ((lang (car headers))
         (params (org-babel-parse-header-arguments (mapconcat #'identity (cdr headers) " "))))
         (params (org-babel-parse-header-arguments (mapconcat #'identity (cdr headers) " "))))
     (org-babel-exp-do-export lang body params)))
     (org-babel-exp-do-export lang body params)))
@@ -70,12 +71,12 @@ options and are taken from `org-babel-defualt-inline-header-args'."
 
 
 (defun org-babel-exp-do-export (lang body params &optional inline)
 (defun org-babel-exp-do-export (lang body params &optional inline)
   (case (intern (or (cdr (assoc :exports params)) "code"))
   (case (intern (or (cdr (assoc :exports params)) "code"))
-          ('none "")
-          ('code (org-babel-exp-code body lang params inline))
-          ('results (org-babel-exp-results body lang params inline))
-          ('both (concat (org-babel-exp-code body lang params inline)
-                     "\n\n"
-                     (org-babel-exp-results body lang params inline)))))
+    ('none "")
+    ('code (org-babel-exp-code body lang params inline))
+    ('results (org-babel-exp-results body lang params inline))
+    ('both (concat (org-babel-exp-code body lang params inline)
+                   "\n\n"
+                   (org-babel-exp-results body lang params inline)))))
 
 
 (defun org-babel-exp-code (body lang params &optional inline)
 (defun org-babel-exp-code (body lang params &optional inline)
   (if inline
   (if inline