From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uJY5BPkO6159aQAA0tVLHw (envelope-from ) for ; Thu, 18 Jun 2020 06:51:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id DNEOAPkO617YPgAA1q6Kng (envelope-from ) for ; Thu, 18 Jun 2020 06:51:37 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 71C1194051D for ; Thu, 18 Jun 2020 06:51:36 +0000 (UTC) Received: from localhost ([::1]:45274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jloOc-0006EW-LH for larch@yhetil.org; Thu, 18 Jun 2020 02:51:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jloOD-0006CE-Gd for emacs-orgmode@gnu.org; Thu, 18 Jun 2020 02:51:09 -0400 Received: from [183.249.138.255] (port=4830 helo=localhost) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jloOB-0000oq-7m for emacs-orgmode@gnu.org; Thu, 18 Jun 2020 02:51:09 -0400 Received: by localhost (Postfix, from userid 1000) id 824C224238C; Thu, 18 Jun 2020 14:50:55 +0800 (CST) References: <871rmimrcj.fsf@kyleam.com> User-agent: mu4e 1.4; emacs 28.0.50 From: stardiviner To: Ag Ibragimov Subject: Re: Question on contributing to Org-mode In-reply-to: Date: Thu, 18 Jun 2020 14:50:55 +0800 Message-ID: <87k104zx2o.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 183.249.138.255 (deferred) Received-SPF: softfail client-ip=183.249.138.255; envelope-from=numbchild@gmail.com; helo=localhost X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/18 02:50:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 63 X-Spam_score: 6.3 X-Spam_bar: ++++++ X-Spam_report: (6.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, FSL_HELO_NON_FQDN_1=0.001, HELO_LOCALHOST=3.828, NML_ADSP_CUSTOM_MED=0.9, RDNS_NONE=0.793, SPF_SOFTFAIL=0.665, SPOOFED_FREEMAIL_NO_RDNS=1 autolearn=_AUTOLEARN X-Spam_action: reject X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: numbchild@gmail.com Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: 7wfdWK5Hu9DD =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Ag Ibragimov writes: > Can someone help me please to improve ob-clojure for the next release. > > I'd like to add bababashka and clojure-cmd support. > > I've experimented with the code that's currently in master I so far I got= to this. > > What I would like to propose: > > 1) Ability to override `org-babel-clojure-backend` with a src-block heade= r parameter I like this idea, currently ob-clojure has many different backends support = now, Use a header argument will be helpful for situations like use different bac= kends in one org file and other cases. > 2) Header argument for additional parameters so you could do things like = this: I would like propose header argument name ":backend" or ":clojure". ob-sche= me.el has similar header argument named ":scheme". But I prefer ":backend", becau= se it's more general. > > #+begin_src clojure :args "-Sdeps '{:deps {inflections {:mvn/version "0.1= 3.2"}}}'" > (use 'inflections.core) > (plural "word") > #+end_src > > However, I don't know what's current convention about header parameters -= naming, etc. > What your thoughts about all that? > > diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el > index 299a326e4..de005c32b 100644 > --- a/lisp/ob-clojure.el > +++ b/lisp/ob-clojure.el > @@ -224,6 +224,14 @@ (defun ob-clojure-eval-with-slime (expanded params) > ,(buffer-substring-no-properties (point-min) (point-max))) > (cdr (assq :package params))))) > > +(defun ob-clojure-eval-with-babashka (expanded params) > + "Evaluate EXPANDED code block with PARAMS using babashka." > + (org-babel-execute:shell (format "bb -e \"%s\"" expanded) params)) > + > +(defun ob-clojure-eval-with-clj (expanded params) > + "Evaluate EXPANDED code block with PARAMS using clojure-cli." > + (org-babel-execute:shell (format "clj -e \"%s\"" expanded) params)) > + > (defun org-babel-execute:clojure (body params) > "Execute a block of Clojure code with Babel." > (unless org-babel-clojure-backend > @@ -238,7 +246,11 @@ (defun org-babel-execute:clojure (body params) > ((eq org-babel-clojure-backend 'cider) > (ob-clojure-eval-with-cider expanded params)) > ((eq org-babel-clojure-backend 'slime) > - (ob-clojure-eval-with-slime expanded params)))) > + (ob-clojure-eval-with-slime expanded params)) > + ((eq org-babel-clojure-backend 'babashka) > + (ob-clojure-eval-with-babashka expanded params)) > + ((eq org-babel-clojure-backend 'clj-cli) > + (ob-clojure-eval-with-clj expanded params)))) > (org-babel-result-cond result-params > result > (condition-case nil (org-babel-script-escape result) > > On Sat 13 Jun 2020 at 17:19, Kyle Meyer wrote: > >> Ag Ibragimov writes: >> >>> M-x emacs-version and org-version report: >>> >>> GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.5.0, NS appkit-1894.5= 0 Version 10.15.5 (Build 19F101)) of 2020-06-07 >>> Org mode version 9.3.7 (9.3.7-2-g706970-elpaplus @ ~/.emacs.d/elpa/28.0= /develop/org-plus-contrib-20200608/) >>> >>> Now I'm confused, what's in master of bzg/org-mode? >> >> It contains what will be the next feature release (9.4, at the moment). >> >> Notice that your reported version above contains a git revision: 706970. >> If you look that up in the repo, you'll find that it's a few commits >> back from the current tip of the maint branch. The maint branch is the >> source for the ELPA builds and is where bug fix releases are cut from. >> >>> And if someone wants to send patches, which branch it should be based >>> of? >> >> Bug fixes that apply to maint should ideally be based off of maint, and >> master is usually appropriate for everything else. =2D --=20 [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =2D----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7rDs8UHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsMWVQf/YlHZw3Yga3dTlLPU0Xg0f+tJ0JJR oigjt4oOBsaMGshHny+4QBnO/QJTVWpYEm6j2oFp0Cb1CUn5TiTRDDyRVcX+I15u W4T+UqsamKQQoRoJccPN3apraQlwiYbwLzN5Qy0hefOkj+E285PNf4Uq1VMwy9sL n2zqY+cm+lrhv3wG08xXxWckg+Jx76s1M6j9QQH7nGNovYSl3YzpjtOPc2VE2ayv 8FQQX6PSH4gEW7ItyfYd18vYtIn65Zkum+L80d8+HtDVPkw0yDIq6uIkUbR5jCCY tdbUsl6EeZlb9CkjY9WtOsIGe2FzIHjjhFSYvamgarqs5GGd+GazSPUVKQ=3D=3D =3D4JBP =2D----END PGP SIGNATURE-----