Closed ellerh closed 7 years ago
Right, I already added code to filter out escape sequences, in forth-scrub
.
Just one suggestion: Did you try TERM=dumb
?
Just one suggestion: Did you try TERM=dumb?
Yes. Same problem. I also tried to connect SwiftForth with a pipe instead of a pty (process-connection-type = nil) but then SwiftForth doesn't print the normal prompt and exits after the second error.
I did some research. The cursor position query can be turned off with
:noname 0 0 ; 'get-xy !
Perhaps a SwiftForth backend should set up a Device Personality that disables all uses of terminal escape sequences.
The cursor position query can be turned off with
:noname 0 0 ; 'get-xy !
Indeed.
Perhaps a SwiftForth backend should set up a Device Personality that disables all uses of terminal escape sequences.
Yes, sounds reasonable.
There is now a file called backend/swiftforth.el
where this could be done.
I believe this is fixed?
SwiftForth emits, e.g. when using
see
, the escape sequence^[[6n
and then waits. ApparentlyCSI 6n
tells the terminal emulator to report the cursor position. I don't know how to disable this on the SwiftForth side, so maybe Emacs should handle a few of the standard escape sequences. This might also allow us to introduce some custom escape sequences for the communcation with the subprocess.