From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4JonNdDbXmPDXAAAbAwnHQ (envelope-from ) for ; Sun, 30 Oct 2022 21:17:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6BpKNdDbXmPwwQAA9RJhRA (envelope-from ) for ; Sun, 30 Oct 2022 21:17:20 +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 C50E77BBC for ; Sun, 30 Oct 2022 21:17:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opEj8-0001BW-Da; Sun, 30 Oct 2022 16:16:14 -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 1opEj6-0001BC-1j for emacs-orgmode@gnu.org; Sun, 30 Oct 2022 16:16:12 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opEj4-0003CQ-BM for emacs-orgmode@gnu.org; Sun, 30 Oct 2022 16:16:11 -0400 Received: by mail-pg1-x531.google.com with SMTP id 20so9093441pgc.5 for ; Sun, 30 Oct 2022 13:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:to:from:user-agent :references:from:to:cc:subject:date:message-id:reply-to; bh=o8vp+1Sr91/FUextrGeOJ2+T/h3xXOaQJFTEQVGiVAE=; b=UgxxYYRFMWjYD5ZsoJhGxAwBgNf+s8Y71Ao176T6DF+HPkTeR4nVEi9D+FMgFzBHD7 jJuzGPx8iyDdnanXNUgvx1Li52owtgDSY8yJ1U8TSAkIotFOpxOllTmQ/KpeUIZlL72V udNyMdOKS9xQwxeJERJYaRE0rUdLZfH7TrC17qPCeRpqlIbhRuBD1VLVuMh99NIl5E+I mkNsFoSn9RMyTpvNfzuMks/Hgz0cAglJiPmOiqX6lHDIBrodma8rJ4lRgF8P22dTXCCI 2Jg7SpOmduLNHNgKzqfbO3CjIBjqvS6RYAGEHBrjyD2Rf7je6FJwXxnR6NYsAoubRV0r oKog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:to:from:user-agent :references:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=o8vp+1Sr91/FUextrGeOJ2+T/h3xXOaQJFTEQVGiVAE=; b=f94RqOic8iFzmwCWymPw0+cOtCnigUjUHBv4CjYe8jm3jPWtfEQsC60yOAZ4AnmUQp YWe6lXo5HRBiV+fcXYB3BXsUPVUQbmYghS8Q2ey4y5AAR8Gx7wx8mPPtdCMVSc4cVnzL 2yEDpzyJzf47RCa1zRnArCSXTCFreMXwCgojIMW5sVDjmtHaLnbjsfL8wfeGxpj05P+v rCfe5+TlAopKOHMO7+mBBheKLCVfv0yOJpW0fVsCoMXfTeGLReDbaY5sDEW3oX8J5ak2 6z8lwGPKnXK4xcC08vc55IA5lIGaPIVEThwrl2BIl2BMv+5e3jOLbOSR83ysz9T00yZd /7JA== X-Gm-Message-State: ACrzQf2MQji6c+43xOxr3gFW5vtrkSJoqh3ihUvkbM517mRyYfmrZxFG DcwCYGAtlTI2slBowYjxdLAoyroHLtw= X-Google-Smtp-Source: AMsMyM6cS0IZtfDWPDKlhRcLEYm3j3VnPZ3HMHKMR5ZfjEHGypZaUuqMpebshFRTc360yA1hGWINYw== X-Received: by 2002:a63:5606:0:b0:46f:714d:96ed with SMTP id k6-20020a635606000000b0046f714d96edmr9441129pgb.492.1667160967681; Sun, 30 Oct 2022 13:16:07 -0700 (PDT) Received: from dingbat (220-235-181-183.dyn.iinet.net.au. [220.235.181.183]) by smtp.gmail.com with ESMTPSA id d18-20020a170902ced200b00187197c4999sm1242745plg.167.2022.10.30.13.16.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 13:16:07 -0700 (PDT) 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> <87bkptmu5v.fsf@kraus.my> <87bkpto6yb.fsf@localhost> <8735b5mpxc.fsf@kraus.my> User-agent: mu4e 1.9.1; emacs 29.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list) Date: Mon, 31 Oct 2022 07:04:47 +1100 In-reply-to: <8735b5mpxc.fsf@kraus.my> Message-ID: <86a65dcbjx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=theophilusx@gmail.com; helo=mail-pg1-x531.google.com 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=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@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=1667161039; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=o8vp+1Sr91/FUextrGeOJ2+T/h3xXOaQJFTEQVGiVAE=; b=WIjyU51JSXuD+drbJuMgtMwTUpz2PxOOTrue7AbMJ0rSSPsBfTJiUxNXMOl1DzNoOsqivX l+WNqvOFvUoueouo1ZMB6u2lzE1MNvXnpuz+ToIqqWLhIviZgykyeAllj1WhK/pyfAxLm4 lmtYN7n/g/c0XunW+O05L2072wytkLvhAsN+IzSCwrabzxd96cpUCEERLZOSQLE+AM2Z3l io6kVSuheTIPf3+IrXM5tDE4W3d020npAHrpKC1pBjnT9/7EQK4/A0vI27K2oqhxBHK3EG x5HCaCg4/5MjPsDeQ1n8+AUQBemp2JnxAoAp9IuHlKw4YarhcueiA5RQ2yE8UQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667161039; a=rsa-sha256; cv=none; b=qcHXqTU3htBcCXKFXWbA/oZyZlKDbNFZ56qBHyIcRH+XRXeku/XHpQINRL/mXNHS5+8X+p AzK+NzAr++tGPZlhLobuTFYGez+i01t9QdpOEkobbQLmupFU6v+DM3q6NX+1A+Pcm1kM4w NH+rk0HO/uyZQR3dZa7rHJVt1ISrQv475dW2jgfM1nUKPn7gCV3iJbCek91bnFutx9zZzS bF1KnI5kVCCwdCJxLQ+bUr3Mb03znDEq/dJs2wHwKe+eDLHevjY/Hh9/LIkDvmJiR+nja4 t9A5E/OtGuqhaup30pANGo9PkVlY3oQb95pZ70KDZCzkE5Iny1zo3fFI5jGAjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UgxxYYRF; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.75 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UgxxYYRF; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C50E77BBC X-Spam-Score: -9.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2fgDothaK4jD Daniel Kraus writes: > Ihor Radchenko writes: > >> Daniel Kraus writes: >> >>> +(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)) >> >> What if users have, say, cider installed and also babashka executable? >> Will it be expected to use babashka? > > Yes. The only thing that makes me slightly hesitant is that e.g. > someone doesn't have `bb` installed. Executes clojure source blocks > which are then evaluated in, let's say cider. > Then they install `bb` and the next time they start Emacs, the same > source block on re-evaluation would be executed with babashka. > > I think this is still the best out of the box experience as it > "just works" for most users without having to customise something > and if they want it fixed, they can pin it to a certain backend. > > What's your opinion? > > Cheers, > Daniel Just chime in with my 2 cents. I think bb is a much better solution from a babel perspective and would love to see it as the default, even when you have both bb and cider installed. I stopped using clojure in org because it was way too fragile - depending heavily on cider features which often changed. However, now we have babashka and nbb, I'm thinking about using org again with clojure. I recall looking at the babel code for clojure some time back to see if it could be made simpler and more reliable. However, there wasn't much that could be improved on given the design of cider and its focus on interactive clojure development. I then thought using something like the Clojure CLI tools might be the way to go. Now I feel that babashka for clojure and nbb for clojurescript might be the right answer.