Skip to content

Commit

Permalink
Comint: use a pty to communicate with the OCaml subprocess
Browse files Browse the repository at this point in the history
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 #83
  • Loading branch information
Chris00 committed Apr 11, 2019
1 parent 38be615 commit cd5229e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuareg.el
Expand Up @@ -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)
Expand Down

0 comments on commit cd5229e

Please sign in to comment.