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.
This commit is contained in:
Ihor Radchenko 2023-03-24 11:20:22 +01:00
parent 91c52e2ab6
commit 5bffb9a1e3
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 10 additions and 1 deletions

View File

@ -169,7 +169,16 @@ If there is not a current inferior-process-buffer in SESSION
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."