From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cook, Malcolm" Subject: Re: BUG: emacs orgmode ob-R.el function org-babel-R-evaluate-session over aggressively performs "; ; cleanup extra prompts left in output" and a possible workaround Date: Thu, 1 Oct 2015 23:15:03 +0000 Message-ID: <2a1b8832412e49b7a0a4d231c3e289cf@exchsrv2.sgc.loc> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhnQC-0002dx-7D for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 19:37:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhnQ7-0006ap-5n for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 19:37:56 -0400 Received: from smtp01.stowers.org ([40.141.174.61]:45298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhnQ6-0006ak-Vh for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 19:37:51 -0400 In-Reply-To: Content-Language: en-US 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 C. Berry'" Cc: "emacs-orgmode@gnu.org" > > I am not sure what the best solution is, but, in my hands using > > Org-mode version 8.3.2-elpa org-20150929 the reg-expt used to "cleanup > > extra prompts left in output" is over-aggressive and will trim session > > :output at lines consisting exclusively of blanks and periods such as > > produced when printing a BioConductor 'Views' object which wants to > > appear as >=20 > I'd try (for example): >=20 > #+BEGIN_SRC R :results value raw drawer :session > require(GenomicRanges) > capture.output(show(GRanges(seqnames=3Drep("a",100), > IRanges(start=3D1:100,width=3D1),strand=3Drep("*",100)))) > #+END_SRC Thanks for the thought, but, I'm trying to engage in "literate programming"= for which in my opinion I should not have to re-write my code (using captu= re.output and show) to get the output of evaluation captured. We're I to sweave my code I would get all this un-wanted cruft. I think org-bable-R-evaluate-FOO should be handling all this for us. > rather than messing with the regexp. Hmm.... not sure I understand your preference here. I'm providing an exam= ple of some that should "just work", but does not. I too prefer not to me= ss with the regexp other than to identify it as the source of the issue. P= erhaps the "real solution" is to recode org-bable-R-evaluate-FOO. > > I offer as a possible workaround the following: > > > > So far, I have had good success having removed provision for allowing > leading whitespace by changing the regexp org-babel-R-evaluate-session > from > > "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" > > to > > "^\\([>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" > > > > But I don't know all the test cases so, YMMV.... >=20 > Just guessing that the things that `(setq ess-eval-visibly nil)' generat= es (e.g., + > + + + + > ) won't behave using your version. >=20 In fact it does behave. I tried it. I think that ess-eval-visibly effects= how ob-R interacts with the ess session. > HTH, I wish it did.... ;) Thanks for your efforts. >=20 > Chuck