From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sDM5ASRkXmPRQwAAbAwnHQ (envelope-from ) for ; Sun, 30 Oct 2022 12:46:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sBAqASRkXmP14QAAauVa8A (envelope-from ) for ; Sun, 30 Oct 2022 12:46:44 +0100 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 7E5723EA30 for ; Sun, 30 Oct 2022 12:46:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1op6lB-0007AM-RV; Sun, 30 Oct 2022 07:45:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1op6l8-00079h-6x for emacs-orgmode@gnu.org; Sun, 30 Oct 2022 07:45:46 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1op6l5-00068G-WE; Sun, 30 Oct 2022 07:45:45 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4N0ZGm0zrVz9sTL; Sun, 30 Oct 2022 12:45:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kraus.my; s=MBO0001; t=1667130336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9KHBlM5rTEK2AMOpDUcLqXuRbkBYrMctvcDJx+vk+3g=; b=mbWoWYu9qs+or67IhUTzScNqzDOoRjEA3+9wvQGWFKBzwrwRGhRKAmgIB8XsNXTqcOmkJ8 5+GrNNb5Tk8YpSk6gF/b+C1P40tuDXvqPDhfPcTuihbsd8YL9cDnwxbpO7/fyYTubi1ays pGipefKovSHNGxnFmJUS/CDvvN6v98SwFDBYrn5BTazibxXauw5ZTbHLEn82H2YY0p6SoF N1HskmWhlmublhXLqrWA1EwMkcza+8FTJZzfbos7AvXt4FvBtSXKfCLLEEH6Ff4IVma+W7 xm33x5QZlYYKu9cMI5c5mljhwlDioScELdMxfvI7oOcG0Ddt9ZQ/HOwK4XPCgg== References: <62520bbc.1c69fb81.d855b.549fSMTPIN_ADDED_BROKEN@mx.google.com> <87r0yvoycr.fsf@localhost> <874jvp9wsg.fsf@kraus.my> <87r0yss54r.fsf@bzg.fr> <87zgdg8g2e.fsf@kraus.my> <87o7twqmc4.fsf@gnu.org> <87fsf78xeb.fsf@kraus.my> <87k04j6oic.fsf@gnu.org> From: Daniel Kraus To: Bastien Cc: Ihor Radchenko , numbchild@gmail.com, emacs-orgmode@gnu.org Subject: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list) Date: Sun, 30 Oct 2022 12:21:09 +0100 In-reply-to: <87k04j6oic.fsf@gnu.org> Message-ID: <87bkptmu5v.fsf@kraus.my> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=80.241.56.161; envelope-from=daniel@kraus.my; helo=mout-p-103.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667130403; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9KHBlM5rTEK2AMOpDUcLqXuRbkBYrMctvcDJx+vk+3g=; b=gfR1TLt4/rChGhwamk1QWwV38ozb31acJtavgcc18USYgtyKklrmFffvPfiWEzaCX5uDXf EtjfgoXhDmEmcko6HDjzIhL0wr1gjoBqFCYKcMAxvwj4LfjlK7prd2WphdPPQsQ9miY/EE wxa8r0fxdDB7f3GPK7jBc8qzw0I8mIrY47Os3DhGcsfhXCvjbMFucJiqR4qzQW7sB+iZEl eGjGNmcTV/jn7qN3odxUjEzGMqoGOCAyC+IUoa03/BLQuLcD7bKC9qLGW33OOxOSXdkiXe 3BdrqsqjYV2lvVMHLM6Q0ihPRMqbsnJHH6RVvFJA2GCN1zn/uf7awBT05EwGZg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667130403; a=rsa-sha256; cv=none; b=bG8opOYAqa9iKc2SJNt2f2Oa9uWv+aJ3H4Rj7Xa7mppgoD/1+7AZsBTYETOCTTXbFSIBnK ScZvJK2AOzWG7Vl6/JsTRepXG/94HKQSaXatHIZPTQgMmbaokoFa82a86FntXnqecoYW1n RVuZsIlhZFHVLYK3RRkuQzkMCf5HZu/gj88iYxMpbBveJhxCPuGTBIy4Rhod0WkW1qGWPF Jpx+yxW8S3HskTw7XJ83snjBo34lwIHhplbuOYL56FXC2RCvQ1QslEO5RQM1LSVPS0C1Gb u16GXL6O5hnTiJ8dPT3BVqk4zgQTSKQKPl/ZChnZIb74pQx3YchLHbgi8qg2Zg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=mbWoWYu9; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.55 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=mbWoWYu9; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7E5723EA30 X-Spam-Score: -3.55 X-Migadu-Scanner: scn1.migadu.com X-TUID: WG74YAZWz3Qb --=-=-= Content-Type: text/plain Bastien writes: > Daniel Kraus writes: > >> I think I'll go with the big `cond` above to auto-detect what's >> installed. That's probably the best out-of-the-box experience. > Indeed, thank you! I would push the attached patch. I'm not sure about the `:package-version` keyword in defcustom. I want to say that the default value changed. Should I do it this way? Is `(Org . "9.6")` correct as it's unreleased? Thanks, Daniel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ob-clojure.el-Auto-detect-backend.patch >From bd68ece99ce411439db87cd19e44ffbc49677ae3 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Sat, 29 Oct 2022 23:20:06 +0200 Subject: [PATCH] ob-clojure.el: Auto detect backend * lisp/ob-clojure.el (org-babel-clojure-backend): Set the backend to an available cli program or elisp package. --- lisp/ob-clojure.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 5654d5208..25f1c78a6 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -76,9 +76,16 @@ (defvar org-babel-default-header-args:clojurescript '()) (defvar org-babel-header-args:clojurescript '((package . :any))) -(defcustom org-babel-clojure-backend nil +(defcustom org-babel-clojure-backend (cond + ((executable-find "bb") 'babashka) + ((executable-find "nbb") 'nbb) + ((featurep 'cider) 'cider) + ((featurep 'inf-clojure) 'inf-clojure) + ((featurep 'slime) 'slime) + (t nil)) "Backend used to evaluate Clojure code blocks." :group 'org-babel + :package-version '(Org . "9.6") :type '(choice (const :tag "inf-clojure" inf-clojure) (const :tag "cider" cider) -- 2.38.1 --=-=-=--