From d035c1476537ca93594bf07ed2faebca2dafade3 Mon Sep 17 00:00:00 2001 From: Aaron Ecay Date: Thu, 7 Aug 2014 01:46:11 -0400 Subject: [PATCH] ob-R.el: fix a bug when a :var is propertized text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/ob-R.el (org-babel-R-assign-elisp): Strip text properties from strings. Before this change, babel would try to format propertized strings using elisp read syntax. The upshot is that evaluating the following code block would give an error (in R, not emacs), since the “bar” in foo-ex gets text properties via font lock: | #+name: foo-ex | #+begin_example | bar | #+end_example | | #+name: foo | #+begin_src R :var foo=foo-ex | foo | #+end_src --- lisp/ob-R.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-R.el b/lisp/ob-R.el index f2bdb1f9d..9f4eb4b13 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -242,7 +242,7 @@ This function is called by `org-babel-execute-src-block'." name file header row-names max)))) (cond ((integerp value) (format "%s <- %s" name (concat (number-to-string value) "L"))) ((floatp value) (format "%s <- %s" name value)) - ((stringp value) (format "%s <- %S" name value)) + ((stringp value) (format "%s <- %S" name (org-no-properties value))) (t (format "%s <- %S" name (prin1-to-string value))))))