From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 UM8aJYO4amMqRQAAbAwnHQ (envelope-from ) for ; Tue, 08 Nov 2022 21:13:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KB0dJYO4amP5VAAA9RJhRA (envelope-from ) for ; Tue, 08 Nov 2022 21:13:55 +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 409EDC668 for ; Tue, 8 Nov 2022 21:13:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osUxt-00087k-A2; Tue, 08 Nov 2022 15:12:57 -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 1osTO5-00054a-0s for emacs-orgmode@gnu.org; Tue, 08 Nov 2022 13:31:53 -0500 Received: from smtp6-g21.free.fr ([212.27.42.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osTO2-0005nM-V6 for emacs-orgmode@gnu.org; Tue, 08 Nov 2022 13:31:52 -0500 Received: from tosh-laptop (unknown [IPv6:2a01:e0a:505:3460:1a16:a0c4:3f89:c0d9]) by smtp6-g21.free.fr (Postfix) with ESMTPS id 833AE78035D for ; Tue, 8 Nov 2022 19:31:45 +0100 (CET) Received: by tosh-laptop (sSMTP sendmail emulation); Tue, 08 Nov 2022 19:37:40 +0100 From: Bruno Barbier To: emacs-orgmode@gnu.org Subject: [PATCH] lisp/ob-haskell.el: Fix org-babel-script-escape expects a string Date: Tue, 08 Nov 2022 19:37:40 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=212.27.42.6; envelope-from=perso.bruno.barbier@free.fr; helo=smtp6-g21.free.fr 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, FREEMAIL_FROM=0.001, MISSING_MID=0.497, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action Message-Id: X-Mailman-Approved-At: Tue, 08 Nov 2022 15:12:55 -0500 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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667938435; 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=vPz0yGvPBZGyleld8AZkx0SO+gVquwXSvvJR6pqTnCs=; b=EoIUM7sj+Z0mkttGBNG91xs+7BNbQnsI2U3DicXwh98z3S17aJUa/zW1JkVuB9u0bxjwAC KlwRK+Gkpfej/y1eufqGgLz4UBbPH4Ha2spw+hCiC1HYHJH7/rpOlCRPKdNjxxaUxapA3a gvGXYRJpkJUy2t41wALwCsTEygLthzoTN09J7GEYgyCncujJXHTra1MgyRlB+E7fYwzuD3 LMwUhY6lz6KkW5FTsK+3IZkIYoOTrUic2FRytqFazR35baW4DJ+7HF6uIRc4PBmZ9QB2bx kDRvZDUYcoYbUMrP4lUsvlFTKK0tuYx3xEdeNUN4a59qKFnEeGjJk805mBjF+g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667938435; a=rsa-sha256; cv=none; b=khcZdt73ANBzmS5abwjSeDc6w+Q5PrKyJvAgOSjVsWOfQs/nz/dZeh0ZrvwbQeHgOAvB46 U2sIO+n9IQVVkeT8TxatT53VVr23m7L7XllWLkEVlDAAXF7Do8PNpSwmdAvMfr4Yi8QODq YC886y6o5OONjX1NbhczUrG4U/piDwzow//y6WX76Qxba53ehURZFkcvCO6QMFAPdlLqKg SaSZbiDguUwB2ngLI1W2Q5suFVJxVtt5K4xH7E+cU+LTiV8Yip7E58wK6KezaegMPpQ+yY Tl+rkv1S9XfaeGaQGzoh9IQ4NH6dAIewX7C3VPuchDONwvnAop8mGgxSq5RiBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=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-Spam-Score: 2.18 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=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-Queue-Id: 409EDC668 X-Spam-Score: 2.18 X-Migadu-Scanner: scn1.migadu.com X-TUID: gJeU/7l2U251 --=-=-= Content-Type: text/plain Hi, When running, for example, the following haskell block in ghci #+begin_src haskell v=2 #+end_src there is no result. The attached patch avoids calling `org-babel-script-escape' in such a case. Bruno. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-ob-haskell.el-Fix-org-babel-script-escape-expec.patch Content-Description: [PATCH] lisp/ob-haskell.el: Fix org-babel-script-escape expects a string >From d508dbf18e8edb95543a11774702f2a9bd4116e6 Mon Sep 17 00:00:00 2001 From: Bruno BARBIER Date: Tue, 8 Nov 2022 19:19:32 +0100 Subject: [PATCH] lisp/ob-haskell.el: Fix org-babel-script-escape expects a string * lisp/ob-haskell.el (org-babel-interpret-haskell): Don't call `org-babel-script-escape' when the result is nil. --- lisp/ob-haskell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el index 99e590bfb..095286c79 100644 --- a/lisp/ob-haskell.el +++ b/lisp/ob-haskell.el @@ -150,7 +150,7 @@ (defun org-babel-interpret-haskell (body params) (`output (mapconcat #'identity (reverse results) "\n")) (`value (car results))))) (org-babel-result-cond (cdr (assq :result-params params)) - result (org-babel-script-escape result))) + result (when result (org-babel-script-escape result)))) (org-babel-pick-name (cdr (assq :colname-names params)) (cdr (assq :colname-names params))) (org-babel-pick-name (cdr (assq :rowname-names params)) -- 2.37.4 --=-=-=--