From 0112cb1b2531a8defb51234844badc74dad07e5e Mon Sep 17 00:00:00 2001 Message-Id: <0112cb1b2531a8defb51234844badc74dad07e5e.1679653723.git.yantar92@posteo.net> In-Reply-To: <1273b5b415fa420e718645452bc75bc7a9407af5.1679653723.git.yantar92@posteo.net> References: <1273b5b415fa420e718645452bc75bc7a9407af5.1679653723.git.yantar92@posteo.net> From: Ihor Radchenko Date: Fri, 24 Mar 2023 11:20:22 +0100 Subject: [PATCH 2/4] 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