unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (or "windows-bash")?
@ 2022-02-19 21:11 Thomas Schwanberger
  2022-02-20  7:05 ` Eli Zaretskii
  2022-02-20 19:30 ` Jim Porter
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Schwanberger @ 2022-02-19 21:11 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 790 bytes --]

Hi,

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

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.

Thank you for your attention.

Kind regards,


Thomas

[-- Attachment #2: Type: text/html, Size: 1210 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (or "windows-bash")?
  2022-02-19 21:11 MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (or "windows-bash")? Thomas Schwanberger
@ 2022-02-20  7:05 ` Eli Zaretskii
  2022-02-20 19:30 ` Jim Porter
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2022-02-20  7:05 UTC (permalink / raw)
  To: Thomas Schwanberger; +Cc: emacs-devel

> 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (or "windows-bash")?
  2022-02-19 21:11 MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (or "windows-bash")? Thomas Schwanberger
  2022-02-20  7:05 ` Eli Zaretskii
@ 2022-02-20 19:30 ` Jim Porter
  1 sibling, 0 replies; 3+ messages in thread
From: Jim Porter @ 2022-02-20 19:30 UTC (permalink / raw)
  To: Thomas Schwanberger, emacs-devel

On 2/19/2022 1:11 PM, Thomas Schwanberger wrote:
> 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

For what it's worth, I've found that the Tramp "sshx" method works 
fairly well when using MS Windows (the "ssh" method doesn't work for me, 
and hangs when trying to connect, possibly due to PTY issues). You 
should be able to use the Microsoft-published OpenSSH with this, but I 
stumbled on a few corner cases and switched to using the MSYS ssh 
(conveniently provided along with Git for Windows) and haven't had any 
problems since.

Note: this might require a newish version of Tramp (e.g. from GNU ELPA) 
as well. There were a few issues in this area that have been fixed recently.

- Jim



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-20 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-19 21:11 MS Windows: ConPTY -- can cmdproxy be patched to allow PTY for cmd (or "windows-bash")? Thomas Schwanberger
2022-02-20  7:05 ` Eli Zaretskii
2022-02-20 19:30 ` Jim Porter

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).