From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: R code block produces only partial output Date: Tue, 5 Aug 2014 14:11:35 -0500 Message-ID: References: <87iom8zd24.fsf@gmail.com> <877g2oz9gv.fsf@gmail.com> <87lhr27oap.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEk94-00086u-Ad for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 15:11:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEk93-0002KF-3U for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 15:11:38 -0400 Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]:38811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEk92-0002JT-SC for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 15:11:37 -0400 Received: by mail-lb0-f170.google.com with SMTP id w7so1102663lbi.1 for ; Tue, 05 Aug 2014 12:11:35 -0700 (PDT) In-Reply-To: <87lhr27oap.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode , Charles Berry On Tue, Aug 5, 2014 at 2:02 PM, Eric Schulte wrote: > Charles Berry writes: > >> Eric Schulte gmail.com> writes: [snip] >> Eric, >> >> As noted by Andreas and John this is a problem for session output. >> >> 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 "\\." ? >> > > I don't know. I'm not sure either, but was curious if someone could translate the regex into "plain language." Maybe I could observe some typical outputs and chime in since I use R regularly? From noob-level regex stuff, it's looking for a new line followed by some number of spaces, a ">" and at least one period and numbers? If I'm recalling correctly, I also noticed that babel spit out the output from loading the rms package on the first run with :session, but I don't think it did it with non-session. I'll have to try that again to be sure. Re-running the block removed the package load message. John > > The Babel R support needs a dedicated maintainer. This was a role Dan > Davison originally filled. I've partially filled in since, but as a > *very* light R user I'm not the best person. > >> >> HTH, >> >> Chuck >> >> > > -- > Eric Schulte > https://cs.unm.edu/~eschulte > PGP: 0x614CA05D (see https://u.fsf.org/yw) >