From ee6c0869f9995de8690871b92b975b0750f03543 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 24 Mar 2023 11:20:22 +0100 Subject: [PATCH 2/7] org-babel-haskell-initiate-session: Remove secondary prompt * lisp/ob-haskell.el (org-babel-haskell-initiate-session): Set secondary prompt to "". If we do not do this, org-comint may treat secondary prompts as a part of output. --- lisp/ob-haskell.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el index 909de19ab..8f9ae397a 100644 --- a/lisp/ob-haskell.el +++ b/lisp/ob-haskell.el @@ -169,7 +169,16 @@ (defun org-babel-haskell-initiate-session (&optional _session _params) then create one. Return the initialized session." (org-require-package 'inf-haskell "haskell-mode") (or (get-buffer "*haskell*") - (save-window-excursion (run-haskell) (sleep-for 0.25) (current-buffer)))) + (save-window-excursion + (run-haskell) + (sleep-for 0.25) + ;; Disable secondary prompt: If we do not do this, + ;; org-comint may treat secondary prompts as a part of + ;; output. + (org-babel-comint-input-command + (current-buffer) + ":set prompt-cont \"\"") + (current-buffer)))) (defun org-babel-load-session:haskell (session body params) "Load BODY into SESSION." -- 2.39.3