From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: ob-R ignores ess-eval-visibly? Date: Wed, 09 Sep 2015 20:30:18 +0100 Message-ID: <87oahbbdbp.fsf@gmail.com> References: <87mvx2zm1g.fsf@tamas.ihs.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZl5U-0007v9-Ue for emacs-orgmode@gnu.org; Wed, 09 Sep 2015 15:31:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZl5P-00026X-Uy for emacs-orgmode@gnu.org; Wed, 09 Sep 2015 15:31:20 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:34800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZl5P-00026N-OO for emacs-orgmode@gnu.org; Wed, 09 Sep 2015 15:31:15 -0400 Received: by wicfx3 with SMTP id fx3so3195038wic.1 for ; Wed, 09 Sep 2015 12:30:30 -0700 (PDT) In-Reply-To: <87mvx2zm1g.fsf@tamas.ihs.ac.at> 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: Tamas Papp , emacs-orgmode@gnu.org Hi Tamas, 2015ko irailak 4an, Tamas Papp-ek idatzi zuen: >=20 > Hi, >=20 > I prefer ESS not to wait for results of evaluating R code, especially if > it takes a longer time (eg estimating a model in RStan, 1-2 minutes), so > I have >=20 > (setq ess-eval-visibly 'nowait) >=20 > But I find that ob-R ignores this, eg evaluating >=20 > #+BEGIN_SRC R :results none > Sys.sleep(10) > #+END_SRC >=20 > I looked at the source and I think I understand why this is: the results > need to be inserted into the buffer. However, could there be an > exception for :results none, when they are not needed? Then I could put > code which takes a long time into these blocks, and they would not block > my Emacs. I think this suggestion will not deal well with the following cases: 1. :cache =E2=80=93 the code block hash in the #+results line needs to be updated. For correctness, this should only be done after the block has finished execution 2. :session =E2=80=93 the long-running code block will block the session subprocess, so that any further code blocks executed in the document will block The remaining cases (:results none :cache no :session no) pick out a very specific set of circumstances, and I=E2=80=99m not sure it would be worth t= he additional complexity (conceptually and implementationally) to support it. For example, it would probably entail changing all backends, in addition to core babel code, since the current backend API contains just one function to evaluate-wait-and-return-result. OTOH it might be possible to add an async evaluation facility to babel, with an explicit enabling condition (:async yes) and corresponding new function(s) in the backend API, which could be implemented gradually and only where they made sense. But that=E2=80=99s a big project. --=20 Aaron Ecay