From 9d2a08caccde50d95dc8d7b8429db757b99068b9 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el index 2b1441c2a..f4197654c 100644 --- a/lisp/ob-haskell.el +++ b/lisp/ob-haskell.el @@ -169,7 +169,14 @@ (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. + (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.1