ob-R.el: fix a bug when a :var is propertized text

* 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
This commit is contained in:
Aaron Ecay 2014-08-07 01:46:11 -04:00
parent 6fa58b3cc2
commit d035c14765
1 changed files with 1 additions and 1 deletions

View File

@ -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))))))