emacs-devel
[Top][All Lists]
Advanced

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

Re: MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (


From: Eli Zaretskii
Subject: Re: MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (or "windows-bash")?
Date: Sun, 20 Feb 2022 09:05:29 +0200

> From: Thomas Schwanberger <schwanbergerthomas@gmail.com>
> Date: Sat, 19 Feb 2022 22:11:51 +0100
> 
> Quick background:
> I'm forced to use MS Windows at work. In order to use tramp with my MSYS
> emacs 28.0.91 build for operating remote servers I have to do either of:
> 
> - plink
> - fakecygpty with cygwin bash to simulate native "ssh" with only minor
> annoyances

What is "MSYS emacs"?

For MS-Windows, Emacs supports 3 configurations:

  . "native" MS-Windows build with MinGW tools
  . Cygwin-X build with X toolkits
  . Cygwin-w32 build with the MS-Windows "w32 GUI toolkit"

Which one of these are you running?

> The last option is working rather well for me, but seeing as MS Windows has
> recently made some PTY strides (
> https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
> )
> 
> Is there any plans to make use of this in w32-emacs? I presume a patch to
> cmdproxy might make PTY available. Is it even possible? -- I'm far out of
> my depth here and my presumption might be trivially false -- even so,
> please elaborate, if you please.

Unfortunately, ConPTY has a serious problem which precludes its useful
integration into Emacs as an emulation of Posix PTYs.  At the time, I
filed an issue with MS-Windows developers describing the problem, see
https://github.com/microsoft/terminal/issues/9174.  The root cause of
this problem, as always with Windows, is that Windows I/O is not
agnostic to the encoding, it doesn't regard the sent/received stuff as
a stream of bytes, but instead actively translates those bytes to
present to each application the encoding it expects (according to what
Windows thinks).

Without some reasonable resolution of these issues, we cannot use
ConPTY in Emacs.



reply via email to

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