help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: M-x term on Windows


From: Eli Zaretskii
Subject: Re: M-x term on Windows
Date: Wed, 28 Oct 2015 18:11:43 +0200

> From: Random832 <random832@fastmail.com>
> Date: Wed, 28 Oct 2015 10:40:47 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> > term.el in its present form cannot be run on MS-Windows.  It has too
> > much staff hardcoded that assumes a Posix shell in /bin/sh and a
> > terminal driver that supports Posix features like stty settings and
> > SGR escape sequences.
> 
> SGR escape sequences have nothing to do with the terminal driver, they
> are provided by emacs itself. Did you mean the expectation that the
> programs running inside it will emit them?

Yes, the latter.

> I thought this was implicit in my statement that I was going to use
> it for ssh (to a GNU/Linux machine).

In that case, I've misunderstood to think you want to run a local
shell.  (You mentioned Bash that comes with Git, which led me to that
conclusion.)

> The key factor that makes it work for this use case is that the stty
> settings are mostly all handled by the remote host - plink just shovels
> a stream of bytes back and forth. Unlike git (MSYS?) openssh, it doesn't
> care if its own standard I/O streams are pipes and is willing to open a
> remote pty regardless.

AFAIU, plink doesn't assume it will run in full-screen mode, it's
basically a batch-mode ssh client.  So indeed it doesn't care about
the devices it is connected to.

> The other annoyance I have run into is that I have to run the "resize"
> command (supplied with xterm) manually - once at login and then after
> any change, to detect the window size. I couldn't find anywhere in the
> code to react to changes (e.g. by calling stty rows/cols again), and
> there aren't any hooks in plink to handle this anyway. The environment
> variables such as TERM also aren't propagated to the remote host, but
> that seems to be plink's fault.

See above.  PuTTY does this, but I won't expect that from plink.

> > Plink is a native Windows program, so it doesn't need 'term'.  You
> > should be able to run it from "M-x shell".
> 
> But M-x shell can't handle escape sequences.

Right.



reply via email to

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