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, 30 Mar 2016 10:52:48 -0400 Message-ID: <56FBE840.8080700@fgiasson.com> References: <56FABF0C.5030808@fgiasson.com> <87mvpgnun2.fsf@ucl.ac.uk> <56FBC0EA.6080000@fgiasson.com> <56FBDDB4.90904@fgiasson.com> 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]:51445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alHUJ-00014T-KD for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 10:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alHUG-0003VB-A9 for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 10:52:51 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:50639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alHUG-0003V2-5r for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 10:52:48 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1alHUD-0005WP-Oe for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 10:52:45 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:53255 helo=[192.168.0.13]) by s052.panelboxmanager.com with esmtpsa (TLSv1.2:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.86_1) (envelope-from ) id 1alHUD-0005WD-G7 for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 10:52:45 -0400 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: emacs-orgmode@gnu.org Hi John, > you should rename it org-babel-async-execute:clojure, and adapt it to > run clojure. Yes > I wrote the function in the org-file that is that post, and executed the > code block (C-c C-c) which "registers" the function for that instance of > emacs. I am not sure I understand here. Once you execute the elisp block with that function, the function becomes defined for that instance. But when you execute your other block, the example python block using C-c C-c, how does org-mode knows to use "org-babel-async-execute:python" instead of "org-babel-execute:python"?? You put the cursor in the block, and then call it using M-x? > Later you could put it in an init file that is loaded when Emacs starts. > > and use M-x to call it. Once I added an :async option to the header args > to make C-c C-c execute it, but until it works the way you want with M-x > that is just convenience ;) Yes, this is that :async option that would be great and necessary once it works using M-x :) How can this be done? (Is there an extension mechanism in org-mode for that, or it needs to hack the core code?) Thanks, Fred