emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Erik Garrison <erik.garrison@gmail.com>
Cc: emacs-orgmode@gnu.org, Eric Schulte <eric.schulte@gmx.com>
Subject: Re: babel, executing code in background process
Date: Thu, 01 Mar 2012 22:09:46 -0700	[thread overview]
Message-ID: <87zkbzoag5.fsf@gmx.com> (raw)
In-Reply-To: <CALykB6nikb1hQ6py62a=-YLULuH=iBRPqnOkQ=t7MWFqZO-DzA@mail.gmail.com> (Erik Garrison's message of "Wed, 29 Feb 2012 21:43:44 -0500")

Erik Garrison <erik.garrison@gmail.com> writes:

> Hi Eric,
> Thanks for the background.  It looks like ob-screen may be very limited in
> that it doesn't
> It seems to me that a decent method would behave similarly to the way to
> "M-x compile" works--- another buffer opens in which the compilation
> progresses.  Is there any reason why this might not be applicable to the
> way babel works?

The approach you describe above (a process buffer with a filter) would
be one viable approach, perhaps even something as simple as using
`async-shell-command' would be workable.  One place to start looking
would be in ob-eval.el for external evaluation and ob-comint for session
based evaluation.

The trick would be in setting up the post-execution code block handling
(namely results parsing and insertion) to run after external evaluation
has completed.

If anyone wants to look into the code and write/propose a way forward
I'm happy to help in any way I can.


> Erik
> On Wed, Feb 29, 2012 at 5:55 PM, Eric Schulte <eric.schulte@gmx.com> wrote:
>> Hi Erik,
>> Currently there is not (to my knowledge) any support for asynchronous
>> code block evaluation.  The one possible exception could be ob-screen
>> which I mention only because I don't really know anything about it.
>> This would certainly be a worthwhile feature to add to Org-mode code
>> blocks, however a good implementation (easy to use, robust and
>> cross-language) will be non-trivial to implement.
>> Best,
>> Erik Garrison <erik.garrison@gmail.com> writes:
>> > Hi,
>> >
>> > I'm just starting to use org-mode and babel to structure exploratory data
>> > analysis which I do for my work.
>> >
>> > One issue that I've run into is that many of the queries I have to issue
>> > will take a very long time to complete.
>> >
>> > Is there any method I could use to execute them in a background process?
>> >
>> > Thanks,
>> > Erik
>> --
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/

Eric Schulte

  reply	other threads:[~2012-03-02  5:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 20:28 babel, executing code in background process Erik Garrison
2012-02-29 22:55 ` Eric Schulte
2012-03-01  2:43   ` Erik Garrison
2012-03-02  5:09     ` Eric Schulte [this message]
2012-03-05  9:33       ` Yu

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:

  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=87zkbzoag5.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=erik.garrison@gmail.com \


* 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


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).