summaryrefslogtreecommitdiff
path: root/lisp/ob-awk.el
diff options
context:
space:
mode:
authorSebastien Delafond <seb@debian.org>2013-08-11 16:27:56 +0200
committerS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:27 +0200
commit53b246b7d66bfa03ab9bcf47d4647913b401e3d6 (patch)
treeb5ea4e732c2219456d13048feb05b37b22a76391 /lisp/ob-awk.el
parent8606e2621fc00fd8b334a06924aeef3aab7a2e4d (diff)
parente32a45ed36d6000db4b39171149072d11b77af72 (diff)
Imported Debian patch 8.0.7-1
Diffstat (limited to 'lisp/ob-awk.el')
-rw-r--r--lisp/ob-awk.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/ob-awk.el b/lisp/ob-awk.el
index 6e13996..373d5fd 100644
--- a/lisp/ob-awk.el
+++ b/lisp/ob-awk.el
@@ -1,6 +1,6 @@
;;; ob-awk.el --- org-babel functions for awk evaluation
-;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2013 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
@@ -32,7 +32,6 @@
;;; Code:
(require 'ob)
-(require 'ob-eval)
(require 'org-compat)
(eval-when-compile (require 'cl))
@@ -45,7 +44,7 @@
(defvar org-babel-awk-command "awk"
"Name of the awk executable command.")
-(defun org-babel-expand-body:awk (body params &optional processed-params)
+(defun org-babel-expand-body:awk (body params)
"Expand BODY according to PARAMS, return the expanded body."
(dolist (pair (mapcar #'cdr (org-babel-get-header params :var)))
(setf body (replace-regexp-in-string
@@ -78,10 +77,8 @@ called by `org-babel-execute-src-block'"
(org-babel-reassemble-table
((lambda (results)
(when results
- (if (or (member "scalar" result-params)
- (member "verbatim" result-params)
- (member "output" result-params))
- results
+ (org-babel-result-cond result-params
+ results
(let ((tmp (org-babel-temp-file "awk-results-")))
(with-temp-file tmp (insert results))
(org-babel-import-elisp-from-file tmp)))))