]> code.delx.au - gnu-emacs/blobdiff - lisp/org/ob-sass.el
Merge from emacs-23; up to 2010-06-12T11:17:12Z!eliz@gnu.org.
[gnu-emacs] / lisp / org / ob-sass.el
index 87f9ff46ecc4c2d3c8b1aa1e626c91649d00a871..3348dd4d1d6c5d46d19a6feb3d1ec99e5238e2aa 100644 (file)
@@ -1,11 +1,11 @@
 ;;; ob-sass.el --- org-babel functions for the sass css generation language
 
-;; Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
 ;; Author: Eric Schulte
 ;; Keywords: literate programming, reproducible research
 ;; Homepage: http://orgmode.org
-;; Version: 7.01
+;; Version: 7.4
 
 ;; This file is part of GNU Emacs.
 
 
 (defvar org-babel-default-header-args:sass '())
 
-(defun org-babel-expand-body:sass (body params &optional processed-params)
-  "Expand BODY according to PARAMS, return the expanded body." body)
-
 (defun org-babel-execute:sass (body params)
   "Execute a block of Sass code with Babel.
 This function is called by `org-babel-execute-src-block'."
   (let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
          (file (cdr (assoc :file params)))
-         (out-file (or file (make-temp-file "org-babel-sass-out")))
+         (out-file (or file (org-babel-temp-file "sass-out-")))
          (cmdline (cdr (assoc :cmdline params)))
-         (in-file (make-temp-file "org-babel-sass-in"))
-         (cmd (concat "sass " (or cmdline "") in-file " " out-file)))
+         (in-file (org-babel-temp-file "sass-in-"))
+         (cmd (concat "sass " (or cmdline "")
+                     " " (org-babel-process-file-name in-file)
+                     " " (org-babel-process-file-name out-file))))
     (with-temp-file in-file
-      (insert (org-babel-expand-body:sass body params))) (shell-command cmd)
+      (insert (org-babel-expand-body:generic body params))) (shell-command cmd)
     (or file (with-temp-buffer (insert-file-contents out-file) (buffer-string)))))
 
 (defun org-babel-prep-session:sass (session params)
@@ -65,6 +64,5 @@ This function is called by `org-babel-execute-src-block'."
 
 (provide 'ob-sass)
 
-;; arch-tag: 2954b169-eef4-45ce-a8e5-3e619f0f07ac
 
 ;;; ob-sass.el ends here