tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unbuffered remote process I/O


From: Felipe Lema
Subject: unbuffered remote process I/O
Date: Wed, 13 May 2020 14:52:54 -0400

Sup, yo

I'm having some trouble with a Tramp-remote process created using
`make-process` and it's 27's :file-handler parameter. It seems that the
Emacs process is not receiving input bytes or not receiving output
bytes because of buffering.

Context
-------

I'm working on tramp support for the eglot package[1]. eglot is a
bridge between a LSP server and Emacs, translating events from either
side to the other using msgpack-rpc through stdin and stdout.

After starting the process, eglot rpc-calls for an initialization
methods (ie: sends bytes) and expects a result (ie: reads bytes)
within, let's say, 30s.

WIP
---

It seems that the remote process is not answering either because
- the rpc-call is not getting to the remote process because    
somewhere there is some buffering
- the answer is not being received by Emacs because of some buffering

I tried running the LSP initialization using `tramp-verbose` at 9 and
10, but after running for like 30min I stopped the execution and got
nothing eglot related in the tramp-debug-messages buffer.

I also tried using the following without luck [2]:

- adding `-tt` to ssh command in tramp (through tramp-methods)
- `stdbuf -i0 -o0 -e0 my_lsp` as command (instead of plain `my_lsp`)
- set `process-adaptive-read-buffering` to `nil`
- set `process-connection-type` to `nil`

What now? halp
--------------

I don't know how to proceed in order to have unbuffered reads/writes
and (hopefully) get remote eglot functionality going. 

Any help or insights are much appreciated.

Thanks
Felipe

[1] = https://github.com/joaotavora/eglot/pull/463
[2] = https://github.com/joaotavora/eglot/pull/463#issuecomment-6275597
92



reply via email to

[Prev in Thread] Current Thread [Next in Thread]