Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-31 Thread Nick Daly
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

Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-25 Thread Kyle Meyer
Nick Daly writes: > On Sat, May 23, 2020 at 7:02 PM Nick Daly wrote: >> : "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: >> \\*?[[:upper:]][\\._[:alnum:]]*\\)*\\( λ\\)?> " >> >> =comint-prompt-regexp='s variable documentation calls out much simpler >> regexps >> >> : "^[^>]+\\(> \\)?" > > This simplified

Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-25 Thread Kyle Meyer
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

Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-23 Thread Nick Daly
Apologies, one last patch. On Sat, May 23, 2020 at 7:02 PM Nick Daly wrote: > : "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: > \\*?[[:upper:]][\\._[:alnum:]]*\\)*\\( λ\\)?> " > > =comint-prompt-regexp='s variable documentation calls out much simpler > regexps > > : "^[^>]+\\(> \\)?" This simplified pa

Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-23 Thread Nick Daly
Hi Kyle, thanks for the thoughtful analysis. On Wed, May 20, 2020 at 12:51 AM Kyle Meyer wrote: > So it looks like the member call above is returning nil because the > prompt markers are corrupting the element. If that's the case, it seems > like the output cleansing should happen upstream of th

Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-19 Thread Kyle Meyer
Nick Daly writes: > Attached is an updated patch that makes output trimming work with > blocks that do and don't produce results. The old patch creates a > =let: Wrong type argument: arrayp, nil= error when evaluating blocks > that don't produce output. This necessarily incorporates yesterday's

Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-17 Thread Nick Daly
Hi Org Maintainers, Attached is an updated patch that makes output trimming work with blocks that do and don't produce results. The old patch creates a =let: Wrong type argument: arrayp, nil= error when evaluating blocks that don't produce output. This necessarily incorporates yesterday's patch.

[PATCH] ob-haskell: Line Continuations Mangle Block Output

2020-05-17 Thread Nick Daly
Hi Org Maintainers, Please see the attached patch to remove "Prelude> " and "Prelude| " line continuations from the block result output when parsing blocks that contain multi-line function declarations. This likely requires yesterday's patch to return value-type results from Haskell blocks. This