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 GPYAAN3i0177OQAA0tVLHw (envelope-from ) for ; Sun, 31 May 2020 17:01:16 +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 imyUN9zi017SewAAB5/wlQ (envelope-from ) for ; Sun, 31 May 2020 17:01:16 +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 9873994042B for ; Sun, 31 May 2020 17:01:16 +0000 (UTC) Received: from localhost ([::1]:37418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfRKl-00081W-Gg for larch@yhetil.org; Sun, 31 May 2020 13:01:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfRJq-0007xw-F5 for emacs-orgmode@gnu.org; Sun, 31 May 2020 13:00:18 -0400 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]:32957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfRJo-0004uy-5J for emacs-orgmode@gnu.org; Sun, 31 May 2020 13:00:17 -0400 Received: by mail-io1-xd41.google.com with SMTP id k18so4556433ion.0 for ; Sun, 31 May 2020 10:00:15 -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=pH15VXnepSZw8Y42GjOAdUhq56mHYAhIl3fQ4Ih2vFo=; b=rLfWPt5HAt+7c5iEAxCtayEx8oUWjRjH5YITpJnmTl9Jq7Czd1lku9oCQ+TOZlDUY5 3478FqfNYWJ3n5uqyX+Qh1yIxA7Usr7uirc7Gm/cq/toOIdy2W8LyWOUSXwhhW7ubxAx bKdmHEY1G7UFyeMBMh8SNXuqag1Cw3dGJhGRYQmvB556TnMbBYxnw4cqQb1SHEUupvBt HpJcyiXN6/0y0+RiXO5Cr2cXy+P/gbhp1GSvfmr5eqXKQffR/8c1ZGJeF/4KMdWzb8Ge vEO6aTjV3TNbeq3UYdxQNdPgR4NGV90kx5VWSkwoFWn8Kazmgi8v7nAELFFzqOjZW374 76ig== 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=pH15VXnepSZw8Y42GjOAdUhq56mHYAhIl3fQ4Ih2vFo=; b=csVNSyJhPUTkh+OSxMWYpsF89IFO57bilg6gXMuBHHDgM6PILjn/cTD+VPqB5rz8Dm pfbYWP/nes0UxF/KGGRfIPFAmfF8VohbqcLuAJuYzGs/dTRj98z5DhWwFFIA9oCoSFmD +MgXaLhgJKMpyn7uni1+uShAZ+HH35LjyX1q36HZ/StMmkAXHhN06da/01BIJ16hdJiI N9FYHVyR+tvBnxDIN6W6htrHCmz7DkOKXub++iGZulaIIc1YNCRSdlCNab1dp12VAPDI WibpCOEMWLURAR/wOLGR1V14UyjO5ebfz4O8uWueUH6kIL2x/qseyzp99/JYujzW1Q4M Uaag== X-Gm-Message-State: AOAM531l9cXyvB7YJIGC6xQhm9O+qbRgY/c/btrUOkG7rta0GSM/00Gj bVroEeQmXzWIcL/4FCOjb+Nb78xtF1AqXYshtdrLzc5y X-Google-Smtp-Source: ABdhPJxVAxSy3fXSZPLawRlk3OJNy3qFMmG/U4wrLHYyKbVKjSHOEQV6pI96FO4neTA4ZEZJ1MFuVnSjdjByGBFTIJE= X-Received: by 2002:a02:654a:: with SMTP id u71mr17845237jab.7.1590944414190; Sun, 31 May 2020 10:00:14 -0700 (PDT) MIME-Version: 1.0 References: <87367nlfw5.fsf@kyleam.com> In-Reply-To: <87367nlfw5.fsf@kyleam.com> From: Nick Daly Date: Sun, 31 May 2020 12:00:03 -0500 Message-ID: Subject: Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output To: Kyle Meyer Content-Type: multipart/mixed; boundary="000000000000aa6d7405a6f49c53" Received-SPF: pass client-ip=2607:f8b0:4864:20::d41; envelope-from=nick.m.daly@gmail.com; helo=mail-io1-xd41.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=rLfWPt5H; 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.89 X-TUID: 0fE/Ngw9C9U7 --000000000000aa6d7405a6f49c53 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Kyle, thank you again for your help and analysis. In summary, org-mode needs no patches, but inf-haskell's comint-prompt-regexp needs updates. I'll follow up with the inf-haskell maintainers. ---- > inf-haskell used to set comint-prompt-regexp in the body of > inferior-haskell-mode... This is inf-haskell's variable. > ob-haskell shouldn't set it. Thank you for your help in all this. I couldn't find where the regex was set in the org-mode source because it wasn't coming from org-mode at all. Putting this all together suggests that the correct fix is to update the inf-haskell regex to handle "Prelude| " correctly in the first place. I believe it's possible to compress the current inf-haskell regexp from this: (setq-local comint-prompt-regexp ;; Why the backslash in [\\._[:alnum:]]? "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: \\*?[[:upper:]][\\._[:alnum:]]*\\)*\\( =CE=BB\\)?> \\|^=CE=BB?> $") Down into this, without any significant loss of fidelity. We really don't care about any characters at the start of the line before the final "> ". (setq-local comint-prompt-regexp "^[[:alnum:].*_() |=CE=BB]*> ") This seems useful because, as I discovered this morning, importing modules mangles the prompt further: Prelude> import Data.Time Prelude Data.Time> :m + Data.Time.Clock Prelude Data.Time Data.Time.Clock> The testing data that this configuration correctly parsed is attached for reference. I'll figure out where to submit that patch to, and send it off. It's a single line change that shouldn't require any assignment papers. Thanks again, Nick --000000000000aa6d7405a6f49c53 Content-Type: text/plain; charset="US-ASCII"; name="ghc-prelude-prompt-testing.txt" Content-Disposition: attachment; filename="ghc-prelude-prompt-testing.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kavb6vo30 UHJlbHVkZT4gaW1wb3J0IERhdGEuVGltZQpQcmVsdWRlIERhdGEuVGltZT4gOm0gKyBEYXRhLlRp bWUuQ2xvY2sKUHJlbHVkZSBEYXRhLlRpbWUgRGF0YS5UaW1lLkNsb2NrPiBzY2FubCAoKykgMCBb MSwyLDMsNF0KIm9yZy1iYWJlbC1oYXNrZWxsLWVvZSIKWzAsMSwzLDYsMTBdClByZWx1ZGUgRGF0 YS5UaW1lIERhdGEuVGltZS5DbG9jaz4gIm9yZy1iYWJlbC1oYXNrZWxsLWVvZSIK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