[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] asynchronous code evaluation

From: Eric Schulte
Subject: Re: [O] asynchronous code evaluation
Date: Fri, 06 Sep 2013 11:54:56 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Johannes Rainer <address@hidden> 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?

Hi Jo,

This is not currently possible, but it would certainly be a nice feature
and is something that has been requested before.

This would require some general Org-mode support before any language
specific code is written (ideally no language specific code would be
required).  For anyone who feels like tackling such a project the first
step would be to look at `org-babel-comint-with-output' and
`org-babel-eval'.  I'm not sure what the best way is to wait until the
external process returns to handle the code block results, I'd guess
we'd either want to pass closures to those functions, or somehow yield
while the external process runs.

Some careful thought of the ramifications of asynchronous code block
evaluation may be required.  E.g., would every piece of code which calls
a code block (from "C-c C-c" to :var resolution) need to be updated to
call the code block in an asynchronous manner?


Eric Schulte
PGP: 0x614CA05D

reply via email to

[Prev in Thread] Current Thread [Next in Thread]