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 4Om0A0fgyV7yWAAA0tVLHw (envelope-from ) for ; Sun, 24 May 2020 02:47:35 +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 vYMkO0bgyV5xPQAAB5/wlQ (envelope-from ) for ; Sun, 24 May 2020 02:47:34 +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 1B2FB9401AD for ; Sun, 24 May 2020 02:47:33 +0000 (UTC) Received: from localhost ([::1]:58386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcgfj-0007I7-Ak for larch@yhetil.org; Sat, 23 May 2020 22:47:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcgfN-0007Ho-BA for emacs-orgmode@gnu.org; Sat, 23 May 2020 22:47:09 -0400 Received: from mail-il1-x142.google.com ([2607:f8b0:4864:20::142]:38576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcgfM-000832-7r for emacs-orgmode@gnu.org; Sat, 23 May 2020 22:47:08 -0400 Received: by mail-il1-x142.google.com with SMTP id j2so14564088ilr.5 for ; Sat, 23 May 2020 19:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FvC6NiVZc+uqX1JbArgCHGa7+XCG5PP7/PWbeczh6Tw=; b=h5Oj0yVXcAB4YfI0+Q4XJtP3iarbJQ6q1BfBE1EcfXcpnAxossxmYxl0suTPxOFxeh VyssNaz8fa739mlOnNbMYbeSiWpsd/NRDRXpp9TH7Z5VwKHdAYt1odmk8VTMFiC1skPS orjxuo6lGNpSQpFxm6vYkSsBA/O1o9eYKsc49nfO3HNVTXzuTynp9U7y5L94/XZ65K3O nVutIVujBPRbFcfVP/HBTXvzSuiY4MQ1BmoWbiGnCxdnZie+Dv1TNFRkiWnd4AjQQ90H jYKcZruZACvrAs6ZOWwnZBe6LIryvOMRECqWIVK9CpNyERo+iMsedZnUzV2ppyvQnkKY nUuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FvC6NiVZc+uqX1JbArgCHGa7+XCG5PP7/PWbeczh6Tw=; b=j7FHpynPhCdcjQiGxw63uHWu5gYbNH2dr7Ydw2b8nxX56cd6PG5cY4Rj66+5Cj4xWx X3Z/quTBqjwUXgy8M8XUoCTZgGSOunkEJ4xxYttu+vCKBclxH6VKkJSS7Ddm6QN0HCic m49JCA5ulBcxYZzGAco65eZKAEsiGHidkWAiuMYjc0yUe1MjWPtTc1tFCh8ff2Czr1Wm 31rl4guqLNMOGTDWFfASG3fgnHC9NJ18H4T3qSv3/KOK/dJwjyrJr3yGLdESYwHBmkM9 sOlts3FJt773VcJc8cuo29dQi2D0DOM4TxDXzEsc+0WsV7ieirzOXu1cWsYLA8BvlAfk RFHQ== X-Gm-Message-State: AOAM533HK5nrnv/am/4yxDd8lc1/lFZw+2eu3AIcPaGOLqn7XJd1kNrX G6AsFepkdIjx7UKhPAo2m7z3MFRyQ1CdE6+H+X0= X-Google-Smtp-Source: ABdhPJzDuI8hLBPBDJqG44q7q3A4ZBBIHI6FVm/vOeQawplfasW55hm/R2VHWnz+mgkflw26raTiaDZ9LusYAOUqjWA= X-Received: by 2002:a92:7ec3:: with SMTP id q64mr19429814ill.193.1590288426639; Sat, 23 May 2020 19:47:06 -0700 (PDT) MIME-Version: 1.0 References: <87o8qjduhs.fsf@kyleam.com> In-Reply-To: From: Nick Daly Date: Sat, 23 May 2020 21:46:55 -0500 Message-ID: Subject: Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output To: Kyle Meyer Content-Type: multipart/mixed; boundary="000000000000c39f1a05a65be0dd" Received-SPF: pass client-ip=2607:f8b0:4864:20::142; envelope-from=nick.m.daly@gmail.com; helo=mail-il1-x142.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 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: , Cc: Org Mode 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=h5Oj0yVX; 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: -0.11 X-TUID: eWrfX3m0u7UW --000000000000c39f1a05a65be0dd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Apologies, one last patch. On Sat, May 23, 2020 at 7:02 PM Nick Daly wrote: > : "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: > \\*?[[:upper:]][\\._[:alnum:]]*\\)*\\( =CE=BB\\)?> " > > =3Dcomint-prompt-regexp=3D's variable documentation calls out much simple= r > regexps > > : "^[^>]+\\(> \\)?" This simplified patch breaks one case that I'd forgotten about: the true one-liner, where the output displays before the "Prelude> " prompt even appears. #+BEGIN_SRC haskell scanl (+) 0 [1,2,3,4] #+END_SRC #+BEGIN_EXAMPLE Prelude> scanl (+) 0 [1,2,3,4] "org-babel-haskell-eoe" [0,1,3,6,10] Prelude> "org-babel-haskell-eoe" Prelude> #+END_EXAMPLE This latest patch updates the original (more complicated) regexp that works with this out-of-order output. This should display the expected result in all known cases: One liners: #+BEGIN_SRC haskell scanl (+) 0 [1,2,3,4] #+END_SRC #+RESULTS: | 0 | 1 | 3 | 6 | 10 | Silent multi-line blocks: #+BEGIN_SRC haskell :results silent :{ flip' :: (a -> b -> c) -> (b -> a -> c) flip' f =3D \x y -> f y x :} #+END_SRC Multi-line blocks with value results: #+BEGIN_SRC haskell :{ sum' :: (Num a) =3D> [a] -> a sum' xs =3D foldl (\ acc x -> acc + x) 0 xs :} sum' [1,2,3,4] =3D=3D 10 #+END_SRC #+RESULTS: : True Multi-line blocks with output results: #+BEGIN_SRC haskell :results output :{ sum' :: (Num a) =3D> [a] -> a sum' xs =3D foldl (\ acc x -> acc + x) 0 xs :} print "hi" #+END_SRC #+RESULTS: : : hi Thanks again for your time, Nick --000000000000c39f1a05a65be0dd Content-Type: text/x-patch; charset="UTF-8"; name="ob-haskell-trim-prelude-4.diff" Content-Disposition: attachment; filename="ob-haskell-trim-prelude-4.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kakgmz1j0 ZGlmZiAtLWdpdCBhL2xpc3Avb2ItaGFza2VsbC5lbCBiL2xpc3Avb2ItaGFza2VsbC5lbAppbmRl eCBiZWExNjI1MjguLjZhYzM0ZjJmNSAxMDA2NDQKLS0tI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b21wdC1yZWdleHAgaGFza2VsbC1wcm9tcHQtcmVnZXhwKSkpCiAgIChsZXQqICgo c2Vzc2lvbiAoY2RyIChhc3NxIDpzZXNzaW9uIHBhcmFtcykpKQogICAgICAgICAgKHJlc3VsdC10 eXBlIChjZHIgKGFzc3EgOnJlc3VsdC10eXBlIHBhcmFtcykpKQogICAgICAgICAgKGZ1bGwtYm9k eSAob3JnLWJhYmVsLWV4cGFuZC1ib2R5OmdlbmVyaWMK --000000000000c39f1a05a65be0dd--