emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH]: Fix ob-haskell.el to work with custom ghci prompts


From: Nicolas Goaziou
Subject: Re: [O] [PATCH]: Fix ob-haskell.el to work with custom ghci prompts
Date: Thu, 16 Nov 2017 22:04:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Doro Rose <address@hidden> writes:

> I noticed that ob-haskell.el doesn't support custom ghci prompts at present.
> Custom ghci prompts such as "λ>" are quite popular in the haskell community, 
> see for example
>
> https://stackoverflow.com/questions/42081379/how-to-set-up-org-babel-for-haskell-with-stack
>
> Could you have a look at the following patch and see, wether that would work 
> in general, wrt. coding standars etc.
> Obviously it works on my system, but I'm not an experienced elisp programmer, 
> so I guess there might be  room for
> improvement.

Thank you.

> +  (require 'inf-haskell)
> +  (add-hook 'inferior-haskell-hook
> +            (lambda ()
> +              (setq-local comint-prompt-regexp
> +                          (concat haskell-prompt-regexp "\\|^λ?> "))))

Doesn't this kind of configuration ultimately belongs to the user? Org
is not supposed to mess with `haskell-prompt-regexp' in the current
buffer, IMO.

>    (let* ((session (cdr (assq :session params)))
>           (result-type (cdr (assq :result-type params)))
>           (full-body (org-babel-expand-body:generic
>                    body params
>                    (org-babel-variable-assignments:haskell params)))
>           (session (org-babel-haskell-initiate-session session params))
> +      (comint-preoutput-filter-functions
> +            (cons 'ansi-color-filter-apply 
> comint-preoutput-filter-functions))

Ditto.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]