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 ms5.migadu.com with LMTPS id SL1qCBXQymPVSAAAbAwnHQ (envelope-from ) for ; Fri, 20 Jan 2023 18:32:05 +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 +IJoCBXQymOpcAEAauVa8A (envelope-from ) for ; Fri, 20 Jan 2023 18:32:05 +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 DFCCC2F60D for ; Fri, 20 Jan 2023 18:32:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIvEK-0002d7-3P; Fri, 20 Jan 2023 12:31:08 -0500 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 1pIvEI-0002cH-0L for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 12:31:06 -0500 Received: from mail.bundesbrandschatzamt.de ([198.7.63.95]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIvEG-00077j-8Z for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 12:31:05 -0500 Received-SPF: pass (mail.bundesbrandschatzamt.de: authenticated connection) receiver=mail.bundesbrandschatzamt.de; client-ip=91.64.203.22; helo=smtpclient.apple; envelope-from=baron@bundesbrandschatzamt.de; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from smtpclient.apple (ip5b40cb16.dynamic.kabel-deutschland.de [91.64.203.22]) (authenticated bits=0) by mail.bundesbrandschatzamt.de (8.14.7/8.14.7) with ESMTP id 30KHV0in002937 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 20 Jan 2023 17:31:01 GMT From: Andreas Gerler Message-Id: <700D6DBB-3DA1-4FDC-AC4E-85274C5DD931@bundesbrandschatzamt.de> Content-Type: multipart/signed; boundary="Apple-Mail=_8A376D16-ECA0-4ACC-9DD8-23B871639559"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: [BUG] ob-sql sql-connection-alist Date: Fri, 20 Jan 2023 18:30:53 +0100 In-Reply-To: Cc: emacs-orgmode@gnu.org To: Daniel Kraus References: <87cz7ebwig.fsf@kraus.my> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.bundesbrandschatzamt.de [198.7.63.95]); Fri, 20 Jan 2023 17:31:01 +0000 (UTC) X-DCC-MGTINTERNET-Metrics: heimdall.bundesbrandschatzamt.de 1170; Body=2 Fuz1=2 Fuz2=2 X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: PGP_BLOCK,SPF_PASS,UNPARSEABLE_RELAY Received-SPF: permerror client-ip=198.7.63.95; envelope-from=baron@bundesbrandschatzamt.de; helo=mail.bundesbrandschatzamt.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01 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-Seal: i=1; s=key1; d=yhetil.org; t=1674235925; a=rsa-sha256; cv=none; b=Ursq7Yd68Il49yczFucv3kCKRhVmAZXynSPGKdNpNTC3F47+CLK2/0MmELvazc0+B0R6tx E7b55KewdY7glf9hWdKoEycApvLBBbI+HHLdvKi1+gzRILyP0s1pvfMK0Ml6ta5TdebxQJ BulabLtkA8WNSGvVhvj4YEiy1TvB/xIbI1iHxd0GiSdO2px36Q3tCJpyhIoJCUeMdUbjJB nn9wZ7ZgJ9DB7VsHKW9r6rkXkxj3f9DT8YrtEcx/lTkCDZ16LtTg8MFomYAJ/iDvvfOrGI 12jBR1hY3m23KcngcU08lYIVYdkKKSfUfVoJlev0QOjskQlQEy30QiBoOAK7rQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674235925; 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; bh=ULrOgLsR1cGI7+KCoqXZgMAlRTeEQff9w8gSXjXIU0o=; b=I0XIFG6Qr8ydQWIvlpre6eRPSmdsrZBa/rM9q8RCHLkm0ACkjrLQvIEkQ4ALiRyouNuYTC jitZWGFzLrUkgCaHjHGexVjQGGBUYWq6WawIvdSgk/dSla6tjKP/1YAR9D5oz8wWTF0lt2 SU0Bono3w2RhyOSpcd3Rb/+c4qY6ppNyfCiDOk3k9xwB+C+B7/N9shaQkIi2X8h/6eGo3q tOvb2DkRqIawJyjoty3T5qlEZm18F5isBCOWga2CtqyIuJJWS8PFkW67RUUp8TWQw1lMvu zAbdv956qZbgoMlDbxdMUFt72chlzwOmwcTmA3CTUUBfQ9/Zvph1mvG3MCIazw== X-Spam-Score: -4.31 X-Migadu-Queue-Id: DFCCC2F60D Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.31 X-TUID: 27VIlQtyAcKM --Apple-Mail=_8A376D16-ECA0-4ACC-9DD8-23B871639559 Content-Type: multipart/mixed; boundary="Apple-Mail=_1A12FE64-B41F-4262-90E1-8151F494119D" --Apple-Mail=_1A12FE64-B41F-4262-90E1-8151F494119D Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Sorry. That was the wrong patch. --Apple-Mail=_1A12FE64-B41F-4262-90E1-8151F494119D Content-Disposition: attachment; filename=0001-lisp-ob-sql.el-allow-string-in-sql-connection-alist.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-lisp-ob-sql.el-allow-string-in-sql-connection-alist.patch" Content-Transfer-Encoding: quoted-printable =46rom=2012661647049bbadeff470c56d17fafc44cae6163=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Andreas=20Gerler=20= =0ADate:=20Fri,=2020=20Jan=202023=20= 18:17:51=20+0100=0ASubject:=20[PATCH]=20lisp/ob-sql.el:=20allow=20string=20= in=20sql-connection-alist=0A=0ASigned-off-by:=20Andreas=20Gerler=20= =0A---=0A=20lisp/ob-sql.el=20|=202=20+-=0A= =201=20file=20changed,=201=20insertion(+),=201=20deletion(-)=0A=0Adiff=20= --git=20a/lisp/ob-sql.el=20b/lisp/ob-sql.el=0Aindex=20= 39a4573a5..f73e7003f=20100644=0A---=20a/lisp/ob-sql.el=0A+++=20= b/lisp/ob-sql.el=0A@@=20-234,7=20+234,7=20@@=20database=20connections."=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(:database=20.=20sql-database)))=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(mapped-name=20(cdr=20= (assq=20name=20name-mapping))))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(cadr=20(assq=20mapped-name=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(cdr=20(assoc=20dbconnection=20= sql-connection-alist))))))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(cdr=20(assoc-string=20dbconnection=20= sql-connection-alist=20t))))))))=0A=20=0A=20(defun=20= org-babel-execute:sql=20(body=20params)=0A=20=20=20"Execute=20a=20block=20= of=20Sql=20code=20with=20Babel.=0A--=20=0A2.39.0=0A=0A= --Apple-Mail=_1A12FE64-B41F-4262-90E1-8151F494119D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 20. Jan 2023, at 18:24, Andreas Gerler = wrote: >=20 > <0001-lisp-ob-eval.el-Display-error-fix.patch> >=20 >> On 16. Jan 2023, at 11:25, Daniel Kraus wrote: >>=20 >> Hi! >>=20 >> Andreas Gerler writes: >>=20 >>> Last week I heard about using ob-sql with credentials stored in the = variable used by isql. >>> However I had to modify ob-sql to get it actually working. >>> Can somebody test the pach before I send in a commit? >>>=20 >>> #+begin_src sql :engine mysql :dbconnection testdb >>> show tables; >>> #+end_src >>=20 >> I actually use this feature daily. >> You have to quote the dbconnection. So this works currently: >>=20 >>> #+begin_src sql :engine mysql :dbconnection 'testdb >>=20 >> but I would agree that not needing the quote makes sense. >> And since `assoc-string` works with symbol and string (i.e. it's = backwards compatible) >> I would install the patch if you send it. >>=20 >>> I was considering writing another patch to map the sql-product to = engine. >>> That way we could get rid of another parameter in the src block. >>> Opinions? >>=20 >> I agree. Specifying :engine when it's already in the connection-alist = is unnecessary. >>=20 >> Thanks, >> Daniel >=20 --Apple-Mail=_1A12FE64-B41F-4262-90E1-8151F494119D-- --Apple-Mail=_8A376D16-ECA0-4ACC-9DD8-23B871639559 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIzBAEBCgAdFiEERvQn3i5iUQoCDew4lRrK1qSO/JEFAmPKz80ACgkQlRrK1qSO /JFsiw/9HeLmmo0jNcp/zhGR2c3JF92mi0i+5+4SB3rz5l5c9ppw6i2GEE6WGYhC VATNC0Nw8dVYebv36DMndHcfq5dHX01AeED+87qyvhPBaMJFljjPlRktjPLh5EqT hcyrbQ+W/DosAXLqtV7AtFNPXZ5M0hbUxLdvmvGS+6qAo2QdZvsWQCiqWSxJJ9Hs sf+CqTkMqlnW6xROIiDc+h+jmGLllecxevYUBblmZJfbLDzwybbkQsPIcBviT86w VqMcWvGRUQ1zjMusfEy5MKVmv+dUkWpzovBo1Hk9b9uE5jP7GCN5VKr/TXAdcd2a yIVVesVj2Dj2rmsnDshP7kwRGqPa70aX+xXEuZK/dnw5SqALhw0VjFOjV2xw9wrL KGAX21GoeulubmJvDxcllOwsSvTSskbG1Mp+4Os8tuFz4qVyqMogxwaJt7hNqWkj y6KQbQGnKkyl3ZpeRVHrCtFjL9ejK1jVP3bfoDjk5fLIummIEQ8Y3q8kCZbYkYF+ vFC8i3ud/4Om3wlLyge+bMcL4M7V2U3q4Vql7FKExo2d1ZmvguEVXg57kuxYTW47 7eM8Nbjjf0Hk3daAE9rp/u2CwGENQuJ59vh9SAfP2yEG2kSd/A4lSCisQIMS9zZi VS112yB5ouQFV5ypPebzACCUdobYYQa7b32efOyfGCGj9WD42Nc= =BUh+ -----END PGP SIGNATURE----- --Apple-Mail=_8A376D16-ECA0-4ACC-9DD8-23B871639559--