Better seed support for (random).
[bpt/emacs.git] / lisp / org / ob-awk.el
index fe84b90..682d802 100644 (file)
@@ -1,11 +1,10 @@
 ;;; ob-awk.el --- org-babel functions for awk evaluation
 
-;; Copyright (C) 2011  Free Software Foundation, Inc.
+;; Copyright (C) 2011-2012  Free Software Foundation, Inc.
 
 ;; Author: Eric Schulte
 ;; Keywords: literate programming, reproducible research
 ;; Homepage: http://orgmode.org
-;; Version: 7.7
 
 ;; This file is part of GNU Emacs.
 
@@ -25,9 +24,9 @@
 ;;; Commentary:
 
 ;; Babel's awk can use special header argument:
-;; 
+;;
 ;; - :in-file takes a path to a file of data to be processed by awk
-;;   
+;;
 ;; - :stdin takes an Org-mode data or code block reference, the value
 ;;          of which will be passed to the awk process through STDIN
 
@@ -49,7 +48,7 @@
   "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
-                (regexp-quote (concat "$" (car pair))) (cdr pair) body)))
+                (regexp-quote (format "$%s" (car pair))) (cdr pair) body)))
   body)
 
 (defun org-babel-execute:awk (body params)
@@ -112,6 +111,6 @@ Emacs-lisp table, otherwise return the results as a string."
 
 (provide 'ob-awk)
 
-;; arch-tag: 844e2c88-6aad-4018-868d-a2df6bcdf68f
+
 
 ;;; ob-awk.el ends here