From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Kiermeier Subject: Re: R code block produces only partial output Date: Wed, 6 Aug 2014 10:41:34 +0930 Message-ID: References: <87iom8zd24.fsf@gmail.com> <877g2oz9gv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113a7f76aabef104ffeba9ae Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEpm6-0001K7-2v for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 21:12:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEpm4-00041D-Qk for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 21:12:18 -0400 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:47482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEpm4-0003zX-Kd for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 21:12:16 -0400 Received: by mail-qg0-f47.google.com with SMTP id i50so1951513qgf.20 for ; Tue, 05 Aug 2014 18:12:15 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Charles Berry Cc: emacs-orgmode@gnu.org --001a113a7f76aabef104ffeba9ae Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =E2=80=8B On 6 August 2014 03:35, Charles Berry wrote: =E2=80=8B[snip]=E2=80=8B > org-babel-R-evaluate-session uses > > (string-match "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) > > to find the start of R output in the session. > > This does not match the ` 0', but matches the ` .6' > in the output you show above, so if that had been in a session, all the > output up to and including the '.' before the '6' would be clipped > by the following > > (substring line (match-end 1)) > > > as Andreas output showed. > > Deleting the "\\." fixes Andreas case, but what are the circumstances > requiring the "\\." ? > =E2=80=8B =E2=80=8B Thanks Charles for finding this. I do use R quite a bit, and I can only think of "> =E2=80=8B =E2=80=8B " (at beginning of the line) as the command prompt, along with "+ =E2=80=8B =E2=80=8B " (at beginning of the line) as a continuation prompt for multi-line commands. I don't know what =E2=80=8B =E2=80=8B "\" or =E2=80=8B =E2=80=8B "." provide =E2=80=8B (I don't think this has changed over the various R versions)=E2= =80=8B =E2=80=8B. =E2=80=8BA =E2=80=8B complication might be that the user can change the command prompt (and continuation prompt) to something else they like ( =E2=80=8Bsee here: =E2=80=8B http://cran.r-project.org/doc/manuals/r-release/R-intro.html#Customizing-th= e-environment =E2=80=8B)=E2=80=8B. =E2=80=8BFor the time being I've taken the "\\." out of my local version of= ob-R.el (then byte compiled and loaded) and it seems to work fine. =E2=80=8BMaybe this is a question for the ESS developers who use R extensiv= ely and probably might be able to provide some more definitive guidance on this than I can? =E2=80=8BThanks, Andreas=E2=80=8B --001a113a7f76aabef104ffeba9ae Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
=E2=80=8B
On= 6 August 2014 03:35, Charles Berry <ccberry@ucsd.edu> wrote:=
=E2=80=8B[snip]=E2=80=8B
org-babel-R-evaluate-session uses

=C2=A0(string-match "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)&quo= t; line)

to find the start of R output in the session.

This does not match the ` =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00', but mat= ches the ` =C2=A0 =C2=A0 =C2=A0 =C2=A0 .6'
in the output you show above, so if that had been in a session, all the
output up to and including the '.' before the '6' would be = clipped
by the following

=C2=A0 (substring line (match-end 1))


as Andreas output showed.

Deleting the "\\." fixes Andreas case, but what are the circumsta= nces
requiring the =C2=A0"\\." ?
=C2=A0
=E2=80= =8B
=E2=80=8B
Thanks Charles for finding= this.

I do use R quite a bit, and I can only thi= nk of ">
=E2=80=8B =E2=80=8B
" (at beginning of the line) as the command p= rompt, along with "+
=E2=80=8B= =E2=80=8B
" (at beginning of the line) as a continuation prompt = for multi-line commands. I don't know what
=C2=A0=E2=80=8B =E2=80=8B
"\" or
=E2=80=8B =E2=80=8B
"." provide
=E2=80=8B (I don't think this has changed over the various R versions)= =E2=80=8B
=C2=A0
=E2=80=8B.
=E2=80=8BA =E2=80=8B
complication might be that the user can change th= e command prompt (and continuation prompt) to something else they like ( =C2=A0=E2=80=8Bsee here: =E2=80=8B
http://cran.r-project.org/doc/manuals/r-release/R-intro.html#Custo= mizing-the-environment
=C2=A0=E2=80=8B)=E2=80=8B.

=E2=80=8BFor the time being I've taken the "\\." out of my lo= cal version of ob-R.el (then byte compiled and loaded) and it seems to work= fine.

=E2=80=8BMaybe this is a question for the ESS deve= lopers who use R extensively and probably might be able to provide some mor= e definitive guidance on this than I can?

=E2=80=8BThanks,

Andreas=E2=80=8B

--001a113a7f76aabef104ffeba9ae--