From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: babel, executing code in background process Date: Thu, 01 Mar 2012 22:09:46 -0700 Message-ID: <87zkbzoag5.fsf@gmx.com> References: <87booh1c7l.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3Kkh-0001bY-17 for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 00:10:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3Kke-0000f0-RN for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 00:09:58 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:50637) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S3Kke-0000ek-JV for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 00:09:56 -0500 In-Reply-To: (Erik Garrison's message of "Wed, 29 Feb 2012 21:43:44 -0500") 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: Erik Garrison Cc: emacs-orgmode@gnu.org, Eric Schulte Erik Garrison 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 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 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/