From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: long running processes Date: Wed, 18 Nov 2015 17:55:19 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzBdO-0005K7-2O for emacs-orgmode@gnu.org; Wed, 18 Nov 2015 17:55:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzBdK-000416-QM for emacs-orgmode@gnu.org; Wed, 18 Nov 2015 17:55:25 -0500 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:36059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzBdK-00040Z-L7 for emacs-orgmode@gnu.org; Wed, 18 Nov 2015 17:55:22 -0500 Received: by qgad10 with SMTP id d10so40075391qga.3 for ; Wed, 18 Nov 2015 14:55:21 -0800 (PST) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tom Cc: emacs-orgmode@gnu.org 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