From: Kyle Meyer <email@example.com> To: Nick Daly <firstname.lastname@example.org> Cc: Doro Rose <email@example.com>, Org Mode <firstname.lastname@example.org> Subject: Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output Date: Tue, 26 May 2020 00:02:51 +0000 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <CAM-YhhBoFSf02UDZO0B-qkoaA2DbnJ9Kbb8HcR3ehJzLqPs1Xg@mail.gmail.com> Nick Daly writes: > After a bit of tinkering, I realized there are two things going on > here, only one of which I fully understand: > > 1. My core functional issue is that =comint-prompt-regexp= isn't set > up to handle the "Prelude| " entries or the repeated prompts. The > other patches I submitted were unnecessary. > > 2. The =comint-prompt-regexp= gets default values from somewhere I > don't understand and can't find with a quick source grep. Here's what I can gather. inf-haskell used to set comint-prompt-regexp in the body of inferior-haskell-mode. Here's an example from 11d6abf (2017-08-24): (setq-local comint-prompt-regexp ;; Why the backslash in [\\._[:alnum:]]? "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: \\*?[[:upper:]][\\._[:alnum:]]*\\)*\\( λ\\)?> \\|^λ?> $") In ca94d81 (revamped inf-haskell, 2017-08-26), which was included in the v17.1 release, haskell-prompt-regexp was introduced and the line above is now (setq-local comint-prompt-regexp haskell-prompt-regexp) > In ob-haskell, we set =comint-prompt-regexp= to the (undefined) > haskell-prompt plus "or optional-lambda": With a haskell-mode after the commit I point to above, it shouldn't be undefined at the time we set comint-prompt-regexp because org-babel-interpret-haskell loads inf-haskell before that. However, I'm confused why Org's b46787743 (Fix ob-haskell.el to work with custom ghci prompts, 2017-12-02) added the λ bit (author of that patch cc'd). As far as I can tell, that is a part of inferior-haskell-mode's default comint-prompt-regexp and has been since 28997b2 (Add support for popular "λ> " prompt to inf-haskell, 2013-07-04). You've sent an updated patch in a follow-up message, so I'll continue there...
prev parent reply other threads:[~2020-05-26 0:03 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-17 19:30 Nick Daly 2020-05-17 20:07 ` Nick Daly 2020-05-20 5:51 ` Kyle Meyer 2020-05-24 0:02 ` Nick Daly 2020-05-24 2:46 ` Nick Daly 2020-05-26 0:05 ` Kyle Meyer 2020-05-31 17:00 ` Nick Daly 2020-05-26 0:02 ` Kyle Meyer [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).