emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Johannes Rainer <johannes.rainer@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: asynchronous code evaluation
Date: Fri, 06 Sep 2013 11:54:56 -0600	[thread overview]
Message-ID: <87a9jpq1hr.fsf@gmail.com> (raw)
In-Reply-To: <CABxYo6otahfczTtxFyPbAESFSdp0GZeYZ_ngmhwGUCv3J9B4ug@mail.gmail.com> (Johannes Rainer's message of "Wed, 4 Sep 2013 07:27:01 +0200")

Johannes Rainer <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?
>

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?

Best,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D

      parent reply	other threads:[~2013-09-06 17:54 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
2013-09-06 17:54 ` Eric Schulte [this message]

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=87a9jpq1hr.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=johannes.rainer@gmail.com \
    /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).