From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: ob-clojure: possible to display results as soon as something is written to STDOUT? Date: Wed, 06 Apr 2016 14:44:52 +0200 Message-ID: <87d1q2dhyz.fsf@nicolasgoaziou.fr> 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> <5704FCAF.2060801@fgiasson.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anmnD-0000TM-VI for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:42:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anmnD-0006JC-2o for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:42:43 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:50300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anmnC-0006Ia-TH for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:42:43 -0400 In-Reply-To: <5704FCAF.2060801@fgiasson.com> (Frederick Giasson's message of "Wed, 6 Apr 2016 08:10:23 -0400") 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: Frederick Giasson Cc: emacs-orgmode@gnu.org Hello, Frederick Giasson writes: > 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. The link I gave is a first approximation of the generic behaviour. Basically, we could spawn a new Emacs process which could then evaluation the block synchronously. One difficulty is to grab the "closure" of the block. Another one is to collect and insert the results back into the buffer without being disruptive. The thread above gave hints about that second point. Regards, -- Nicolas Goaziou