emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Berry <ccberry@ucsd.edu>
To: emacs-orgmode@gnu.org
Subject: Re: asynchronous code evaluation
Date: Wed, 4 Sep 2013 16:08:25 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130904T173929-375@post.gmane.org> (raw)
In-Reply-To: CABxYo6otahfczTtxFyPbAESFSdp0GZeYZ_ngmhwGUCv3J9B4ug@mail.gmail.com

Johannes Rainer <johannes.rainer <at> 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.

  parent reply	other threads:[~2013-09-04 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04  5:27 asynchronous code evaluation Johannes Rainer
2013-09-04  8:00 ` Suvayu Ali
2013-09-04 13:23   ` Johannes Rainer
2013-09-04 15:25     ` Suvayu Ali
2013-09-04 16:59     ` Allen S. Rout
2013-09-04 19:20     ` Brett Viren
2013-09-04 16:08 ` Charles Berry [this message]
2013-09-06 17:54 ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130904T173929-375@post.gmane.org \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).