From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: asynchronous code evaluation Date: Wed, 4 Sep 2013 16:08:25 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHFdT-0007ua-Lf for emacs-orgmode@gnu.org; Wed, 04 Sep 2013 12:08:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHFdL-0006O2-SV for emacs-orgmode@gnu.org; Wed, 04 Sep 2013 12:08:51 -0400 Received: from plane.gmane.org ([80.91.229.3]:44392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHFdL-0006Nn-LU for emacs-orgmode@gnu.org; Wed, 04 Sep 2013 12:08:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VHFdK-0003ay-54 for emacs-orgmode@gnu.org; Wed, 04 Sep 2013 18:08:42 +0200 Received: from 137.110.33.128 ([137.110.33.128]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Sep 2013 18:08:42 +0200 Received: from ccberry by 137.110.33.128 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Sep 2013 18:08:42 +0200 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: emacs-orgmode@gnu.org Johannes Rainer gmail.com> writes: > > > hi all! > > I have some pretty calculation intense R code in a code block and when I > execute the code (C-c C-c) my emacs freezes and waits for the code to > finish. Is there a way to evaluate the code asynchronously, so that I > could edit the file (obviously not the code block itself) while the code > is being evaluated? > > thanks, jo > Try this: C-c ' in the R src block. Then use C-c C-c (ess-eval-region-or-function-or-paragraph-and-step) to execute the long running code from the ESS edit buffer. You may need to select the region if there are several paragraphs, or delete any blank lines. == Another alternative is to use ravel. https://github.com/chasberry/orgmode-accessories Create a knitr or Sweave doc from the org doc or a suitable subtree of the computationally intensive parts. Then you can knit() the doc from the R session and switch back to the buffer you want to edit. Also, you might want to turn on caching in the knitr doc to enable a quick restart when you log in again.