From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 CO+rL/gt02MijwAAbAwnHQ (envelope-from ) for ; Fri, 27 Jan 2023 02:50:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yNWqL/gt02MkuwAAauVa8A (envelope-from ) for ; Fri, 27 Jan 2023 02:50:48 +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 6785112F30 for ; Fri, 27 Jan 2023 02:50:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLDsT-0001LC-HQ; Thu, 26 Jan 2023 20:50:05 -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 1pLDsS-0001Ku-JU for emacs-orgmode@gnu.org; Thu, 26 Jan 2023 20:50:04 -0500 Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLDsQ-0005Vr-Cw for emacs-orgmode@gnu.org; Thu, 26 Jan 2023 20:50:04 -0500 Received: from fw.net.yu.netyu.xyz ( [223.94.109.149]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 48b0d409 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Jan 2023 01:49:52 +0000 (UTC) References: <94980226-D29A-4969-8640-1143A1979164@bundesbrandschatzamt.de> User-agent: mu4e 1.8.13; emacs 29.0.60 To: Andreas Gerler Cc: emacs-orgmode@gnu.org Subject: Re: [O] [PATCH] ob-eval: display error fix Date: Fri, 27 Jan 2023 09:48:31 +0800 In-reply-to: <94980226-D29A-4969-8640-1143A1979164@bundesbrandschatzamt.de> Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@netyu.xyz; helo=mail.netyu.xyz X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FROM_SUSPICIOUS_NTLD=0.498, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Reply-to: Ruijie Yu From: Ruijie Yu via "General discussions about Org-mode." 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=1674784248; h=from:from:sender:sender:reply-to: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=jxCR9eAjdg6A2W+LGIjUYyz9Nd2XA+6Kc2sZLzf+y8c=; b=tn4bxTeWOIN+xArsgr7BHPCqIaTVzdCzH4vVgpvqtZFrXMm8Kgz/GDjJpxzJLgiubHDSZP mXF7LgjogIZYRJY2RK2iHNsJ/0idSEC5cCl825nYmuoPmtX45EXS8H5eRgLaj+hc7WAELy b6Ruz6rNdsVf3xmUakrB38y1qM8zbbO1HfyfmCloHtuoQWshu2ryv9gOzGIhY93sD+gR1p +ILfFu0MeI+nPIkhxnq1yO49D90RwwVCSLK5rni5VBI35lnHCL/XJL3cTL00MLdWeCH1rd CUXmkL47zt9OPWfFZXJt6PXDsFV/U3eLgzoKowujMqRtk3G2ifUjJtOgaDH21Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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-Seal: i=1; s=key1; d=yhetil.org; t=1674784248; a=rsa-sha256; cv=none; b=YITbrVKZWtLfxINx9YKpKUdRAV2vWaxC/7Cj0ZklX58riMKA4VsJCMMuqIviSa6l5+TXGR DVWcClOwuRkP0uukcJ2D/DJlgMK6M/VCUrGwep5i02/gD1kEpLZ+NQp0eGQtNwFgI+HlJS t2HEdlbtpimLbTgzTW7FHXg+dw0/oRzybDq7Gdm1LwsvHa29ZuGu+DHtT4rOurskJDrG8H YuHQLrGahYoo4KMBw3u1jj2Bd6fgdEm0UeH6MNJdKk578JzkxHC4AdHi6ylumuKkQziXh7 n5mJFt4xeXhzSn6u0a4/bDBrrs1Tebj+D5AV7QBG5qgBTV7ZRlYslzlhTAe37g== X-Spam-Score: -1.87 X-Migadu-Spam-Score: -1.87 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 6785112F30 X-Migadu-Scanner: scn1.migadu.com X-TUID: 3YfvnGW17MtL Ping -- I don't think anyone else has replied / reviewed this patch yet, unless it has happened in a different thread. Best, RY Andreas Gerler writes: > [[PGP Signed Part:Undecided]] > > [2. text/x-patch; 0001-lisp-ob-eval.el-Display-error-fix.patch]... > > > > Hi Ruijie, > > thanks for asking. > I combined them now and tested again all variants. > > Andreas > >> On 7. Jan 2023, at 22:33, Ruijie Yu via General discussions about Org-mode. wrote: >> >> >> Hi Andreas, >> >> - (display-buffer buf)) >> + (if org-babel-eval-error-display-notify >> + (display-buffer buf) >> + (if (or (not (numberp exit-code)) >> + (> exit-code 0)) >> + (display-buffer buf)))) >> >> Quick question, does it help or hurt readability if we change this >> nested `if' into a `cond' expression? >> >> Or, alternatively, since both the outer then branch and the inner then >> branch are the same expression, maybe we can just combine all three >> conditions into a single `or' call? >> >> Something like >> >> (when (or org-babel-eval-error-display-notify >> (not (numberp exit-code)) >> (> exit-code 0)) >> (display-buffer buf)) >> >> Best, >> >> >> RY >> > > [[End of PGP Signed Part]]