emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: kuangdash <kuangdash@163.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Suggestion about org-babel: executing source block asynchronously
Date: Sun, 11 Oct 2015 10:12:52 +0200	[thread overview]
Message-ID: <878u79kem3.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <56152A01.3EC491.19053@m12-14.163.com> (kuangdash@163.com's message of "Wed, 7 Oct 2015 22:19:29 +0800")

Hello,

kuangdash <kuangdash@163.com> writes:

> Sometime I will run source block (such as python) which take a long time before I  get the final result.
> Then I thought about whether or not the source block can be executed asynchronously, and the answer is ‘YES’.
> But it seems to be difficult for me to hack the code, so I just talk about the process of it:
>
> 1)      When execute source block, cover it up with the “executing” overlay.
> 2)      When get the final result, get the “executing” overlay position.
> 3)      Add the result below the “executing” overlay position, and then remove the overly.
>
> It can be done!  How about it?

It could be a start. 

However, "add the result" in not simple, because you need to maintain
a queue in order to insert results back during idle time. Also,
insertion should preserve current window visibility so as to prevent
jumping around.

You may also need to cover the results part of the code block, if any.

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2015-10-11  8:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 14:19 Suggestion about org-babel: executing source block asynchronously kuangdash
2015-10-11  8:12 ` Nicolas Goaziou [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-10-06 20:54 kuangdash

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=878u79kem3.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=kuangdash@163.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).