Subject: Re: bug#47861: Starting `jsonrpc-process-connection' over Tramp fails if the process writes to stderr

From: Michael Albinus <[email-masked]>
Date: Sat, 01 May 2021 11:43:42 +0200

Jim Porter <[email-masked]> writes:

> When starting a `jsonrpc-process-connection' over Tramp, if the
> process writes to stderr, Emacs (usually) fails with `Wrong type
> argument: "inserted-chars 204"'. I'm able to reproduce this pretty
> consistently when connecting from an MS Windows client to a Linux
> server; however, this may apply to other platform combinations as
> well. Mysteriously, it works fine about 1 in 10 times, though I
> haven't been able to decipher why.

In current Tramp 2.5.0.4, this has been mitigated by wrapping the
insert-file-contents-literally call in tramp-sh-handle-make-process with
ignore-errors.

However, handling stderr buffers in Tramp's make-process is still a
mess. So I've started to reimplement this, using a named pipe on the
remote machine. make-pipe-process, the natural choice, does not work for
remote processes.

Best regards, Michael.