emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] babel, executing code in background process


From: Eric Schulte
Subject: Re: [O] babel, executing code in background process
Date: Thu, 01 Mar 2012 22:09:46 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Erik Garrison <address@hidden> 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.

Cheers,

>
> Erik
>
> On Wed, Feb 29, 2012 at 5:55 PM, Eric Schulte <address@hidden> 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 <address@hidden> 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
http://cs.unm.edu/~eschulte/



reply via email to

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