From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: [PATCH] Fix issue with ob-clojure not returning output Date: Fri, 3 Mar 2017 15:25:17 +1100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11418316d7022a0549cbee64 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjemO-0004Vf-13 for emacs-orgmode@gnu.org; Thu, 02 Mar 2017 23:25:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjemM-0005wV-Mj for emacs-orgmode@gnu.org; Thu, 02 Mar 2017 23:25:20 -0500 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:35790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjemM-0005wD-ID for emacs-orgmode@gnu.org; Thu, 02 Mar 2017 23:25:18 -0500 Received: by mail-qk0-x229.google.com with SMTP id h9so4073544qke.2 for ; Thu, 02 Mar 2017 20:25:18 -0800 (PST) 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 --001a11418316d7022a0549cbee64 Content-Type: multipart/alternative; boundary=001a11418316d702240549cbee62 --001a11418316d702240549cbee62 Content-Type: text/plain; charset=UTF-8 The attached patch is a simple fix for the problem with ob-clojure using an incorrect cider-current-session call instead of cider-current-ns. For background on the issue see https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output/31169#31169 Not 100% convinced that the optional namespace argument should even be included - it really doesn't seem to do anything. However, leaving it in seemed like the minimal change needed. Have tested it and at least I now get data back from evaluation of clojure code blocks where previously, you only got the message "block processed with no output". -- regards, Tim -- Tim Cross --001a11418316d702240549cbee62 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The attached patch is a simple fix for the problem with ob= -clojure using an incorrect cider-current-session call instead of cider-cur= rent-ns. For background on the issue see=C2=A0https://emacs.stackexchange.com/questions/30857/cloj= ure-code-evaluation-in-org-mode-produces-no-output/31169#31169=C2=A0
Not 100% convinced that the optional namespace argument sh= ould even be included - it really doesn't seem to do anything. However,= leaving it in seemed like the minimal change needed.=C2=A0 Have tested it = and at least I now get data back from evaluation of clojure code blocks whe= re previously, you only got the message "block processed with no outpu= t".=C2=A0

--
regards,

Tim
=

--
Tim Cross

--001a11418316d702240549cbee62-- --001a11418316d7022a0549cbee64 Content-Type: text/x-patch; charset=US-ASCII; name="ob-clojure.patch" Content-Disposition: attachment; filename="ob-clojure.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iztbd8c90 LS0tCiBsaXNwL29iLWNsb2p1cmUuZWwgfCA1ICsrKy0tCiAxIGZpbGUgY2hhbmdlZCwgMyBpbnNl cnRpb25zKCspLCAyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3Avb2ItY2xvanVyZS5l bCBiL2xpc3Avb2ItY2xvanVyZS5lbAppbmRleCBkNDA3MTA1Li5lNTQyYTI5IDEwMDY0NAotLS0g YS9saXNwL29iLWNsb2p1cmUuZWwKKysrIGIvbGlzcC9vYi1jbG9qdXJlLmVsCkBAIC00NCw2ICs0 NCw3IEBACiAKIChkZWNsYXJlLWZ1bmN0aW9uIGNpZGVyLWN1cnJlbnQtY29ubmVjdGlvbiAiZXh0 OmNpZGVyLWNsaWVudCIgKCZvcHRpb25hbCB0eXBlKSkKIChkZWNsYXJlLWZ1bmN0aW9uIGNpZGVy LWN1cnJlbnQtc2Vzc2lvbiAiZXh0OmNpZGVyLWNsaWVudCIgKCkpCisoZGVjbGFyZS1mdW5jdGlv biBjaWRlci1jdXJyZW50LW5zICJleHQ6Y2lkZXItY2xpZW50IiAoKSkKIChkZWNsYXJlLWZ1bmN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IHRvIGJlIHByb2Nlc3NlZC4KIAkgICAgICh3aGlsZSAobm90IChtZW1iZXIgImRv bmUiIHN0YXR1cykpCi0tIAoyLjcuNAoK --001a11418316d7022a0549cbee64-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Fix issue with ob-clojure not returning output Date: Sun, 05 Mar 2017 18:14:27 +0100 Message-ID: <87fuir7ij0.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckZjs-0006Wt-Mt for emacs-orgmode@gnu.org; Sun, 05 Mar 2017 12:14:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckZjr-00080d-Ji for emacs-orgmode@gnu.org; Sun, 05 Mar 2017 12:14:32 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:56307) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ckZjr-0007za-Df for emacs-orgmode@gnu.org; Sun, 05 Mar 2017 12:14:31 -0500 In-Reply-To: (Tim Cross's message of "Fri, 3 Mar 2017 15:25:17 +1100") 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: Tim Cross Cc: emacs-orgmode@gnu.org Hello, Tim Cross writes: > The attached patch is a simple fix for the problem with ob-clojure using an > incorrect cider-current-session call instead of cider-current-ns. For > background on the issue see > https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output/31169#31169 Thank you. Would you mind providing a commit message along with your patch ? Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: [PATCH] Fix issue with ob-clojure not returning output Date: Mon, 6 Mar 2017 08:27:12 +1100 Message-ID: References: <87fuir7ij0.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0762762c12c4054a027109 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckdgR-0007A0-WA for emacs-orgmode@gnu.org; Sun, 05 Mar 2017 16:27:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckdgQ-0006tB-Oi for emacs-orgmode@gnu.org; Sun, 05 Mar 2017 16:27:15 -0500 Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]:35184) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckdgQ-0006s0-Kv for emacs-orgmode@gnu.org; Sun, 05 Mar 2017 16:27:14 -0500 Received: by mail-qk0-x22a.google.com with SMTP id v125so66438083qkh.2 for ; Sun, 05 Mar 2017 13:27:13 -0800 (PST) In-Reply-To: <87fuir7ij0.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: Nicolas Goaziou Cc: Org-mode --94eb2c0762762c12c4054a027109 Content-Type: text/plain; charset=UTF-8 Sure. Commit message Fix incorrect argument call in ob-clojure.el org-babel-execute-clojure was calling nrepl-sync-request:eval and nrepl-request:eval with the session ID as the 3rd argument when the functions expected a clojure namespace. Replaced (cider-current-session) with (cider-current-ns). On 6 March 2017 at 04:14, Nicolas Goaziou wrote: > Hello, > > Tim Cross writes: > > > The attached patch is a simple fix for the problem with ob-clojure using > an > > incorrect cider-current-session call instead of cider-current-ns. For > > background on the issue see > > https://emacs.stackexchange.com/questions/30857/clojure- > code-evaluation-in-org-mode-produces-no-output/31169#31169 > > Thank you. > > Would you mind providing a commit message along with your patch ? > > Regards, > > -- > Nicolas Goaziou > -- regards, Tim -- Tim Cross --94eb2c0762762c12c4054a027109 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sure. Commit message

Fix incorrect argu= ment call in ob-clojure.el

org-babel-execute-cloju= re was calling nrepl-sync-request:eval and nrepl-request:eval with the sess= ion ID as the 3rd argument when the functions expected a clojure namespace.= Replaced (cider-current-session) with (cider-current-ns).
=C2=A0=



On 6 March 2017 at 04:14, Nicolas Goaziou <m= ail@nicolasgoaziou.fr> wrote:
Hello,

Tim Cross <theophilusx@gmail.co= m> writes:

> The attached patch is a simple fix for the problem with ob-clojure usi= ng an
> incorrect cider-current-session call instead of cider-current-ns. For<= br> > background on the issue see
> https://emacs.stackexchange.com/questions/30857/clo= jure-code-evaluation-in-org-mode-produces-no-output/31169#31169

Thank you.

Would you mind providing a commit message along with your patch ?

Regards,

--
Nicolas Goaziou



--
regards,

Tim

--
Tim Cross

--94eb2c0762762c12c4054a027109-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Fix issue with ob-clojure not returning output Date: Tue, 07 Mar 2017 09:10:39 +0100 Message-ID: <87y3wh33sw.fsf@nicolasgoaziou.fr> References: <87fuir7ij0.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clACj-0006tG-JC for emacs-orgmode@gnu.org; Tue, 07 Mar 2017 03:10:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clACg-0002f0-DY for emacs-orgmode@gnu.org; Tue, 07 Mar 2017 03:10:45 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:35870) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1clACg-0002ek-6P for emacs-orgmode@gnu.org; Tue, 07 Mar 2017 03:10:42 -0500 In-Reply-To: (Tim Cross's message of "Mon, 6 Mar 2017 08:27:12 +1100") 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: Tim Cross Cc: Org-mode Hello, Tim Cross writes: > Sure. Commit message > > Fix incorrect argument call in ob-clojure.el > > org-babel-execute-clojure was calling nrepl-sync-request:eval and > nrepl-request:eval with the session ID as the 3rd argument when the > functions expected a clojure namespace. Replaced (cider-current-session) > with (cider-current-ns). Applied to master, since it doesn't apply correctly on maint. I added TINYCHANGE at the end of the commit message since I don't know if you signed FSF papers already. Thank you. Regards, -- Nicolas Goaziou 0x80A93738