emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Interweaveing code and results with :session


From: Eric Schulte
Subject: Re: [O] Interweaveing code and results with :session
Date: Sun, 19 Aug 2012 17:40:01 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Ista Zahn <address@hidden> writes:

> Hi,
>
> I would like to interweave multi-line R code and results, like this:
>
> #+begin_src R :results output
> 2+2
> 3+3
> #+end_src
>
> #+results:
> : > 2+2
> : [1] 4
> : > 3+3
> : [1] 6
>
> while using R :session. The solution posted at
> http://lists.gnu.org/archive/html/emacs-orgmode/2010-08/msg00785.html
> is to set
>
> #+begin_src emacs-lisp
> (setq org-babel-R-command "R --silent --no-save")
> #+end_src
>
> This works, but only if session is not being used. For example:
>
> --8<---------------cut here---------------start------------->8---
> #+begin_src emacs-lisp
> (setq org-babel-R-command "R --silent --no-save")
> #+end_src
>
> #+results:
> : R --silent --no-save
>
> This works as desired:
> #+begin_src R :results output
> 2+2
> 3+3
> #+end_src
>
> #+RESULTS:
> : > 2+2
> : [1] 4
> : > 3+3
> : [1] 6
> : >
>
> Does not interweave code and results when using :session:
> #+begin_src R :results output :session *R*
> 2+2
> 3+3
> #+end_src
>
> #+results:
> : [1] 4
> : [1] 6
> --8<---------------cut here---------------end--------------->8---
>
> Is there a way to get this interweaved output while using :session?
>

Unfortunately I do not believe this is currently possible, however it
shouldn't be hard to implement for someone familiar with ob-R.el.

Best,

>
> Thanks!
> Ista
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

[Prev in Thread] Current Thread [Next in Thread]