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 yAZMOq9yuWOjAQEAbAwnHQ (envelope-from ) for ; Sat, 07 Jan 2023 14:25:04 +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 yFwUOq9yuWPpsQAAauVa8A (envelope-from ) for ; Sat, 07 Jan 2023 14:25:03 +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 A111E38F57 for ; Sat, 7 Jan 2023 14:25:03 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pE9BR-0006TN-Lt; Sat, 07 Jan 2023 08:24:25 -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 1pE9BP-0006Ru-5E for emacs-orgmode@gnu.org; Sat, 07 Jan 2023 08:24:23 -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 1pE9BN-00010u-GF for emacs-orgmode@gnu.org; Sat, 07 Jan 2023 08:24:22 -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 307DO8Fm016576 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 7 Jan 2023 13:24:09 GMT From: Andreas Gerler Content-Type: multipart/signed; boundary="Apple-Mail=_87867C3E-265A-4831-B061-B5C03F1DD681"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: [O] [PATCH] ob-eval: display error fix Message-Id: Date: Sat, 7 Jan 2023 14:24:01 +0100 To: emacs-orgmode@gnu.org 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]); Sat, 07 Jan 2023 13:24:10 +0000 (UTC) X-DCC--Metrics: heimdall.bundesbrandschatzamt.de 1102; Body=1 Fuz1=1 Fuz2=1 X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: PGP_BLOCK,SPF_PASS,TRACKER_ID,UNPARSEABLE_RELAY Received-SPF: permerror client-ip=198.7.63.95; envelope-from=baron@bundesbrandschatzamt.de; helo=mail.bundesbrandschatzamt.de X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, TRACKER_ID=0.1, T_SPF_PERMERROR=0.01 autolearn=no 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673097903; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=AXPF9kcY+wdWRwuA6j8Avw/b8RBF1/un10ropHO8kbQ=; b=QSt+BV7jngPSzyBfWkvYKc4hKz+LkBCbnHXOqlZcUdMN+AX/0oG5gSiTHaGodySDfONQ7M 7G6ndSmKCFnmicCOxO7M5Fl7w5nKYYPGGKJjs1u9UCci3gvWpZRamc3IBGlsVCNB/4YjpO RbJ7gpK9t6f1hZn0JrLIc48d7zmicfYx5bCW0ZZFVAIoWt7sXtqCBa8jV5NynQuK7dHBSy sv2DPentbEEXCpiWS7ySNGcKdRn/8QC+1h09OqCMcG6oIpDDpNtpp81Ni4jbhAMZuFO5QO Tdq9St+1h2KB3UZGIOpgCmOuQzYkBOrQbNIfCw4oHg10DM710Gm0/5Hei1LF0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673097903; a=rsa-sha256; cv=none; b=epQS3/WrgBFsvvE6UzaiH0kXZDnaTWepxD6KU9+inoLRz+/Lyp/XjD3ZdPEvJYQ12/F1Wy 8/IDV6LM/izHKtUpE/AobSiIP1gGTVSGX0wbKxnYByaoA1yLgqNk6N5gkOGC1Scnb14BHh V6QzSy8ibSL4/H1Qhr4XtyqlpCXR08KEqS1xxjyUDwP1hnpojPYf3BV5ZdR6LY72JyphAV SodhFg+FkSEsxEfY1QuzeXQoiCq3JwAykH6UZElrzO2WoBSTvLRwjH6lo6J7wF6SpghxPc PaFuvzMO1G2D1XKED0Ybawkp8zwhmAyVPKF8CIkk8T5RG5jCF0XlsAwsU/n21w== X-Spam-Score: -2.96 X-Migadu-Queue-Id: A111E38F57 Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.96 X-TUID: 7l9uEq4ew+xj --Apple-Mail=_87867C3E-265A-4831-B061-B5C03F1DD681 Content-Type: multipart/mixed; boundary="Apple-Mail=_E0E17508-45B3-4DD4-8391-223887241272" --Apple-Mail=_E0E17508-45B3-4DD4-8391-223887241272 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=20923c20d153400b5278e29464d68046535f319f6b=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|=2012=20+++++++++++-=0A=201=20file=20= changed,=2011=20insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/lisp/ob-eval.el=20b/lisp/ob-eval.el=0Aindex=206f6edb949..18ca48218=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,11=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(if=20org-babel-eval-error-display-notify=0A+=20=20=20= =20=20=20=20=20(display-buffer=20buf)=0A+=20=20=20=20=20=20(if=20(or=20= (not=20(numberp=20exit-code))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (>=20exit-code=200))=0A+=20=20=20=20=20=20=20=20=20=20(display-buffer=20= buf))))=0A=20=20=20(message=20"Babel=20evaluation=20exited=20with=20code=20= %S"=20exit-code))=0A=20=0A=20(defun=20org-babel-eval=20(command=20query)=0A= --=20=0A2.39.0=0A=0A= --Apple-Mail=_E0E17508-45B3-4DD4-8391-223887241272 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Dear all, since commit f7b16402e6a694d592210f766544f6114056b4b0 every sql code block is displaying the *Org-Babel Error Output* for me = due to warning messages from the database. I added a check to display the buffer only if non zero exit. The buffer still gets written. Additionally I added defcustom org-babel-eval-error-display-notify If anybody is in need to display everything he can toggle it. I signed my FSF papers in 2017 for an ob-sql patch. so long=E2=80=A6 Andreas Gerler =E2=80=94 http://www.bundesbrandschatzamt.de/~baron --Apple-Mail=_E0E17508-45B3-4DD4-8391-223887241272-- --Apple-Mail=_87867C3E-265A-4831-B061-B5C03F1DD681 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/JEFAmO5cnEACgkQlRrK1qSO /JENNw/9Hyn+gFGJJRUpZY4DDZ9yHtklA+AqDShHTQyVGdijaEN6VHoN+E69Nn1e qS4cGnnEIyr4ZORJOKSeaShTtC3b7uLZinFZWowf+P21+yxZA1X5B2VGPiW4gcHe FPimMG6VgIy5/0miOkrZlHY7ICKvXdsKUI3sKZJ1lrvJQ3b0AQOMtz8+IVWwyOBR xfq4btqTkU1Q/pGl6VkJfA2x/uPjaYr+ZcGO+MUDCD63pR7zdpdRZjc7jm3Ex1UM N3cnQMo0kGJVJZDbiDRrY3xrgIIGgVHFwwny9LCJH08198ewqImN/ggLMxtHnNQB /gRD28gQ/bWQZpJXCPXpr/+FmAtaFsxu1IC74TyTFDwMIlt+RpEcFTijCo/Kndb5 zUIsUSbBzg0KG9OAFS+JcDr646tRXXxHtBvZPRcnPHDzaBN+KAqBrVTlCyMrPXXz uxdoa/mRCr4N4D99rWwSU3LChDL4rwTpQUf1w4WROEHQfdvK4LOYK7FeODIdzfUg 4NpREW520//wmkSkxhhq/DmC/eWNF/U6RNW71vc9Y0JjpGPT5ZwycbIjUdQUWmT1 fS4fbHSTfG05dEmcW1b8aeD3lrdJYSSa2FB0O1FYjWfM7KHzcuhkvjfSB0WM0RHy JdevxICPTO4qcC3/urwk7ZmQQEq3YpTeuI5izv0qh5oSGsca6wQ= =3mev -----END PGP SIGNATURE----- --Apple-Mail=_87867C3E-265A-4831-B061-B5C03F1DD681--