From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sPxzEZeGEGQZ3gAASxT56A (envelope-from ) for ; Tue, 14 Mar 2023 15:37:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iGhxEZeGEGSihwAAauVa8A (envelope-from ) for ; Tue, 14 Mar 2023 15:37:11 +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 D667B3F729 for ; Tue, 14 Mar 2023 15:37:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pc59r-0003tw-3B; Tue, 14 Mar 2023 09:57:43 -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 1pc59p-0003tm-JJ for emacs-orgmode@gnu.org; Tue, 14 Mar 2023 09:57:41 -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 1pc59n-0004wk-0d for emacs-orgmode@gnu.org; Tue, 14 Mar 2023 09:57:41 -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 4PbZTG47zXz9swb; Tue, 14 Mar 2023 14:42:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kraus.my; s=MBO0001; t=1678801346; 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=EtM3HCOLRa9a0ZBwSlR8kGkWLqc6XeRtzMoCZSoxlPs=; b=Y3KbjvAzTf2//03bRbFwgGtmbaRQ1shf1L37rHaC+Jam/gnKgLYVi2fM2kARHg/ABQIHB8 5+ZIY5P8oC7eQCulrqOE/s69vFAqWBYcrbLhZ8abQhuzYV3wfQaZ+d7BPWHoYyYQKJp0VE zgF6qLSzJqEvUUcaQQcPxAaEBhqz7skbPnp5yScuAQyfkb7CviUB96NzEqdbu0H6XJ3aHG RTz5AajNU5G0SQhVyqNe34L+DOsw9hCN8CSPX4l2MyK+USn6E0HTYzMYZD+Vcu1q86SpH9 NJ/h7/ZGbVEzARv/GQQNB5ltfFq320P/Kj4Y13mMVek4S+7d4V7luagQcc0zoA== References: <87mt4m53qj.fsf@kraus.my> <87pm9gyebl.fsf@localhost> <877cvkhh9d.fsf@kraus.my> <874jqno6hw.fsf@localhost> From: Daniel Kraus To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [patch] ob-clojure: Fix results output Date: Tue, 14 Mar 2023 14:38:24 +0100 In-reply-to: <874jqno6hw.fsf@localhost> Message-ID: <873567h2kk.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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=Y3KbjvAz; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678804631; a=rsa-sha256; cv=none; b=OwHW9G+Up2/wMqn0CNlX2FuD/TlU+Tinjoz+2eRd9tp5fKvTAtIT3JUE4avEFGpatCHfWh y97U9sfZ9FO8CGxsv6LFQMHOnB2Wu8pdf1WulLnRIqNy8bDflY9Uq0qE/4P18y/U2FJtIy dZ/mYGN2EjB8PH0CIPDVYLOvwZUy2/2aI0Zep8+B/95bfiUA8OrvyARTQRYtCSCRXI4VKD +TGOw8BNtloghtNtnlbiY0sCwoON+VaepNM9Sdv7J1hFrJeFKEDBq6QmQ65yr/09M8ZlVc zVWTNld3tJ1EbVijVGFcOMLmxsQmjSJBokwNmzMwlc/MiOiknBfNmhuijlH4bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678804631; 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=EtM3HCOLRa9a0ZBwSlR8kGkWLqc6XeRtzMoCZSoxlPs=; b=eLkJ35n0LUshO+XseOm04DfpObNICphqXkQRKhciTS/3R8HNP5zLQ2VCAISGgBl8A8jCjD jeJrur5P/NdTXG79M165ze2G/8AUfQF+0p/BBY0SuxNIIY6XaH0ED5gxIPYunquyI+fP+r cunaLoTAn1+yHlnjQBtgK1xW+7D9fBlYiuLT/rWfJgWQK0ylcLSElunN+fcn1D2uTmNOt0 SSRoSRSfDFwdWhFanlZl8TG5ea6QQ+445Aaxpm7Y2R3GhQfCYL7Fq1708ots/ToALKPM33 YqFMTIrHfxZ4K8ubk+YwVDGXpFToJubUSpgCy7/B8r7cJDNikPbLBh3HMqe+aA== X-Migadu-Spam-Score: -3.82 X-Spam-Score: -3.82 X-Migadu-Queue-Id: D667B3F729 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=Y3KbjvAz; 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"; dmarc=none X-TUID: AqlGbzqLDP0L --=-=-= Content-Type: text/plain Hi! Ihor Radchenko writes: > Daniel Kraus writes: > >> This was apparently a kludge that ob-clojure used to evaluate ClojureScript >> in the normal clojure:execute function. >> I simply used the same kludge where I need to check for cljs, but after >> reviewing it's not really necessary and I removed the :target parameter >> completely. As this was undocumented I guess it's ok to remove?! > > Yes, it is OK to remove what is undocumented. We may still announce the > change though. I added an entry to ORG-NEWS under Misc. >>>> -(defun ob-clojure-eval-with-babashka (bb expanded) >> I created an obsolete-function-alias. > > It should better go to org-compat.el. Moved the alias to org-compat. I wasn't sure where to put it exactly. It's now in the ~Obsolete aliases~ page. > What about the new customization `ob-clojure-cli-command'? I added a news entry in ORG-NEWS. >> +(defcustom ob-clojure-nbb-command (or (executable-find "nbb") >> + (when-let (npx (executable-find "npx")) >> + (concat npx " nbb"))) >> "Path to the nbb executable." > > This is not a path anymore, when the value is "npx nbb". > Can just use "Command to invoke nbb executable". Fixed. Attached is the new patch with the changes. Thanks for your review and guidance, Daniel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ob-sql.el-Add-support-for-Athena.patch >From ddace051205d20b24c047962ca9d1335bdd90284 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 16 Jan 2023 11:35:02 +0100 Subject: [PATCH] lisp/ob-sql.el: Add support for Athena * lisp/ob-sql.el (org-babel-execute:sql): Add support for Athena --- lisp/ob-sql.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index 39a4573a5..640ecb2c0 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -53,14 +53,15 @@ ;; - rowname-names ;; ;; Engines supported: -;; - mysql +;; - athena ;; - dbi ;; - mssql -;; - sqsh -;; - postgresql (postgres) +;; - mysql ;; - oracle -;; - vertica +;; - postgresql (postgres) ;; - saphana +;; - sqsh +;; - vertica ;; ;; TODO: ;; @@ -254,6 +255,11 @@ This function is called by `org-babel-execute-src-block'." (org-babel-temp-file "sql-out-"))) (header-delim "") (command (cl-case (intern engine) + (athena (format "athenacli %s -e %s %s > %s" + (or cmdline "") + (org-babel-process-file-name in-file) + database + (org-babel-process-file-name out-file))) (dbi (format "dbish --batch %s < %s | sed '%s' > %s" (or cmdline "") (org-babel-process-file-name in-file) @@ -352,7 +358,7 @@ SET COLSEP '|' (progn (insert-file-contents-literally out-file) (buffer-string))) (with-temp-buffer (cond - ((memq (intern engine) '(dbi mysql postgresql postgres saphana sqsh vertica)) + ((memq (intern engine) '(athena dbi mysql postgresql postgres saphana sqsh vertica)) ;; Add header row delimiter after column-names header in first line (cond (colnames-p @@ -377,7 +383,7 @@ SET COLSEP '|' (goto-char (point-max)) (forward-char -1)) (write-file out-file)))) - (org-table-import out-file (if (string= engine "sqsh") '(4) '(16))) + (org-table-import out-file (if (memq (intern engine) '(athena sqsh)) '(4) '(16))) (org-babel-reassemble-table (mapcar (lambda (x) (if (string= (car x) header-delim) -- 2.39.0 --=-=-=--