I am using some complicated combination of Cygwin (for emacs) and Docker (for Linux environment) for C++ development on my laptop.
Recently I noticed that Docker dumps lots of ANSI and XTERM sequences into my *Compilation*
buffer. Using redirection solved the problem:
docker run .... 2>&1 | cat
This tells me that somewhere between the latest Cygwin, Emacs and Docker the Docker now thinks it's running in a proper interactive terminal. I'd rather the Docker behaved as if it's redirecting to a file and not do things like clear screen and colorize the output.
So the question is: Is there any way to run the compilation command in Emacs without allocating a TTY?
P.S. I considered the ANSI filter on compilation output as described here. It does not quite work, as the Docker uses cursor positioning and other XTerm escape sequences that ANSI library in Emacs does not understand, plus it inserts newlines to clear screen and limit lines to 80 characters.
process-connection-type
maybe? – rpluim Feb 06 '20 at 07:56