emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] long running processes


From: John Kitchin
Subject: Re: [O] long running processes
Date: Wed, 18 Nov 2015 17:55:19 -0500
User-agent: mu4e 0.9.13; emacs 25.0.50.1

I am pretty sure this is not directly possible right now.

Some approaches that resemble it could be:
1. write a src block that will be tangled to a script.
2. tangle the block
3. Run the script in a shell src block with an & so it runs
non-blocking.

or, use an elisp block like:

(org-babel-tangle)
(async-shell-command "your script" some-output-buffer)

I don't know a way to get continuous updated output in an org-buffer
though.

I do things like this by making code blocks that submit scripts to a
queue system if needed, and then raising an exception. If not needed,
the scripts read data files and return the answer I want.

You might find a way to use the async module
(https://github.com/jwiegley/emacs-async) to achieve something like this
too but I suspect it still involves tangling, or calling the named block 
asynchronously.

Tom writes:

> When I run Python code in a session from Org mode and the execution takes a
> while, the cursor changes to a wait cursor. In addition, the session window
> doesn't display any intermediate output until the execution has finished.
>
> Is there any way of changing this behavior? I would like to start
> long-running functions from within org-mode and see the progress of the
> computation as it happens.
>
> Tom

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



reply via email to

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