Browse Source

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 11 years ago
parent
commit
9bc8ed3731
2 changed files with 8 additions and 3 deletions
  1. 1 1
      doc/org.texi
  2. 7 2
      lisp/ob-R.el

+ 1 - 1
doc/org.texi

@@ -14848,7 +14848,7 @@ references will not be expanded when the code block is exported.
 @item @code{strip-export}
 ``Noweb'' syntax references in the body of the code block will be expanded
 before the block is evaluated or tangled.  However, ``noweb'' syntax
-references will not be removed when the code block is exported.
+references will be removed when the code block is exported.
 @item @code{eval}
 ``Noweb'' syntax references in the body of the code block will only be
 expanded before the block is evaluated.

+ 7 - 2
lisp/ob-R.el

@@ -93,8 +93,13 @@
 	     inside
 	     (list "dev.off()"))
 	  inside))
-      (append (org-babel-variable-assignments:R params)
-	      (list body))) "\n")))
+      (append
+       (when (cdr (assoc :prologue params))
+	 (list (cdr (assoc :prologue params))))
+       (org-babel-variable-assignments:R params)
+       (list body)
+       (when (cdr (assoc :epilogue params))
+	 (list (cdr (assoc :epilogue params)))))) "\n")))
 
 (defun org-babel-execute:R (body params)
   "Execute a block of R code.