From cd5229e0b7f43b5960e947555a5bfdb77f5528df Mon Sep 17 00:00:00 2001 From: Christophe Troestler Date: Fri, 12 Apr 2019 00:52:28 +0200 Subject: [PATCH] Comint: use a pty to communicate with the OCaml subprocess This is necessary to display output of external functions. Example using C types: #require "ctypes.foreign";; open Ctypes;; let puts = Foreign.foreign "puts" (string @-> returning int);; puts "hello";; Fixes https://github.com/ocaml/tuareg/issues/83 --- tuareg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuareg.el b/tuareg.el index bf0e333e..6b513e36 100644 --- a/tuareg.el +++ b/tuareg.el @@ -3041,7 +3041,7 @@ I/O via buffer `*OCaml*'." tuareg-interactive-program)))) (unless (comint-check-proc tuareg-interactive-buffer-name) (let ((cmdlist (tuareg--split-args tuareg-interactive-program)) - (process-connection-type nil)) + (process-connection-type t)) (set-buffer (apply (function make-comint) "OCaml" (car cmdlist) nil (cdr cmdlist))) (tuareg-interactive-mode)