From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: [PATCH] expose nrepl's timeout setting in ob-clojure.el Date: Tue, 29 Mar 2016 13:38:22 -0400 Message-ID: <56FABD8E.2000705@fgiasson.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060509030005010609060405" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akxb3-00079D-Db for emacs-orgmode@gnu.org; Tue, 29 Mar 2016 13:38:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akxaz-0005uL-8n for emacs-orgmode@gnu.org; Tue, 29 Mar 2016 13:38:29 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:43189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akxaz-0005tH-3d for emacs-orgmode@gnu.org; Tue, 29 Mar 2016 13:38:25 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1akxau-003ecy-PU for emacs-orgmode@gnu.org; Tue, 29 Mar 2016 13:38:21 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:51827 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 1akxau-003ecR-DU for emacs-orgmode@gnu.org; Tue, 29 Mar 2016 13:38:20 -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: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------060509030005010609060405 Content-Type: multipart/alternative; boundary="------------070404000908060804090105" --------------070404000908060804090105 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi everybody, I am starting to use org-mode to create literate applications in Clojure. So far so good, this is a terrific piece of software. One thing why I wanted to use org-mode is to use it to create Clojure Notebooks. The problem I had is that I have many functions that can take some time (more than 10 seconds) to complete. This means that I was often receiving that error from nrepl: =========== nrepl-send-sync-request: Sync nREPL request timed out (op eval session 57bdacff-b178-4952-8bf8-5e01ac9d745a code (def umbel (create-ontology-structure)) =========== The problem is that there is no way to define the nrepl timeout from Org-mode. What I did is to expose that nrepl setting in ob-clojure.el. This is the ob-clojure.el.diff patch I am proposing here. The name of the new setting is "org-babel-clojure-nrepl-timeout". If it is set to /nil/ then no timeout will occur, otherwise any integer will define a timeout value. This variable can be set from the /.emacs/ global setting file. It works fine from here, please modify as required. Thanks, Fred --------------070404000908060804090105 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi everybody,

I am starting to use org-mode to create literate applications in Clojure. So far so good, this is a terrific piece of software.

One thing why I wanted to use org-mode is to use it to create Clojure Notebooks. The problem I had is that I have many functions that can take some time (more than 10 seconds) to complete. This means that I was often receiving that error from nrepl:

===========
nrepl-send-sync-request: Sync nREPL request timed out (op eval session 57bdacff-b178-4952-8bf8-5e01ac9d745a code (def umbel (create-ontology-structure))
===========

The problem is that there is no way to define the nrepl timeout from Org-mode. What I did is to expose that nrepl setting in ob-clojure.el. This is the ob-clojure.el.diff patch I am proposing here.

The name of the new setting is "org-babel-clojure-nrepl-timeout". If it is set to /nil/ then no timeout will occur, otherwise any integer will define a timeout value.

This variable can be set from the /.emacs/ global setting file.

It works fine from here, please modify as required.

Thanks,

Fred
--------------070404000908060804090105-- --------------060509030005010609060405 Content-Type: text/plain; charset=UTF-8; name="ob-clojure.el.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ob-clojure.el.diff" ZGlmZiAtLWdpdCBhL2xpc3Avb2ItY2xvanVyZS5lbCBiL2xpc3Avb2ItY2xvanVyZS5lbA0K aW5kZXggODlhMDlhOS4uNDYwMzFlMSA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NCiAJIChyZXN1bHQtcGFyYW1zIChjZHIgKGFzc29jIDpy ZXN1bHQtcGFyYW1zIHBhcmFtcykpKQ0KIAkgKHByaW50LWxldmVsIG5pbCkgKHByaW50LWxl bmd0aCBuaWwpDQogCSAoYm9keSAob3JnLWJhYmVsLXRyaW0NCkBAIC05NCw4ICs5NSw5IEBA DQogICAgICAgIChsZXQgKChyZXN1bHQtcGFyYW1zIChjZHIgKGFzc29jIDpyZXN1bHQtcGFy YW1zIHBhcmFtcykpKSkNCiAJIChzZXRxIHJlc3VsdA0KIAkgICAgICAgKG5yZXBsLWRpY3Qt Z2V0DQotCQkobnJlcGwtc3luYy1yZXF1ZXN0OmV2YWwNCi0JCSBleHBhbmRlZCAoY2lkZXIt Y3VycmVudC1jb25uZWN0aW9uKSAoY2lkZXItY3VycmVudC1zZXNzaW9uKSkNCisJCShsZXQg KChucmVwbC1zeW5jLXJlcXVlc3QtdGltZW91dCBvcmctYmFiZWwtY2xvanVyZS1ucmVwbC10 aW1lb3V0KSkNCisJCSAgKG5yZXBsLXN5bmMtcmVxdWVzdDpldmFsDQorCQkgICBleHBhbmRl ZCAoY2lkZXItY3VycmVudC1jb25uZWN0aW9uKSAoY2lkZXItY3VycmVudC1zZXNzaW9uKSkp DQogCQkoaWYgKG9yIChtZW1iZXIgIm91dHB1dCIgcmVzdWx0LXBhcmFtcykNCiAJCQkobWVt YmVyICJwcCIgcmVzdWx0LXBhcmFtcykpDQogCQkgICAgIm91dCINCg0Kd2FybmluZzogTEYg d2lsbCBiZSByZXBsYWNlZCBieSBDUkxGIGluIGxpc3Avb2ItY2xvanVyZS5lbC4NClRoZSBm aWxlIHdpbGwgaGF2ZSBpdHMgb3JpZ2luYWwgbGluZSBlbmRpbmdzIGluIHlvdXIgd29ya2lu ZyBkaXJlY3RvcnkuDQo= --------------060509030005010609060405-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] expose nrepl's timeout setting in ob-clojure.el Date: Wed, 06 Apr 2016 11:43:17 +0200 Message-ID: <87twjfcbt6.fsf@nicolasgoaziou.fr> References: <56FABD8E.2000705@fgiasson.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anjxY-0001mN-2H for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 05:41:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anjxU-00012H-3G for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 05:41:11 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:44775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anjxT-000121-T4 for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 05:41:08 -0400 In-Reply-To: <56FABD8E.2000705@fgiasson.com> (Frederick Giasson's message of "Tue, 29 Mar 2016 13:38:22 -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, Thank you for the patch. Frederick Giasson writes: > -;;; ob-clojure.el --- Babel Functions for Clojure -*- lexical-binding: t; -*- > +;;; ob-clojure.el --- org-babel functions for clojure evaluation Your patch reverts a change introduced in development version. Could you rebase it on top of latest Org first? > > ;; Copyright (C) 2009-2016 Free Software Foundation, Inc. > > @@ -55,6 +55,7 @@ > > (defvar org-babel-default-header-args:clojure '()) > (defvar org-babel-header-args:clojure '((package . :any))) > +(defvar org-babel-clojure-nrepl-timeout 10) Would it make sense to turn it into a defcustom instead? If so, this should be added in etc/ORG-NEWS file. Bonus points if Worg documentation about this back-end > > (defcustom org-babel-clojure-backend > (cond ((featurep 'cider) 'cider) > @@ -67,7 +68,7 @@ > > (defun org-babel-expand-body:clojure (body params) > "Expand BODY according to PARAMS, return the expanded body." > - (let* ((vars (org-babel--get-vars params)) > + (let* ((vars (mapcar #'cdr (org-babel-get-header params :var))) You are also reverting a previous change here. > (result-params (cdr (assoc :result-params params))) > (print-level nil) (print-length nil) > (body (org-babel-trim > @@ -94,8 +95,9 @@ > (let ((result-params (cdr (assoc :result-params params)))) > (setq result > (nrepl-dict-get > - (nrepl-sync-request:eval > - expanded (cider-current-connection) (cider-current-session)) > + (let ((nrepl-sync-request-timeout org-babel-clojure-nrepl-timeout)) > + (nrepl-sync-request:eval > + expanded (cider-current-connection) (cider-current-session))) It seems you need to define `nrepl-sync-request-timeout' as a dynamically scoped variable: (defvar nrepl-sync-request-timeout) Indeed "ob-clojure.el" uses lexical binding, even though you disabled it in the first line of your patch ;) Eventually, could you add an appropriate commit message for this patch? Something like ob-clojure: Make REPL timeout configurable * lisp/ob-clojure.el (org-babel-clojure-nrepl-timeout): New variable. (org-babel-expand-body:clojure): Use new variable. ... explanations about the motivation of the change... Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: [PATCH] expose nrepl's timeout setting in ob-clojure.el Date: Wed, 6 Apr 2016 10:48:51 -0400 Message-ID: <570521D3.4030009@fgiasson.com> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060105050200000802080800" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anol6-0000HY-9Z for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 10:48:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anol3-0003NM-2C for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 10:48:40 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:46382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anol2-0003NB-Sy for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 10:48:36 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1anokz-004DFP-WF for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 10:48:34 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:53630 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 1anokz-004DF8-Np for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 10:48:33 -0400 In-Reply-To: <87twjfcbt6.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 This is a multi-part message in MIME format. --------------060105050200000802080800 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi Nicolas! >> -;;; ob-clojure.el --- Babel Functions for Clojure -*- lexical-binding: t; -*- >> +;;; ob-clojure.el --- org-babel functions for clojure evaluation > Your patch reverts a change introduced in development version. Could you > rebase it on top of latest Org first? Yeah sorry, I did this from the latest published version, not master. Fixed now. > >> ;; Copyright (C) 2009-2016 Free Software Foundation, Inc. >> >> @@ -55,6 +55,7 @@ >> >> (defvar org-babel-default-header-args:clojure '()) >> (defvar org-babel-header-args:clojure '((package . :any))) >> +(defvar org-babel-clojure-nrepl-timeout 10) > Would it make sense to turn it into a defcustom instead? If so, this > should be added in etc/ORG-NEWS file. Patch attached. > Bonus points if Worg documentation > about this back-end Patch attached. > >> (defcustom org-babel-clojure-backend >> (cond ((featurep 'cider) 'cider) >> @@ -67,7 +68,7 @@ >> >> (defun org-babel-expand-body:clojure (body params) >> "Expand BODY according to PARAMS, return the expanded body." >> - (let* ((vars (org-babel--get-vars params)) >> + (let* ((vars (mapcar #'cdr (org-babel-get-header params :var))) > You are also reverting a previous change here. Fixed. > >> (result-params (cdr (assoc :result-params params))) >> (print-level nil) (print-length nil) >> (body (org-babel-trim >> @@ -94,8 +95,9 @@ >> (let ((result-params (cdr (assoc :result-params params)))) >> (setq result >> (nrepl-dict-get >> - (nrepl-sync-request:eval >> - expanded (cider-current-connection) (cider-current-session)) >> + (let ((nrepl-sync-request-timeout org-babel-clojure-nrepl-timeout)) >> + (nrepl-sync-request:eval >> + expanded (cider-current-connection) (cider-current-session))) > It seems you need to define `nrepl-sync-request-timeout' as > a dynamically scoped variable: > > (defvar nrepl-sync-request-timeout) > > Indeed "ob-clojure.el" uses lexical binding, even though you disabled it > in the first line of your patch ;) Fixed :) > Eventually, could you add an appropriate commit message for this patch? > Something like > > ob-clojure: Make REPL timeout configurable > > * lisp/ob-clojure.el (org-babel-clojure-nrepl-timeout): New variable. > (org-babel-expand-body:clojure): Use new variable. > > ... explanations about the motivation of the change... Patch attached. Hope everything is good now! Thanks, Fred --------------060105050200000802080800 Content-Type: text/plain; charset=UTF-8; name="0001-Document-the-new-option-ob-clojure-option-org-babel-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Document-the-new-option-ob-clojure-option-org-babel-.pa"; filename*1="tch" >From c8e89d774590e9b39604252b3a344f95b56e3924 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 10:00:18 -0400 Subject: [PATCH] Document the new option ob-clojure option "org-babel-clojure-sync-nrepl-timeout". --- org-contrib/babel/languages/ob-doc-clojure.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/org-contrib/babel/languages/ob-doc-clojure.org b/org-contrib/babel/languages/ob-doc-clojure.org index 72942df..17c0f20 100644 --- a/org-contrib/babel/languages/ob-doc-clojure.org +++ b/org-contrib/babel/languages/ob-doc-clojure.org @@ -90,6 +90,17 @@ Add these lines to your .emacs file to configure CIDER: (require 'cider) #+END_SRC +Optionally you can specify the Cider timeout by setting the =org-babel-clojure-sync-nrepl-timeout= +setting option. The value is in seconds and if set to =nil= then no timeout will occur. + +#+BEGIN_SRC emacs-lisp + ; Disable Cider's timeout + (setq org-babel-clojure-sync-nrepl-timeout nil) + + ; Set the timeout to 20 seconds + (setq org-babel-clojure-sync-nrepl-timeout 20) +#+END_SRC + ** Create a Clojure Project with Leiningen Create a Leiningen project directory tree: -- 1.9.5.msysgit.0 --------------060105050200000802080800 Content-Type: text/plain; charset=UTF-8; name="0001-Update-of-ORG-NEWS-to-mention-the-addition-of-the-ne.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Update-of-ORG-NEWS-to-mention-the-addition-of-the-ne.pa"; filename*1="tch" >From 9a81363719f3078d13de9b971440ee6fd456b4b2 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 10:24:54 -0400 Subject: [PATCH 1/2] Update of ORG-NEWS to mention the addition of the new setting "org-babel-clojure-sync-nrepl-timeout" --- etc/ORG-NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 82d5ad0..e684587 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -106,6 +106,10 @@ becomes : ("pdf" . (lambda (file link) (foo))) ** New features +*** New option =org-babel-clojure-sync-nrepl-timeout= for =org-babel-clojure= +This new option tells the =org-babel-clojure= module the length of the timeout +of a synchronous call to the nREPL. This value is in seconds. If =nil= then +no timeout will occur. *** New org-protocol key=value syntax Org-protocol can now handle query-style parameters such as: -- 1.9.5.msysgit.0 --------------060105050200000802080800 Content-Type: text/plain; charset=UTF-8; name="0002-Addition-of-a-new-customization-variable-called-org-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0002-Addition-of-a-new-customization-variable-called-org-.pa"; filename*1="tch" >From dab6472228d1a0a41831dcae969335d0a7fb7531 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 10:46:35 -0400 Subject: [PATCH 2/2] Addition of a new customization variable called "org-babel-clojure-sync-nrepl-timeout" which expose the Cider timeout setting as a custom variable. The timeout is in second, and if nil is specified and timeout is disabled. With previous version, the timeout was set to 10 seconds, and if you were running a function that was taking more than 10 seconds, then you were getting a nREPL timeout error. This is why it is important to expose that setting to the org-mode users. --- lisp/ob-clojure.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 89a09a9..86f1cff 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -56,6 +56,12 @@ (defvar org-babel-default-header-args:clojure '()) (defvar org-babel-header-args:clojure '((package . :any))) +(defcustom org-babel-clojure-sync-nrepl-timeout 10 + "Timeout value, in seconds, of a Clojure sync call. + If the value is nil, timeout is disabled." + :type 'integer + :group 'org-babel) + (defcustom org-babel-clojure-backend (cond ((featurep 'cider) 'cider) (t 'slime)) @@ -94,8 +100,9 @@ (let ((result-params (cdr (assoc :result-params params)))) (setq result (nrepl-dict-get - (nrepl-sync-request:eval - expanded (cider-current-connection) (cider-current-session)) + (let ((nrepl-sync-request-timeout org-babel-clojure-sync-nrepl-timeout)) + (nrepl-sync-request:eval + expanded (cider-current-connection) (cider-current-session))) (if (or (member "output" result-params) (member "pp" result-params)) "out" -- 1.9.5.msysgit.0 --------------060105050200000802080800-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: [PATCH] new :async feature for org-babel-clojure Date: Wed, 6 Apr 2016 12:27:37 -0400 Message-ID: <570538F9.8030307@fgiasson.com> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000008010704020005050704" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anqIh-0001VS-QI for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 12:27:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anqIb-000674-TZ for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 12:27:27 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:55671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anqIb-00066x-Lo for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 12:27:21 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1anqIZ-000LAT-Sh for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 12:27:20 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:57068 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 1anqIZ-000LAD-LI for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 12:27:19 -0400 In-Reply-To: <87twjfcbt6.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 This is a multi-part message in MIME format. --------------000008010704020005050704 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi, Here is my proposal to create a new :async feature for Org-babel-clojure. This is discussed at length in this blog post: http://fgiasson.com/blog/index.php/2016/04/05/using-clojure-in-org-mode-and-implementing-asynchronous-processing/ I added the commit of the changes, the commit for the ORG-NEWS file and the commit for the Worg documentation. IMPORTANT NOTE: this includes the patches for the new :async feature *AND* the new org-babel-clojure-sync-nrepl-timeout setting (for consistency's sake) Thanks, Fred --------------000008010704020005050704 Content-Type: text/plain; charset=UTF-8; name="0003-Adding-information-about-the-new-org-babel-clojure-a.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0003-Adding-information-about-the-new-org-babel-clojure-a.pa"; filename*1="tch" >From 2fe515d1fb89ba1ea160711d10f2f68fe0287246 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 12:18:21 -0400 Subject: [PATCH 3/4] Adding information about the new org-babel-clojure :async feature. --- etc/ORG-NEWS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e684587..fad0679 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -110,6 +110,15 @@ becomes This new option tells the =org-babel-clojure= module the length of the timeout of a synchronous call to the nREPL. This value is in seconds. If =nil= then no timeout will occur. +*** New code block option =:async= for =org-babel-clojure= +This new option gives the possibility to =org-babel-clojure= user to run +a block code asynchronously using a new code block parameter =:async=. +If =:async= is specified in the code block, then it will be processed +asynchronously by Org-mode. This means that everything that will be +output to the REPL by the code will appear in a new window when it will +be output. Once the processing is finalized, then the window will be closed +and the output will be added to the results section (if =:results output= is +specified). *** New org-protocol key=value syntax Org-protocol can now handle query-style parameters such as: -- 1.9.5.msysgit.0 --------------000008010704020005050704 Content-Type: text/plain; charset=UTF-8; name="0004-Adding-a-new-feature-async-feature-to-org-babel-cloj.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0004-Adding-a-new-feature-async-feature-to-org-babel-cloj.pa"; filename*1="tch" >From e218aaef38f6dc0f9affa516aafa18b77c2a3a1e Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 12:19:11 -0400 Subject: [PATCH 4/4] Adding a new feature :async feature to org-babel-clojure. With this new feature, someone can evaluate Clojure code in Org-mode code blocks asynchronously. --- lisp/ob-clojure.el | 78 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 17 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 86f1cff..6059d7d 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -91,35 +91,79 @@ body))) (defun org-babel-execute:clojure (body params) - "Execute a block of Clojure code with Babel." + "Execute a block of Clojure code with Babel. The block can be executed + synchenously by default or asynchronously with the :async parameter" (let ((expanded (org-babel-expand-body:clojure body params)) + (sbuffer "*Clojure Sub Buffer*") + (async (if (assoc :async params) t nil)) + (response (cons 'dict nil)) + status result) (case org-babel-clojure-backend (cider (require 'cider) (let ((result-params (cdr (assoc :result-params params)))) - (setq result - (nrepl-dict-get - (let ((nrepl-sync-request-timeout org-babel-clojure-sync-nrepl-timeout)) - (nrepl-sync-request:eval - expanded (cider-current-connection) (cider-current-session))) - (if (or (member "output" result-params) - (member "pp" result-params)) - "out" - "value"))))) + ; Check if the user want to run code asynchronously + (when async + ; Create a new window with the async output buffer + (switch-to-buffer-other-window sbuffer) + + ; Run the Clojure code asynchronously in nREPL + (nrepl-request:eval + expanded + (lambda (resp) + (when (member "out" resp) + ; Print the output of the nREPL in the asyn output buffer + (princ (nrepl-dict-get resp "out") (get-buffer sbuffer))) + (nrepl--merge response resp) + ; Update the status of the nREPL output session + (setq status (nrepl-dict-get response "status"))) + (cider-current-connection) + (cider-current-session)) + + ; Wait until the nREPL code finished to be processed + (while (not (member "done" status)) + (nrepl-dict-put response "status" (remove "need-input" status)) + (accept-process-output nil 0.01) + (redisplay)) + + ; Delete the async buffer & window when the processing is finalized + (let ((wins (get-buffer-window-list sbuffer nil t))) + (dolist (win wins) + (delete-window win)) + (kill-buffer sbuffer)) + + ; Put the output or the value in the result section of the code block + (setq result (nrepl-dict-get response + (if (or (member "output" result-params) + (member "pp" result-params)) + "out" + "value")))) + ; Check if user want to run code synchronously + (when (not async) + (setq result + (nrepl-dict-get + (let ((nrepl-sync-request-timeout + org-babel-clojure-sync-nrepl-timeout)) + (nrepl-sync-request:eval + expanded (cider-current-connection) (cider-current-session))) + (if (or (member "output" result-params) + (member "pp" result-params)) + "out" + "value")))))) (slime (require 'slime) (with-temp-buffer - (insert expanded) - (setq result - (slime-eval - `(swank:eval-and-grab-output - ,(buffer-substring-no-properties (point-min) (point-max))) - (cdr (assoc :package params))))))) + (insert expanded) + (setq result + (slime-eval + `(swank:eval-and-grab-output + ,(buffer-substring-no-properties (point-min) (point-max))) + (cdr (assoc :package params))))))) (org-babel-result-cond (cdr (assoc :result-params params)) result (condition-case nil (org-babel-script-escape result) - (error result))))) + (error result))))) (provide 'ob-clojure) -- 1.9.5.msysgit.0 --------------000008010704020005050704 Content-Type: text/plain; charset=UTF-8; name="0001-Update-of-ORG-NEWS-to-mention-the-addition-of-the-ne.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Update-of-ORG-NEWS-to-mention-the-addition-of-the-ne.pa"; filename*1="tch" >From 9a81363719f3078d13de9b971440ee6fd456b4b2 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 10:24:54 -0400 Subject: [PATCH 1/4] Update of ORG-NEWS to mention the addition of the new setting "org-babel-clojure-sync-nrepl-timeout" --- etc/ORG-NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 82d5ad0..e684587 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -106,6 +106,10 @@ becomes : ("pdf" . (lambda (file link) (foo))) ** New features +*** New option =org-babel-clojure-sync-nrepl-timeout= for =org-babel-clojure= +This new option tells the =org-babel-clojure= module the length of the timeout +of a synchronous call to the nREPL. This value is in seconds. If =nil= then +no timeout will occur. *** New org-protocol key=value syntax Org-protocol can now handle query-style parameters such as: -- 1.9.5.msysgit.0 --------------000008010704020005050704 Content-Type: text/plain; charset=UTF-8; name="0002-Addition-of-a-new-customization-variable-called-org-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0002-Addition-of-a-new-customization-variable-called-org-.pa"; filename*1="tch" >From dab6472228d1a0a41831dcae969335d0a7fb7531 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 10:46:35 -0400 Subject: [PATCH 2/4] Addition of a new customization variable called "org-babel-clojure-sync-nrepl-timeout" which expose the Cider timeout setting as a custom variable. The timeout is in second, and if nil is specified and timeout is disabled. With previous version, the timeout was set to 10 seconds, and if you were running a function that was taking more than 10 seconds, then you were getting a nREPL timeout error. This is why it is important to expose that setting to the org-mode users. --- lisp/ob-clojure.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 89a09a9..86f1cff 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -56,6 +56,12 @@ (defvar org-babel-default-header-args:clojure '()) (defvar org-babel-header-args:clojure '((package . :any))) +(defcustom org-babel-clojure-sync-nrepl-timeout 10 + "Timeout value, in seconds, of a Clojure sync call. + If the value is nil, timeout is disabled." + :type 'integer + :group 'org-babel) + (defcustom org-babel-clojure-backend (cond ((featurep 'cider) 'cider) (t 'slime)) @@ -94,8 +100,9 @@ (let ((result-params (cdr (assoc :result-params params)))) (setq result (nrepl-dict-get - (nrepl-sync-request:eval - expanded (cider-current-connection) (cider-current-session)) + (let ((nrepl-sync-request-timeout org-babel-clojure-sync-nrepl-timeout)) + (nrepl-sync-request:eval + expanded (cider-current-connection) (cider-current-session))) (if (or (member "output" result-params) (member "pp" result-params)) "out" -- 1.9.5.msysgit.0 --------------000008010704020005050704 Content-Type: text/plain; charset=UTF-8; name="0001-Document-the-new-option-ob-clojure-option-org-babel-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Document-the-new-option-ob-clojure-option-org-babel-.pa"; filename*1="tch" >From c8e89d774590e9b39604252b3a344f95b56e3924 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 10:00:18 -0400 Subject: [PATCH 1/2] Document the new option ob-clojure option "org-babel-clojure-sync-nrepl-timeout". --- org-contrib/babel/languages/ob-doc-clojure.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/org-contrib/babel/languages/ob-doc-clojure.org b/org-contrib/babel/languages/ob-doc-clojure.org index 72942df..17c0f20 100644 --- a/org-contrib/babel/languages/ob-doc-clojure.org +++ b/org-contrib/babel/languages/ob-doc-clojure.org @@ -90,6 +90,17 @@ Add these lines to your .emacs file to configure CIDER: (require 'cider) #+END_SRC +Optionally you can specify the Cider timeout by setting the =org-babel-clojure-sync-nrepl-timeout= +setting option. The value is in seconds and if set to =nil= then no timeout will occur. + +#+BEGIN_SRC emacs-lisp + ; Disable Cider's timeout + (setq org-babel-clojure-sync-nrepl-timeout nil) + + ; Set the timeout to 20 seconds + (setq org-babel-clojure-sync-nrepl-timeout 20) +#+END_SRC + ** Create a Clojure Project with Leiningen Create a Leiningen project directory tree: -- 1.9.5.msysgit.0 --------------000008010704020005050704 Content-Type: text/plain; charset=UTF-8; name="0002-Documentation-for-the-new-org-babel-clojure-async-fe.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0002-Documentation-for-the-new-org-babel-clojure-async-fe.pa"; filename*1="tch" >From cbe52d3e91d02041513fe3ff149b766b48ad09d8 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 6 Apr 2016 12:13:21 -0400 Subject: [PATCH 2/2] Documentation for the new org-babel-clojure :async feature. --- org-contrib/babel/languages/ob-doc-clojure.org | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/org-contrib/babel/languages/ob-doc-clojure.org b/org-contrib/babel/languages/ob-doc-clojure.org index 17c0f20..d309975 100644 --- a/org-contrib/babel/languages/ob-doc-clojure.org +++ b/org-contrib/babel/languages/ob-doc-clojure.org @@ -145,6 +145,31 @@ Another source for information on options is this page at Worg: Next, a similar process for executing code will be used with Clojure. +* Using Asynchronous Evaluations +Org-babel-clojure does support asynchronous evaluation of the code blocks. To +evaluate some code asynchronously, you only have to specify the =:async= option +in the code block's header like this: + +#+begin_example +#+BEGIN_SRC clojure :results output :async + (dotimes [n 10] + (println n ".") + (Thread/sleep 500)) +#+END_SRC +#+end_example + +If =:async= is specified that way, then when you will run the code using +=C-c C-c= then a new window will open in Emacs. Everything that is output +by the REPL will immediately be added to that new window. + +When the processing of the code is finished, then the window and its +buffer will be closed and the results will be reported in the +=#+RESULTS= section. Note that the =:results= parameter like normally. If +=silent= is specified, then no result will be displayed. If =output= is +specified then all the output from the window will appears in the results +section. If =value= is specified, then only the last returned value of +the code will be displayed in the results section. + * Connect to the REPL To compile and run Clojure code, you will need to connect to a REPL (Read Evaluation Print Loop). -- 1.9.5.msysgit.0 --------------000008010704020005050704-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] expose nrepl's timeout setting in ob-clojure.el Date: Sun, 10 Apr 2016 10:20:22 +0200 Message-ID: <87vb3pnad5.fsf@nicolasgoaziou.fr> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570521D3.4030009@fgiasson.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apAZT-0003sS-CK for emacs-orgmode@gnu.org; Sun, 10 Apr 2016 04:18:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apAZQ-0000Sm-6H for emacs-orgmode@gnu.org; Sun, 10 Apr 2016 04:18:15 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:36343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apAZP-0000Si-Vv for emacs-orgmode@gnu.org; Sun, 10 Apr 2016 04:18:12 -0400 In-Reply-To: <570521D3.4030009@fgiasson.com> (Frederick Giasson's message of "Wed, 6 Apr 2016 10:48:51 -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" To: Frederick Giasson Cc: emacs-orgmode@gnu.org Hello, Thank you for the update. Frederick Giasson writes: > +(defcustom org-babel-clojure-sync-nrepl-timeout 10 > + "Timeout value, in seconds, of a Clojure sync call. > + If the value is nil, timeout is disabled." > + :type 'integer > + :group 'org-babel) Some keywords are missing: :version "25.1" :package-version '(Org . "9.0") and perhaps :safe #'wholenump > (defcustom org-babel-clojure-backend > (cond ((featurep 'cider) 'cider) > (t 'slime)) > @@ -94,8 +100,9 @@ > (let ((result-params (cdr (assoc :result-params params)))) > (setq result > (nrepl-dict-get > - (nrepl-sync-request:eval > - expanded (cider-current-connection) (cider-current-session)) > + (let ((nrepl-sync-request-timeout org-babel-clojure-sync-nrepl-timeout)) > + (nrepl-sync-request:eval > + expanded (cider-current-connection) (cider-current-session))) You forgot to (defvar nrepl-sync-request-timeout) I also think it makes sense to merge the 3 patches. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: [PATCH] expose nrepl's timeout setting in ob-clojure.el Date: Mon, 11 Apr 2016 10:03:08 -0400 Message-ID: <0b7090aa-5c49-9364-e18c-28627ae3911f@fgiasson.com> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570521D3.4030009@fgiasson.com> <87vb3pnad5.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]:42518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apcQV-0004F3-4j for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:02:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apcQP-0007Co-Hn for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:02:51 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:57718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apcQP-0007CI-ED for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:02:45 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1apcQM-001OH4-Nq for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:02:42 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:49317 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 1apcQM-001OGr-Gr for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:02:42 -0400 In-Reply-To: <87vb3pnad5.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" To: emacs-orgmode@gnu.org Hi Nicolas, > Some keywords are missing: > > :version "25.1" > :package-version '(Org . "9.0") > > and perhaps > > :safe #'wholenump Ok good, added. >> (defcustom org-babel-clojure-backend >> (cond ((featurep 'cider) 'cider) >> (t 'slime)) >> @@ -94,8 +100,9 @@ >> (let ((result-params (cdr (assoc :result-params params)))) >> (setq result >> (nrepl-dict-get >> - (nrepl-sync-request:eval >> - expanded (cider-current-connection) (cider-current-session)) >> + (let ((nrepl-sync-request-timeout org-babel-clojure-sync-nrepl-timeout)) >> + (nrepl-sync-request:eval >> + expanded (cider-current-connection) (cider-current-session))) > You forgot to > > (defvar nrepl-sync-request-timeout) This one is defined in the nREPL package. Maybe there is something that I don't understand, but do I have to re-defined it here? > I also think it makes sense to merge the 3 patches. Ok will do. Thanks, Fred From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] expose nrepl's timeout setting in ob-clojure.el Date: Tue, 12 Apr 2016 22:18:27 +0200 Message-ID: <874mb6y418.fsf@nicolasgoaziou.fr> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570521D3.4030009@fgiasson.com> <87vb3pnad5.fsf@nicolasgoaziou.fr> <0b7090aa-5c49-9364-e18c-28627ae3911f@fgiasson.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq4jV-0008Ps-3M for emacs-orgmode@gnu.org; Tue, 12 Apr 2016 16:16:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aq4jQ-0008DX-4b for emacs-orgmode@gnu.org; Tue, 12 Apr 2016 16:16:21 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:59757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq4jP-0008DT-UX for emacs-orgmode@gnu.org; Tue, 12 Apr 2016 16:16:16 -0400 In-Reply-To: <0b7090aa-5c49-9364-e18c-28627ae3911f@fgiasson.com> (Frederick Giasson's message of "Mon, 11 Apr 2016 10:03:08 -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" To: Frederick Giasson Cc: emacs-orgmode@gnu.org Hello, Frederick Giasson writes: >>> (setq result >>> (nrepl-dict-get >>> - (nrepl-sync-request:eval >>> - expanded (cider-current-connection) (cider-current-session)) >>> + (let ((nrepl-sync-request-timeout org-babel-clojure-sync-nrepl-timeout)) >>> + (nrepl-sync-request:eval >>> + expanded (cider-current-connection) (cider-current-session))) >> You forgot to >> >> (defvar nrepl-sync-request-timeout) > > This one is defined in the nREPL package. Maybe there is something > that I don't understand, but do I have to re-defined it here? The byte-compiler complains if a variable is let-bound but yet not used in the body. You don't need to define it again but tell the byte-compiler it is dynamically scoped (using `defvar' without a value). Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: [PATCH] expose nrepl's timeout setting in ob-clojure.el Date: Wed, 13 Apr 2016 16:15:44 -0400 Message-ID: <21f3628f-46fe-3883-daab-de630ebf86c4@fgiasson.com> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570521D3.4030009@fgiasson.com> <87vb3pnad5.fsf@nicolasgoaziou.fr> <0b7090aa-5c49-9364-e18c-28627ae3911f@fgiasson.com> <874mb6y418.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------47F17ADF530912A7C7E1427F" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqRCX-0005aK-6F for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 16:15:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqRCT-0002qz-45 for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 16:15:49 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:35414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqRCS-0002qu-Ue for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 16:15:45 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1aqRCR-001FiH-4m for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 16:15:43 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:55358 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 1aqRCQ-001Fi8-Sp for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 16:15:42 -0400 In-Reply-To: <874mb6y418.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" To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------47F17ADF530912A7C7E1427F Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi Nicolas, > (defvar nrepl-sync-request-timeout) Here are the latest fixes you proposed, everything should be all right now. Thanks! Fred --------------47F17ADF530912A7C7E1427F Content-Type: application/x-zip-compressed; name="org-mode-patches.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="org-mode-patches.zip" UEsDBBQAAAAIAA2BjUjEUT4WMQIAAJYDAAA/AAAAMDAwMS1VcGRhdGUtb2YtT1JHLU5FV1Mt dG8tbWVudGlvbi10aGUtYWRkaXRpb24tb2YtdGhlLW5lLnBhdGNojVJdT9swFH33rzjqU0tJ cEqattE6gTZgkzZAwMTDtAcnvmkNiZ3Zzkql/fg55UMD7WFRpNx7c3zO9bn31JoGCzFPDrPD WbKoDvlsLpNDSYtiMUvSlBNllUynWZEWE3w1GtfUIpmB83z3YsJ5wk4DTY5TS5KsKu9xpoRz AfyuCqWjavWYxqVp3rOPwlOOW5L7yHDc2sCQZEh4PknzaYqIp5yz6664o9Ln+H55fPPhE5KD 6Q98a2U4C1Ph4uosOj+5vYY3aEh7FbT8miCkVLskYPpc04bBkfdKrzAwdhUVoqA6Kmtz11mK 3FaXkbbU1pFXDZnODxiLooiBfHnwovIbKcbhYUhQqZpQroVe9TdIobQj22u64XjEmFRVhSha KQ9x8IqkeJUypSU9YD6RUyF5HFM2T6fzWfCBZ2na9/DmPAv6bzmOjhAlPNvPMO4/CUeoFBRs JseQYzhoZTVAjGEt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: application/x-zip-compressed; name="worg-patches.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="worg-patches.zip" UEsDBBQAAAAIAGVjhkjbjK9cZAIAAMQEAAA/AAAAMDAwMS1Eb2N1bWVudC10aGUtbmV3LW9w dGlvbi1vYi1jbG9qdXJlLW9wdGlvbi1vcmctYmFiZWwtLnBhdGNolVPbTttAEH3frziCBwjG ju04CU6bCpoARWopIkh9qKrKXo/DUmc3eO3SSP34zuZSXollWfJczpyZM3NVmwXkGZ2lxXCY 9NOQ0ryXDsIk7sd5L+slSZn28/6Aemmc4IvRmNES0RBhOFq/iMMwElcMM8JVTQXVSv7Ctcqs 5eD3JZvOy/nmN5Bm8UFMs4ZG+EbFKQa4WNaMEA0QrfGiM/hhEoZi1uZPJJsRvt9dPEw+IerG PzA1sl2QbtA8EjS9wCwbxVVM7svKPLU1bS0CB6ae+3mWU7Vz+Xalpa9rWlZ+oxZk2uYgEML3 fQEXLI1uapV310ndKtPzNpuT7TJ4YeQOJeBQ/EUUwXt9BCKUqiLIR05zjbFfaUu1I2OPvY4Q hSpL+P5cNci6e9bL90wQShf0B8M4TeKiDIJoKMMyDnnG4SBJXMt7cxDc5v48zs/hp+HpAB5/ eWn4/6IonHyWUClNFo3ByrQ1Alpk0m7GyDYuUqq5U3RyM728HwkAxzU9t4pNR1LxnnUEDr3L 2+nP2f1EQHhf19JnVbVyiJCZhl2SVOVqvS8Tl4Ot8shXsNQ0Ss/XzvFb1mUsvF3OZs0CPHDu 76xqCcqy4ozJxAuLTBdQpSvhmhlrVY1dHQ1t/lN4UVUFI2VbB8IT3qH38fL65tZ1g/Us/ErZ pfCAd5gqm+XVtocju4NwzmOu8Yy30Aez6LhKDnFGmyva+ZglL8iW/p64cdhx9HdS8DmcnGBS E985Mky2l3lXG3fR3HbziM+kNM+R+FLFa+h/K5bb4ILllo2pWcKaaMSrCxEFadAPFnZl+ZiC UIh/UEsDBBQAAAAIAGVjhkhX34v84QMAAMEHAAA/AAAAMDAw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6RMcK4Ly5FJJu/HLwu2NO6BcCZCOpJfWeU407hVMHHkN +8fees/U/rFBL0gyaBVBzXgf3C9Xn28eVnOwtERJLhHcaoct5FZNXZQ5DZnhJbq9bJQfyKLY RXCdUyhL6025f9PTIVe6g/KKREhbFXyHwjvDvO2o92XBMbeeIHLwODq15f4tdNSJJiCvKuTG dmXty6ZQ+5J8Dj9V+J/wmknyjgW3jrzpLaAofeNAnLDglZSf4P+Q8rWJxDB8gIVWig5aCbRC oY1CQ07Rysq/DjxTXqXdwmmynB4ErLAVUHYIxFu9ndzT/BytIbjzYwY3Wle9iPY3sCSaRuOo tDtLb5QoZuwfUEsBAhQAFAAAAAgAZWOGSNuMr1xkAgAAxAQAAD8AAAAAAAAAAQAgAAAAAAAA ADAwMDEtRG9jdW1lbnQtdGhlLW5ldy1vcHRpb24tb2ItY2xvanVyZS1vcHRpb24tb3JnLWJh YmVsLS5wYXRjaFBLAQIUABQAAAAIAGVjhkhX34v84QMAAMEHAAA/AAAAAAAAAAEAIAAAAMEC AAAwMDAyLURvY3VtZW50YXRpb24tZm9yLXRoZS1uZXctb3JnLWJhYmVsLWNsb2p1cmUtYXN5 bmMtZmUucGF0Y2hQSwUGAAAAAAIAAgDaAAAA/wYAAAAA --------------47F17ADF530912A7C7E1427F-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: [PATCH] new :async feature for org-babel-clojure Date: Wed, 20 Apr 2016 08:17:17 -0400 Message-ID: References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570538F9.8030307@fgiasson.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asr4G-0001Sv-Uh for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 08:17:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asr4B-0002fc-AT for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 08:17:16 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:42412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asr4B-0002fW-6P for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 08:17:11 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1asr47-001u3t-2E for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 08:17:07 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:64862 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 1asr46-001u3l-QU for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 08:17:06 -0400 In-Reply-To: <570538F9.8030307@fgiasson.com> 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" To: emacs-orgmode@gnu.org Hi Nicolas, Any news regarding these latest fixes to that patch? Thanks, Fred > > Here is my proposal to create a new :async feature for > Org-babel-clojure. This is discussed at length in this blog post: > > http://fgiasson.com/blog/index.php/2016/04/05/using-clojure-in-org-mode-and-implementing-asynchronous-processing/ > > > I added the commit of the changes, the commit for the ORG-NEWS file > and the commit for the Worg documentation. > > IMPORTANT NOTE: this includes the patches for the new :async feature > *AND* the new org-babel-clojure-sync-nrepl-timeout setting (for > consistency's sake) > > Thanks, > > Fred From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] new :async feature for org-babel-clojure Date: Wed, 20 Apr 2016 23:59:25 +0200 Message-ID: <87a8kohrgi.fsf@nicolasgoaziou.fr> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570538F9.8030307@fgiasson.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1at07Y-00080a-Ol for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 17:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1at07Y-0005uJ-1U for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 17:57:16 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:44734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1at07X-0005uE-RT for emacs-orgmode@gnu.org; Wed, 20 Apr 2016 17:57:15 -0400 In-Reply-To: (Frederick Giasson's message of "Wed, 20 Apr 2016 08:17:17 -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" To: Frederick Giasson Cc: emacs-orgmode@gnu.org Hello, Frederick Giasson writes: > Any news regarding these latest fixes to that patch? They look good. Thank you for the heads-up. Could you merge patches 1 2 and 5 (Org series) into a single one for inclusion? As for 3 and 4, I think a more general mechanism for asynchrnous eval'ing would be preferable. Besides, AFAIU, because of ; Wait until the nREPL code finished to be processed (while (not (member "done" status)) (nrepl-dict-put response "status" (remove "need-input" status)) (accept-process-output nil 0.01) (redisplay)) `org-babel-execute:clojure' is still somewhat synchronous, isn't it? Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: [PATCH] new :async feature for org-babel-clojure Date: Thu, 21 Apr 2016 08:34:29 -0400 Message-ID: <0bf9b99d-139f-b54d-f3b5-e5e1f1344e4b@fgiasson.com> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570538F9.8030307@fgiasson.com> <87a8kohrgi.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]:57985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atDoQ-0008IQ-2h for emacs-orgmode@gnu.org; Thu, 21 Apr 2016 08:34:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atDoM-0007xx-0b for emacs-orgmode@gnu.org; Thu, 21 Apr 2016 08:34:26 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:59472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atDoL-0007xB-Sk for emacs-orgmode@gnu.org; Thu, 21 Apr 2016 08:34:21 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1atDoI-0035Dr-QG for emacs-orgmode@gnu.org; Thu, 21 Apr 2016 08:34:18 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:65243 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 1atDoI-0035Df-Jq for emacs-orgmode@gnu.org; Thu, 21 Apr 2016 08:34:18 -0400 In-Reply-To: <87a8kohrgi.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" To: emacs-orgmode@gnu.org Hi Nicolas, > As for 3 and 4, I think a more general mechanism for asynchrnous > eval'ing would be preferable. Besides, AFAIU, because of > > ; Wait until the nREPL code finished to be processed > (while (not (member "done" status)) > (nrepl-dict-put response "status" (remove "need-input" status)) > (accept-process-output nil 0.01) > (redisplay)) > > `org-babel-execute:clojure' is still somewhat synchronous, isn't it? Yes, and this is what I was mentioning initially (here, I think, and on my blogpost about it). I just don't know how all this processing could be handled in a different thread. That way it would free the current threads and we could continue to work with the current instance while the processing is happening because as I mentioned, everything is still stuck during the processing. Right now, async is really more about "feedback" than "asynchronous". However it has never been clear is it was possible or not, and if so, how :) Any pointers on how this could be done in emacs? Thanks, Fred > > > Regards, > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] new :async feature for org-babel-clojure Date: Tue, 26 Apr 2016 21:21:11 +0200 Message-ID: <87h9eomb14.fsf@saiph.selenimh> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570538F9.8030307@fgiasson.com> <87a8kohrgi.fsf@nicolasgoaziou.fr> <0bf9b99d-139f-b54d-f3b5-e5e1f1344e4b@fgiasson.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1av8Xx-0005XH-1W for emacs-orgmode@gnu.org; Tue, 26 Apr 2016 15:21:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1av8Xt-0008Gz-Ri for emacs-orgmode@gnu.org; Tue, 26 Apr 2016 15:21:20 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:42353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1av8Xt-0008Gu-LR for emacs-orgmode@gnu.org; Tue, 26 Apr 2016 15:21:17 -0400 In-Reply-To: <0bf9b99d-139f-b54d-f3b5-e5e1f1344e4b@fgiasson.com> (Frederick Giasson's message of "Thu, 21 Apr 2016 08:34:29 -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" To: Frederick Giasson Cc: emacs-orgmode@gnu.org Hello, Frederick Giasson writes: > Right now, async is really more about "feedback" than "asynchronous". > However it has never been clear is it was possible or not, and if so, > how :) > > Any pointers on how this could be done in emacs? You could start a new Emacs evaluating some code in a subprocess, with `start-process' and collect return value. You may want to have a look at `org-export-async-start' or "async.el" library in ELPA. Unfortunately, it is not yet possible to re-use the latter in Org code, since it is unavailable in vanilla Emacs. The hard part, IMO, is to bring the right context in the subprocess (e.g., the environment should be the same, other blocks may be needed, etc.). Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: [PATCH] new :async feature for org-babel-clojure Date: Wed, 27 Apr 2016 08:00:37 -0400 Message-ID: <9479db14-ec40-6d1b-605a-da757b01ec50@fgiasson.com> References: <56FABD8E.2000705@fgiasson.com> <87twjfcbt6.fsf@nicolasgoaziou.fr> <570538F9.8030307@fgiasson.com> <87a8kohrgi.fsf@nicolasgoaziou.fr> <0bf9b99d-139f-b54d-f3b5-e5e1f1344e4b@fgiasson.com> <87h9eomb14.fsf@saiph.selenimh> 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]:52508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avO96-00040b-LC for emacs-orgmode@gnu.org; Wed, 27 Apr 2016 08:00:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avO92-0002uh-34 for emacs-orgmode@gnu.org; Wed, 27 Apr 2016 08:00:44 -0400 Received: from s052.panelboxmanager.com ([72.55.186.33]:44662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avO91-0002uL-Vs for emacs-orgmode@gnu.org; Wed, 27 Apr 2016 08:00:40 -0400 Received: from mailnull by s052.panelboxmanager.com with sa-checked (Exim 4.86_1) (envelope-from ) id 1avO8y-000TaV-Ri for emacs-orgmode@gnu.org; Wed, 27 Apr 2016 08:00:36 -0400 Received: from modemcable161.56-23-96.mc.videotron.ca ([96.23.56.161]:59416 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 1avO8y-000Ta4-Gs for emacs-orgmode@gnu.org; Wed, 27 Apr 2016 08:00:36 -0400 In-Reply-To: <87h9eomb14.fsf@saiph.selenimh> 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" To: emacs-orgmode@gnu.org Hi Nicolas, > >> Right now, async is really more about "feedback" than "asynchronous". >> However it has never been clear is it was possible or not, and if so, >> how :) >> >> Any pointers on how this could be done in emacs? > You could start a new Emacs evaluating some code in a subprocess, with > `start-process' and collect return value. You may want to have a look at > `org-export-async-start' or "async.el" library in ELPA. > > Unfortunately, it is not yet possible to re-use the latter in Org code, > since it is unavailable in vanilla Emacs. > > The hard part, IMO, is to bring the right context in the subprocess > (e.g., the environment should be the same, other blocks may be needed, > etc.). Yeah, will have to take some more time to check that, I probably have much to learn regarding Elisp itself first. Rethinking about that, would it not be better to remove the confusion by changing the terminology I used: ":async"? What it really is is to have feedback of the underlying process, and not really an asynchronous process. I thought about two possibilities: (1) creating two new results options: :output-process and :value-process. Which means that we output the underlying process of a :output or :value :results (2) renaming :async by :show-process or something similar. Then we take the time to check how a real asynchronous system can be put in place. Thoughts? Thanks, Fred > > > Regards, >