dbuenzli / down

An OCaml toplevel (REPL) upgrade
http://erratique.ch/software/down
ISC License
81 stars 3 forks source link

Be more subtle when line edition is not available. #17

Closed ivg closed 5 years ago

ivg commented 5 years ago

Here is a simple repro

        OCaml version 4.07.0

# #use "down.top";;
Warning: Down v0.0.1 disabled. No ANSI terminal capability detected.
# Down.Session.record ();;
- : unit = ()
# print_endline "hello, world";;
hello, world
- : unit = ()
# Down.Session.save "hello_world";;
Exception: Failure "tl".
# 

I'm not sure whether it is a bug or a limitation of Emacs.

dbuenzli commented 5 years ago

Ah yes sorry in fact my comment was about using sessions, not recording them. That won't work I need to see the phrases that get in and thus have the OCaml readline patching installed.

But apparently the recording functions assumes the readline patching is in place. It should error more gracefully if it's not.

dbuenzli commented 5 years ago

Thanks for the report.