From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: ob-clojure: possible to display results as soon as something is written to STDOUT? Date: Wed, 6 Apr 2016 08:10:23 -0400 Message-ID: <5704FCAF.2060801@fgiasson.com> References: <56FABF0C.5030808@fgiasson.com> <87mvpgnun2.fsf@ucl.ac.uk> <56FBC0EA.6080000@fgiasson.com> <56FBDDB4.90904@fgiasson.com> <56FBE840.8080700@fgiasson.com> <5703C0FE.1060206@fgiasson.com> <87vb3vdtxd.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anmHk-0003Xu-85 for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:10:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anmHg-00080S-VN for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:10:12 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:53181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anmHg-000809-SX for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:10:08 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1anmHe-003WIX-FY for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:10:06 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:63763 helo=[192.168.0.13]) by s052.panelboxmanager.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1anmHe-003WIG-71 for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:10:06 -0400 In-Reply-To: <87vb3vdtxd.fsf@nicolasgoaziou.fr> 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: emacs-orgmode@gnu.org Hi Nicolas, >> Here is a blog post that explains the changes I did. I still have one >> improvement to do (but don't how it could be done or even if it can be >> done) which is explained at the end of the post: >> >> http://fgiasson.com/blog/index.php/2016/04/05/using-clojure-in-org-mode-and-implementing-asynchronous-processing/ >> >> Thanks for your help, it is now working the way I need it to. > This looks interesting. Thank you for sharing your result. > > Org Babel would benefit from a generic asynchronous execution mechanism. > See for example . Indeed, it would be interesting to generalize such a generic mechanism directly in Babel, and not in each OB plugins. However, I am not sure neither how generic such a solution could be, and what would still be required to implement in each OB plugin. My (very little) experience so far is the Python prototype that John wrote, and then my analysis of the Clojure OB plugin. As I was explaining in this blog post, things are quite different between the two. In Python, it appears that one has to run a sub-process, in Clojure this is not necessary since we benefit the nREPL that handle that. So far, the best idea about how to present async process I think is what John was proposing with the new window. Otherwise I still wonder about having a real background process for this thing to run such that one can continue to write things in the Org buffer while a code block is running in background. But as I explained, I will have to seriously look into Elisp in order to assess the full scope of such a task. > So, if anyone feels like discussing the details of an implementation of > such a thing, please chime in. So far this is the only thing I have to say about that. In mean time I will fix my other patch, and then I will submit another one for this async feature (which will probably require much more review from your part). Thanks, Fred