* babel, executing code in background process
@ 2012-02-29 20:28 Erik Garrison
2012-02-29 22:55 ` Eric Schulte
0 siblings, 1 reply; 5+ messages in thread
From: Erik Garrison @ 2012-02-29 20:28 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 431 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: babel, executing code in background process
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
0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2012-02-29 22:55 UTC (permalink / raw)
To: Erik Garrison; +Cc: emacs-orgmode
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: babel, executing code in background process
2012-02-29 22:55 ` Eric Schulte
@ 2012-03-01 2:43 ` Erik Garrison
2012-03-02 5:09 ` Eric Schulte
0 siblings, 1 reply; 5+ messages in thread
From: Erik Garrison @ 2012-03-01 2:43 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
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?
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/
>
[-- Attachment #2: Type: text/html, Size: 1998 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: babel, executing code in background process
2012-03-01 2:43 ` Erik Garrison
@ 2012-03-02 5:09 ` Eric Schulte
2012-03-05 9:33 ` Yu
0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2012-03-02 5:09 UTC (permalink / raw)
To: Erik Garrison; +Cc: emacs-orgmode, Eric Schulte
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.
Cheers,
>
> 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
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: babel, executing code in background process
2012-03-02 5:09 ` Eric Schulte
@ 2012-03-05 9:33 ` Yu
0 siblings, 0 replies; 5+ messages in thread
From: Yu @ 2012-03-05 9:33 UTC (permalink / raw)
To: Eric Schulte; +Cc: Erik Garrison, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 3174 bytes --]
Hello!
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.
I don't think this is a high priority necessarily. When executing e.g.
gnuplot or octave source code blocks for the sake of plotting, I'm usually
interested in runtime feedback more than collecting the text afterwards.
When doing notebook-Style work, also something like
: #+begin_src octave :session *foo* :results silent
<<asynchronous-header>>
: <<Calculate data>>
: #+end_src
: #+begin_src octave :session *foo* :results value <<synchronous-header>>
: <<Return data>>
: #+end_src
would be possible, though of course no convenient solution. My current
solution for long-running octave scripts isn't any more convenient though:
Define the task as functions and then switch to the session buffer manually
and run those interactively.
kind regards, Yu
2012/3/2 Eric Schulte <eric.schulte@gmx.com>
> 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.
>
> Cheers,
>
> >
> > 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
> http://cs.unm.edu/~eschulte/
>
>
[-- Attachment #2: Type: text/html, Size: 4574 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-05 9:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-03-05 9:33 ` Yu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.