emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Tom <tmbdev@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: long running processes
Date: Wed, 18 Nov 2015 17:55:19 -0500	[thread overview]
Message-ID: <m2lh9uyl2g.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <CABdbsnCDVT4T-0Oji4r5va1yLOZNOdL3guAEqxmuBHB-b7Tdpw@mail.gmail.com>

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	other threads:[~2015-11-18 22:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 20:04 long running processes Tom
2015-11-18 22:55 ` John Kitchin [this message]
2015-11-18 23:31   ` Tom
2015-11-19 13:38     ` John Kitchin
2015-11-19 17:10       ` Tom

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=m2lh9uyl2g.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=tmbdev@gmail.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).