From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2FQbDTwowF7+NAAA0tVLHw (envelope-from ) for ; Sat, 16 May 2020 17:51:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SEoPCTwowF4IUwAAB5/wlQ (envelope-from ) for ; Sat, 16 May 2020 17:51:56 +0000 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 8812894042C for ; Sat, 16 May 2020 17:51:55 +0000 (UTC) Received: from localhost ([::1]:35688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ja0yX-0002qc-5U for larch@yhetil.org; Sat, 16 May 2020 13:51:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja0wG-0000Cs-T5 for emacs-orgmode@gnu.org; Sat, 16 May 2020 13:49:32 -0400 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]:32784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ja0wF-0000Jn-9F for emacs-orgmode@gnu.org; Sat, 16 May 2020 13:49:32 -0400 Received: by mail-il1-x136.google.com with SMTP id o67so1155396ila.0 for ; Sat, 16 May 2020 10:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=oqqo7FneLs8XTUPEkrHjySPvoIkjXorDZWahrkz61+Q=; b=cuvqOWx+3c8DMIgmq2+KJZtELyFP63C69EVpXyVpgENMRAiUodJlbFbhb3kklgU/TQ ZkGDDxxNXWsxGsQZtYkfFlJMnGfX8W+HTzNnjcVxQNzS0Z/7QGusIOFpjZpweYpGJUah l1u7gkZWiXRVQQwsC4jJp4b+F/918wPx6Lu8rHwsrcT/JozVXzU0vX7v4gYf6HKY3g/8 NszM8Au+agYMxdOZMmeUXubXQlmGKTZB8k1Q4gp2nvFIqR0enMSdQCHmyqVnj3+sxF7n wOD9Hi4gG91csHzp2kxr2CC5cIskCpcDi1W8maD212d2K0Q+2jJRPpDH3gvOz71GEw+X VBXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=oqqo7FneLs8XTUPEkrHjySPvoIkjXorDZWahrkz61+Q=; b=jA2i5LsEdbWgNgbXMf6/9Zuoo/ikZHtnomTacZdvn/LDtg2IfnPFuCtwYT6J+eSAbz /9igr8AT9dR0xpK+5yMryxjGSrUq0B/5OIz/5z8lqbNcNyDC+q+sFh+vv7r+9DF7ZeKp Oe3Ns01tGD0kn9XBmWg7YmH/Gr5TcdDUQNFEG/DWNVnXm2/a+AztGFV+wYjmh3MQ7UeM LRgGml5EF5Vuuh8bbs3oqEkNaZBXAueXIC8KdIsgQEKIyBuJsqToRfXGH4kVNOb3/svF kVQ6m/b3dkXtGLsO309+F7ogSHqPI3TSFHO4RxsN7Y/k/A8/EOiWy7BWzvk3N5WmC40a Hftg== X-Gm-Message-State: AOAM531W8hc8Lvyx0QgufI46kkHj1UJ4QHmLxJDbiUCjnZW7J3eFF3SJ 4sI3GngyEYrIgGk+RHozFC3KelEcsU1cRr1HTE/xwr7L X-Google-Smtp-Source: ABdhPJx4jxwCiWtmwqw1qMBk4IcSDv3RNp7zJeOcFMJd4A4jGvdNKELozaVkWePYzNIvSUxTfS0XSLSi8Qt2j+rcdBk= X-Received: by 2002:a92:7ec3:: with SMTP id q64mr7621895ill.193.1589651369434; Sat, 16 May 2020 10:49:29 -0700 (PDT) MIME-Version: 1.0 From: Nick Daly Date: Sat, 16 May 2020 12:49:18 -0500 Message-ID: Subject: Unnecessary Warnings Evaluating Haskell Blocks [patch] To: Org Mode Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::136; envelope-from=nick.m.daly@gmail.com; helo=mail-il1-x136.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=cuvqOWx+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: lWBgDSkDF7AU Hello Org Maintainers, This issue has been reproduced on org versions 9.1.14 and Git master, and comes with a patch. * Issue ob-haskell.el::org-babel-execute:haskell produces spurious error messages when running haskell blocks without =3D:results output=3D specified. If =3D:results=3D is not specified or is set to =3Dvalue=3D, or =3Dsilent=3D, evaluating haskell blocks with =3DC-c C-c=3D produces an erro= r message: : org-babel-script-escape: =E2=80=98org-babel-script-escape=E2=80=99 expect= s a string". Below is a minimal example that produces the unexpected behavior. * ECM The ECM is in two parts, below. 2. The Org sample that produces the error. 3. The minimal =3D~/.emacs=3D. You may need to install the =3Dghc=3D package to get the =3Dghci=3D executable. ** Org File #+name: ecm-error-message #+BEGIN_SRC org 1. Evaluate the addThree-delcare block to produce the error message. If you receive an error about how =3Dhaskell-prompt-regexp=3D is undefined, evaluate the block again, that is a transient error. Create the =3DaddThree=3D function that adds three to any number. Use =3D:results silent=3D to suppress the RESULTS block because we don't care about the results of a function declaration. ,#+name: addThree-declare ,#+begin_src haskell :results silent :{ addThree :: (Num a) =3D> a -> a addThree x =3D x + 3 :} ,#+end_src Observed behavior (without the patch below): "org-babel-script-escape: =E2=80=98org-babel-script-escape=E2=80=99 expec= ts a string" With the patch: (no output) 2. Apply the =3DaddThree=3D function and get the result: ,#+name: addThree-apply ,#+begin_src haskell addThree 10 ,#+end_src With and without the patch: ,#+RESULTS: addThree-apply : 13 #+END_SRC ** .emacs This is the minimal example .emacs file to produce this error: #+BEGIN_SRC elisp (require 'org) (require 'ob-haskell) (setq org-babel-load-languages '((haskell . t))) #+END_SRC * Patch This unnecessary error message can be corrected with the following patch that applies cleanly on both Debian Stable's Org version 9.1.14 and the current git master (commit #93c50e3a7867a1a85fc78b337172585f7a10dcc6). #+BEGIN_SRC diff --- org-9.1.14/ob-haskell.el +++ org-9.1.14/ob-haskell.el @@ -92,7 +92,7 @@ (`output (mapconcat #'identity (reverse (cdr results)) "\n")= ) (`value (car results))))) (org-babel-result-cond (cdr (assq :result-params params)) - result (org-babel-script-escape result))) + result (if (stringp 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)) #+END_SRC This error may also prevent execution entirely in different configurations, but I have not been able to reliably confirm that behavior: https://emacs.stackexchange.com/questions/35709/cannot-execute-org-babel-ha= skell-block Thank you for your time, Nick