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: Random832
Subject: Re: M-x term on Windows
Date: Wed, 28 Oct 2015 10:40:47 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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? I thought this was implicit
in my statement that I was going to use it for ssh (to a GNU/Linux
machine).

I have made some progress... as far as I can tell, the assumption is
mostly isolated to the start-process call site itself, and simply
ripping it out and having it start plink directly (I currently have a
hardcoded path and am ignoring the user-entered command - this isn't
nearly ready to submit a patch) works fine.

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.

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.

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




reply via email to

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