From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 0ID+N6DOymNEfAAAbAwnHQ (envelope-from ) for ; Fri, 20 Jan 2023 18:25:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0EMjN6DOymPa8wAAG6o9tA (envelope-from ) for ; Fri, 20 Jan 2023 18:25:52 +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 4A23B2F134 for ; Fri, 20 Jan 2023 18:25:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIv8R-0007oQ-Mh; Fri, 20 Jan 2023 12:25:03 -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 1pIv8P-0007o9-Jn for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 12:25:01 -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 1pIv8N-0005gL-KV for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 12:25:01 -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 30KHOmXs002371 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 20 Jan 2023 17:24:50 GMT From: Andreas Gerler Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_69541A6A-2287-4C55-9481-627FEE0C1682"; 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:24:41 +0100 In-Reply-To: <87cz7ebwig.fsf@kraus.my> 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:24:51 +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=1674235552; a=rsa-sha256; cv=none; b=IMtvK4j7jvftqWOlBVmMNwkDlLZnhfHg88F+ltvgRjrIM65ksdFzrjqp/2yoY0QgjGkkyH 3MM87HKlCzeV7cMopKsXHrzNWC0YyPbu/F/n/nm7eKrM9D71bAZlciQwMp1EO+kKwKxBPs xE3XXK2Od5JBeTlXHo8BEnvCgnlROfdzINLY8YYjWeGXXYPevrB89CKVJP6s2tebqI+yMt Zdb3VZVYC8lHIDkeNTXCgulx4i9kOeXO6oQbVPjwxTIswTInqCr/Fp8SLvBKJGfw2BDX66 6W+97Usrh9d9yBGxyqStzQL8df6CpdMTs+wlq6BRJodoxACoZtgdLzAQR5iWYw== 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=1674235552; 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=oUW9cRQYrntPf/jgsxEcCd9v83qMGdE4ZvEYNZNLv1Q=; b=DWRjcyTx+8tpiexm1NO/TXpXtojV2Db1N8n8a9Sx1o2EonuLZ86o8PaQJ2YKY3mNP5Y4k8 quIHCPeOQy0FUnqX3igVFCvi5pRbbCnM8G2pUm2wdAsJMqNUoZXEZhdHUq28LD6cA/E+Cu sbYBf3MtU0FBcfm3H6HpSQwLUYRltO5jia03gbyZOpEd93JyLZLUGI2RhJp5RV/T5z1MFI 8IHmRVe3UT9zDpIGjlqloBs8tR4sSu2ebnqd45UEyFODs4FbWlHtuRtlbmjE+bZF99BZ+a LjdjDrNt9RgJ/pTbh1JiCgYfHEsOywbpmVQssJFoKqAcyLmbVOWHeXuZS1VRXg== X-Spam-Score: -4.31 X-Migadu-Queue-Id: 4A23B2F134 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: zJij8q5j0tbC --Apple-Mail=_69541A6A-2287-4C55-9481-627FEE0C1682 Content-Type: multipart/mixed; boundary="Apple-Mail=_33A34225-F59A-4390-B9EC-6ADD63D3C185" --Apple-Mail=_33A34225-F59A-4390-B9EC-6ADD63D3C185 Content-Disposition: attachment; filename=0001-lisp-ob-eval.el-Display-error-fix.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-lisp-ob-eval.el-Display-error-fix.patch" Content-Transfer-Encoding: quoted-printable =46rom=20db391f4123a62aa214741d6b1eb43b0a1e06f1b9=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Andreas=20Gerler=20= =0ADate:=20Sat,=207=20Jan=202023=20= 14:04:03=20+0100=0ASubject:=20[PATCH]=20*=20lisp/ob-eval.el:=20Display=20= error=20fix=0A=0A*=20lisp/ob-eval.el:=20(org-babel-eval-error-notify):=20= Display=20standard=0Aerror=20only=20if=20command=20exits=20non=20zero.=0A= =0AThe=20problem=20is=20that=20sql=20connections=20might=20give=20= warnings.=0ANow=20the=20information=20is=20available=20in=20the=20= *Org-Babel=20Error*=20buffer=0Awithout=20displaying.=0AIf=20you=20need=20= always=20display=20toggle=20org-babel-eval-error-display-notify.=0A=0A= Signed-off-by:=20Andreas=20Gerler=20=0A= ---=0A=20lisp/ob-eval.el=20|=2011=20++++++++++-=0A=201=20file=20changed,=20= 10=20insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/lisp/ob-eval.el=20b/lisp/ob-eval.el=0Aindex=206f6edb949..f4659fe96=20= 100644=0A---=20a/lisp/ob-eval.el=0A+++=20b/lisp/ob-eval.el=0A@@=20-36,6=20= +36,12=20@@=0A=20(defvar=20org-babel-error-buffer-name=20"*Org-Babel=20= Error=20Output*")=0A=20(declare-function=20org-babel-temp-file=20= "ob-core"=20(prefix=20&optional=20suffix))=0A=20=0A+(defcustom=20= org-babel-eval-error-display-notify=20nil=0A+=20=20"Display=20= org-babel-eval-errors=20always=20or=20only=20if=20exit=20code=20is=20not=20= 0."=0A+=20=20:group=20'org-babel=0A+=20=20:version=20"29.1"=0A+=20=20= :type=20'boolean)=0A+=0A=20(defun=20org-babel-eval-error-notify=20= (exit-code=20stderr)=0A=20=20=20"Open=20a=20buffer=20to=20display=20= STDERR=20and=20a=20message=20with=20the=20value=20of=20EXIT-CODE."=0A=20=20= =20(let=20((buf=20(get-buffer-create=20org-babel-error-buffer-name)))=0A= @@=20-45,7=20+51,10=20@@=0A=20=20=20=20=20=20=20=20=20(unless=20(bolp)=20= (insert=20"\n"))=0A=20=20=20=20=20=20=20=20=20(insert=20stderr)=0A=20=20=20= =20=20=20=20=20=20(insert=20(format=20"[=20Babel=20evaluation=20exited=20= with=20code=20%S=20]"=20exit-code))))=0A-=20=20=20=20(display-buffer=20= buf))=0A+=20=20=20=20(when=20(or=20org-babel-eval-error-display-notify=0A= +=20=20=20=20=20=20=20=20=20=20=20=20(or=20(not=20(numberp=20exit-code))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20(>=20exit-code=200)))=0A+=20=20=20=20= =20=20=20=20(display-buffer=20buf)))=0A=20=20=20(message=20"Babel=20= evaluation=20exited=20with=20code=20%S"=20exit-code))=0A=20=0A=20(defun=20= org-babel-eval=20(command=20query)=0A--=20=0A2.39.0=0A=0A= --Apple-Mail=_33A34225-F59A-4390-B9EC-6ADD63D3C185 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > 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 --Apple-Mail=_33A34225-F59A-4390-B9EC-6ADD63D3C185-- --Apple-Mail=_69541A6A-2287-4C55-9481-627FEE0C1682 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/JEFAmPKzlkACgkQlRrK1qSO /JFjVA/7BIOUqJDHBpfHtCRy3bY22K+uhoL/53v1ddOdk1sfJ3wrONMFslrd08Ak HPBhwIzYr6Fm+kprjHJwL82t2g4p6OrTvTGXyTqLHAL1HpmlfSJlDvv8LWyo0PBu Vx5l6plkqhKDdvXBa0i81cSbDVrwFRqul39XCQ2222WSwFoidrKQupt9hy1oFOwl ngT3oM8uK0ugNGEZZDcKfthKzyNN/iEv+FOi/JRNClLZ6jIWjsCo5OnG8JwklP0k /d4l2Mx271pLBYn8ULyPs1YVoKeisZaKOZWx7b/iji4ts6MutZ7QvE3CNMBJNfQA SJXQYEmt1Ux8TXgpFrj/s+jqN4J10Jc2o6Urbn0goTceZE7qesvrRR5SXq/fqu+3 GzAYUMGPFJuGc3b6gnxYX4o0guGkPOFBwnlidMHS5fC5PVMPOyVSUUo5C8SWzoJL tU/6TggEJtfOqzOYZJS6xsouPs8rYJZN6VqiqAq4R9u8OkvHNu5x4KjVilRekVTO cNlCfcj3m5LChf4XaAB858gbjPVprXiZ/L6EMRSmLV+BtfaZxhH3uZYe4eButRHl kJzHGc2Jb93gWNJzHCE8jZbZHx95t/DFHUC+PSBXXuIYpLud4DW0MgtndVpMeKFj OhhaVrW9qvFhFAls0O6bGBSotpD310leZoxSBZs8TDL3EzWyS/w= =Of2Z -----END PGP SIGNATURE----- --Apple-Mail=_69541A6A-2287-4C55-9481-627FEE0C1682--