X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68..c74587e6b0c545eb4fb57654a79ca88ea14a6764:/lisp/org/ob-sass.el diff --git a/lisp/org/ob-sass.el b/lisp/org/ob-sass.el index 3348dd4d1d..c960610431 100644 --- a/lisp/org/ob-sass.el +++ b/lisp/org/ob-sass.el @@ -1,11 +1,10 @@ ;;; ob-sass.el --- org-babel functions for the sass css generation language -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.4 ;; This file is part of GNU Emacs. @@ -40,6 +39,7 @@ ;;; Code: (require 'ob) +(require 'ob-eval) (defvar org-babel-default-header-args:sass '()) @@ -55,8 +55,11 @@ This function is called by `org-babel-execute-src-block'." " " (org-babel-process-file-name in-file) " " (org-babel-process-file-name out-file)))) (with-temp-file in-file - (insert (org-babel-expand-body:generic body params))) (shell-command cmd) - (or file (with-temp-buffer (insert-file-contents out-file) (buffer-string))))) + (insert (org-babel-expand-body:generic body params))) + (org-babel-eval cmd "") + (if file + nil ;; signal that output has already been written to file + (with-temp-buffer (insert-file-contents out-file) (buffer-string))))) (defun org-babel-prep-session:sass (session params) "Raise an error because sass does not support sessions." @@ -65,4 +68,5 @@ This function is called by `org-babel-execute-src-block'." (provide 'ob-sass) + ;;; ob-sass.el ends here