Re: Reliably sending binary codes to TRAMP processes
Jordan Ellis Coppard <[email protected]> Wed, 29 Jan 2025 02:14:30 +0900
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Message-ID | <[email protected]> |
On 29/1/2025 12:22 am, Michael Albinus wrote: > Tramp in its regular mode tries to filter out ansi colors. I have no > experience with this in direct async processes. Solved it. Your comment there reminded me of the commands I was checking earlier: cd /home/jammy/project/ && exec <<'c03eae69968a16e9389e28c6627d55b2' env PS1\=/jam\:jam-zevem\:/home/jammy/project/\ \#\$\ INSIDE_EMACS\=31.0.50\,compile\,tramp\:2.8.0-pre PAGER\= /bin/bash ( zig build run ) </dev/tty Tramp will be additionally setting TERM=dumb there won't it? In any case I misunderstood how comint works based on your comment above too. It can only parse basic escape codes; it wants "naked" text. I traced a bunch of comint functions and I see this: 1 -> (compilation-filter #<process compilation> "run\n+- run zevem\n +- zig build-exe zevem Debug native 1 errors\nsrc/evm.zig:61:7: error: expected ',' after field\nerror: the following command failed with 1 compilation errors:\n/home/jammy/bin/zig build-exe -ODebug -Mroot=/home/jammy/project/src/main.zig --cache-dir /home/jammy/project/.zig-cache --global-cache-dir /home/jammy/.cache/zig --name zevem --zig-lib-dir /home/jammy/bin/lib/ --listen=- \nBuild Summary: 0/3 steps succeeded; 1 failed\nrun transitive failure\n+- run zevem transitive failure\n +- zig build-exe zevem Debug native 1 errors\nerror: the following build command failed with exit code 1:\n/home/jammy/project/.zig-cache/o/be39f5ab3a9edc608c716ff462c0bb25/build /home/jammy/bin/zig /home/jammy/bin/lib /home/jammy/project /home/jammy/project/.zig-cache /home/jammy/.cache/zig --seed 0xe91afd1e -Z534d806b7408c3b0 run\n") | 2 -> (comint-carriage-motion #<marker at 133 in *compilation*> 969) | 2 <- comint-carriage-motion: nil | 2 -> (compilation--ensure-parse 969) | | 3 -> (compilation--parse-region 133 #<marker at 969 in *compilation*>) | | | 4 -> (compilation-parse-errors 133 #<marker at 969 in *compilation*>) | | | 4 <- compilation-parse-errors: nil | | 3 <- compilation--parse-region: nil | 2 <- compilation--ensure-parse: nil 1 <- compilation-filter: nil If I trace direct-async as-is I get this: 1 -> (compilation-filter #<process compilation> "[J[2mrun \n(0mq(B run zevem \n (0mq(B zig build-exe zevem Debug native[31m 1 errors \n[0m[0m[1msrc/evm.zig:61:7: [31merror: [0m[1mexpected ',' after field \n[0madasda \n [32m^ \n[0m[31merror: [0mthe following command failed with 1 compilation errors: \n/home/jammy/bin/zig build-exe -ODebug -Mroot=/home/jammy/project/src/main.zig --cache-dir /home/jammy/project/.zig-cache --global-cache-dir /home/jammy/.cache/zig --name zevem --zig-lib-dir /home/jammy/bin/lib/ --listen=- \n[36mBuild Summary:[0m 0/3 steps succeeded; 1 failed \nrun[2m transitive failure \n[0m(0mq(B run zevem[2m transitive failure \n[0m (0mq(B zig build-exe zevem Debug native[31m 1 errors \n[0m") | 2 -> (comint-carriage-motion #<marker at 152 in *compilation*> 845) | 2 <- comint-carriage-motion: nil | 2 -> (compilation--ensure-parse 833) | | 3 -> (compilation--parse-region 133 #<marker at 833 in *compilation*>) | | | 4 -> (compilation-parse-errors 133 829) | | | 4 <- compilation-parse-errors: nil | | 3 <- compilation--parse-region: nil | 2 <- compilation--ensure-parse: nil 1 <- compilation-filter: nil If I set TERM=dumb or manually invoke project compile with `zig build --color off run` instead it all works as expected. So I should either have that flag passed every time, else I need a way to add TERM=dumb in a direct-async command. /Jordan