From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qFXMCDDE6l6JJgAA0tVLHw (envelope-from ) for ; Thu, 18 Jun 2020 01:32:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SGKmBDDE6l6DMQAAB5/wlQ (envelope-from ) for ; Thu, 18 Jun 2020 01:32:32 +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 68321940391 for ; Thu, 18 Jun 2020 01:32:31 +0000 (UTC) Received: from localhost ([::1]:45374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jljPo-0002xR-BF for larch@yhetil.org; Wed, 17 Jun 2020 21:32:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jljPU-0002xI-3Q for emacs-orgmode@gnu.org; Wed, 17 Jun 2020 21:32:08 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:35798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jljPS-0003gk-1p for emacs-orgmode@gnu.org; Wed, 17 Jun 2020 21:32:07 -0400 Received: by mail-pf1-x432.google.com with SMTP id h185so2029000pfg.2 for ; Wed, 17 Jun 2020 18:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=rlesnX3UYUglZpeFtygpHjmrl8WCTenXESRVvi52i/E=; b=SIvXPY0JbvzNoAweIoZHXkOPCMNFYEJ8GpNWpNuFFcRTANbAOKIS8HcHySXGWvy05Y KZEoTK2JzCWaG+LSDU+m1VIPLX2jnArzMexZ98KEYPwU2itEi9w0jQtXC7IyhYJegCI5 ENFPjXbnZuusRLB1qreIFdPdhCkNmji9SEcVzAHN5oFuXVOT98J8P8yfOfIsIijZWa/X Wj+04gZHbHW2wnfQhElbS0k1HtFCBU3PI8w/cwRunjfGNb02GnLtPItvSi6789tHEAip Eh658NqWFpHPVeVg4DDq8Sb0NpmmwH6AFkLYHORhgV/KdWQmHvadBZjVfQ8ixr7GW9dA k8BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=rlesnX3UYUglZpeFtygpHjmrl8WCTenXESRVvi52i/E=; b=J6MAnohYW8gYt/+mlBDJRZq4Jk8WoxGHDTOuTLWUDD/W0vkAHHXz3ftF0yVOOpYzlC Qamgeu+dGfrya0+hwCADFNUulDVvVDA10Q1itwtoO+fOghfRtdTCC5UvTgong0g66WUs jVGDDUfuqt8vKPOMoiG1dAOOFTnBus9UpuAXcet+ga7PgMH/AFN8Fvuxwe1aIiPBI4tM 1r4Fku6LnbF8O4Z+QTSr65Syw2LDhPBGLrzUsk2eril/Svb4sWqgd0oJnsELhEoQav7s 1kvnMs1vEWqLC2WJTfBQBhq3nDjqtw6s5W2yTG0MJx+Rtpi1AO3hOy5rqar3SSn6ouFz h6Nw== X-Gm-Message-State: AOAM532XkLSN9ZVGSkUbRh94WHpyv9DClJbzOy8H+JvB478l42N/m8qd BvbGtT7/gJQW/KiEe8QrqciVJNb/BLc= X-Google-Smtp-Source: ABdhPJyVhjgGYI4ir0a/mfhAEzY/VsiWKp6nsTNaLKMPL5qNhSLTv9lu8X/9fxYy4cuwekU8fofB9Q== X-Received: by 2002:a05:6a00:1486:: with SMTP id v6mr1369199pfu.83.1592443923791; Wed, 17 Jun 2020 18:32:03 -0700 (PDT) Received: from AIBRAGIM-M-J8Z8 ([2001:420:c0c8:1007::8f5]) by smtp.gmail.com with ESMTPSA id hv15sm682591pjb.17.2020.06.17.18.32.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 18:32:03 -0700 (PDT) References: <871rmimrcj.fsf@kyleam.com> User-agent: mu4e 1.4.10; emacs 28.0.50 From: Ag Ibragimov To: Kyle Meyer Subject: Re: Question on contributing to Org-mode In-reply-to: <871rmimrcj.fsf@kyleam.com> Message-ID: Date: Wed, 17 Jun 2020 18:32:01 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=agzam.ibragimov@gmail.com; helo=mail-pf1-x432.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: , 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=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=SIvXPY0J; dmarc=fail reason="SPF not aligned (relaxed)" 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: 0.09 X-TUID: 8HYTjh6n3pSo --=-=-= Content-Type: text/plain; format=flowed 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 header parameter 2) Header argument for additional parameters so you could do things like this: #+begin_src clojure :args "-Sdeps '{:deps {inflections {:mvn/version "0.13.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? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=ob-clojure-improvements-draft.patch 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) --=-=-= Content-Type: text/plain; format=flowed 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.50 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. --=-=-=--