I wish to be able to open current shell output in emacs, for that I use script
command that logs all the output into file typescript
. The problem is that it consist also with terminal codes for colors and other necessary stuff, which is not parsed by emacs. I found function display-ansi-colors
and it displays part of term sequences correctly, but a lot of them still undecoded. I using "xterm-256color" terminal. Is there a way to decode all term sequences correctly in emacs buffer?
-
3Can you provide a recipe for demonstrating the problem?– philsNov 8, 2017 at 0:21
-
Also, is stackoverflow.com/q/22083177 relevant to your problem?– philsNov 8, 2017 at 0:23
1 Answer
What I've done is inside the shell that script
starts I export TERM=dumb
and then after I'm done I exit the shell and clear out any remaining ANSI sequences in the typescript
file using ansifilter --plain