diff options
author | Aaron Ecay <aaronecay@gmail.com> | 2014-08-07 01:46:11 -0400 |
---|---|---|
committer | Aaron Ecay <aaronecay@gmail.com> | 2014-08-07 01:54:23 -0400 |
commit | d035c1476537ca93594bf07ed2faebca2dafade3 (patch) | |
tree | 1d5118c95c9cb11cf62dd7cfc54f096ac2ff8a64 | |
parent | 6fa58b3cc2e1287c895e5fb06a3b5acaf5de3c89 (diff) | |
download | org-mode-d035c1476537ca93594bf07ed2faebca2dafade3.tar.gz |
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
-rw-r--r-- | lisp/ob-R.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob-R.el b/lisp/ob-R.el index f2bdb1f..9f4eb4b 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)))))) |