;;; ob-io.el --- org-babel functions for Io evaluation
-;; Copyright (C) 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
;; Author: Andrzej Lichnerowicz
;; Keywords: literate programming, reproducible research
;;; Code:
(require 'ob)
-(require 'ob-ref)
-(require 'ob-comint)
-(require 'ob-eval)
(eval-when-compile (require 'cl))
+(defvar org-babel-tangle-lang-exts) ;; Autoloaded
(add-to-list 'org-babel-tangle-lang-exts '("io" . "io"))
(defvar org-babel-default-header-args:io '())
(defvar org-babel-io-command "io"
"Name of the command to use for executing Io code.")
-
(defun org-babel-execute:io (body params)
"Execute a block of Io code with org-babel. This function is
called by `org-babel-execute-src-block'"
(value (let* ((src-file (org-babel-temp-file "io-"))
(wrapper (format org-babel-io-wrapper-method body)))
(with-temp-file src-file (insert wrapper))
- ((lambda (raw)
- (if (member "code" result-params)
- raw
- (org-babel-io-table-or-string raw)))
- (org-babel-eval
- (concat org-babel-io-command " " src-file) ""))))))
+ (let ((raw (org-babel-eval
+ (concat org-babel-io-command " " src-file) "")))
+ (org-babel-result-cond result-params
+ raw
+ (org-babel-io-table-or-string raw)))))))
(defun org-babel-prep-session:io (session params)