From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: R code block produces only partial output Date: Thu, 7 Aug 2014 11:42:29 -0700 Message-ID: References: <87iom8zd24.fsf@gmail.com> <877g2oz9gv.fsf@gmail.com> <87lhr27oap.fsf@gmail.com> <87r40uwavs.fsf@gmail.com> <8761i5kg8f.fsf@gmail.com> <87ppgcrg8n.fsf@gmail.com> <87lhr0qimr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1500551741-1407436950=:348" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFSeL-000112-La for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 14:43:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFSeE-00047z-Qu for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 14:42:53 -0400 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:6684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFSeE-00046V-CW for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 14:42:46 -0400 In-Reply-To: <87lhr0qimr.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: Aaron Ecay Cc: emacs-orgmode@gnu.org, Eric Schulte This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1500551741-1407436950=:348 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Thu, 7 Aug 2014, Aaron Ecay wrote: > Hi Chuck, > > Thanks for your feedback. > > 2014ko abuztuak 7an, "Charles C. Berry"-ek idatzi zuen: >> Hi Aaron, >> >> I like what you are trying to do, but ... >> >> 1) The change has at least one bug: Remote sessions are broken by this >> change. >> >> 2) The behavior of :results output is modified in ways that might not be >> desired. i.e. warnings and errors will not show up in the output. >> [snip issue 1 discussion] >> >> Issue 2) =========== >> >> ECM: >> >> #+NAME: aa >> #+BEGIN_SRC R :session R2 :results output >> warning("this is a warning") >> 1+1 >> #+END_SRC >> >> #+RESULTS: aa >> : [1] 2 >> >> For some purposes having the warnings in the #+RESULTS: block is helpful. >> >> And when revising code, having the errors in the #+RESULTS helps - >> especially if I have to put aside work in progress. > > Hmm. Certainly, the previous behavior should be retained for now. In > the longer term, I’d like to see a system whereby R errors trigger elisp > errors. This is so that the execution of a whole document (subtree, > etc.) will be halted by the first error, rather than continuing what may > be a long series of commands that will not give valid output. What do > you think? > I need a while to sort through this. stop(), warning(), and message() will print to the session but not show up in what capture.output retains. sink() has the ability to capture those things, but there is added baggage. I fear some study of ?conditions is needed. My knowledge of condition handling in R is scant. As for stopping on error, I think that anything that changes current behavior at this late date ought to be configurable. FWIW, when I export documents, I sometimes get innocuous errors that I am happy did not stop the run in its tracks - like formatting one table fails with an error but all else went through. And sometimes I wish it had stopped. Best, Chuck --0-1500551741-1407436950=:348--