Charles Berry <ccbe...@ucsd.edu> writes:

> Hmmm. Maybe the bug that was fixed by commit
>
>  0fd29a5ee7d14c3695b22998196373b9a3637413
>
> about two weeks back? Make sure ob-R.el is up to date and compiled (or
> that ob-R.elc is deleted).
>
>
> Anyway, your code works as expected for me - first time.
>
> ---
>
> FWIW, I prefer to use :var headers to import strings, but it takes some
> setup:
>
>
>
> #+BEGIN_SRC emacs-lisp
>   (defun grab-src (name)
>     (save-excursion
>       (org-babel-goto-named-src-block name)
>       (nth 1 (org-babel-get-src-block-info 'light))))
> #+END_SRC
>
> #+BEGIN_SRC R :var y=(grab-src "sqlsource") :results output :exports both
>   y
> #+END_SRC
>
> #+RESULTS:
> : [1] "select \n  * \nfrom \n  t \nlimit \n  10"
>

In fact M-x R before evaluation did fix things.  I will try to get the
org source going, which contains the fix.  Otherwise, I might be content
to wait for the fix to make its way into org ELPA.  (I'm on .emacs
complexity overload)

Great idea about the grab-src function! Worked like a charm.

Thanks again,
Eric

Reply via email to