all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Random832 <random832@fastmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: M-x term on Windows
Date: Wed, 28 Oct 2015 10:40:47 -0400	[thread overview]
Message-ID: <87oafjukcw.fsf@fastmail.com> (raw)
In-Reply-To: 83io5yrqxk.fsf@gnu.org

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	other threads:[~2015-10-28 14:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23  3:51 M-x term on Windows Random832
2015-10-23  7:21 ` Eli Zaretskii
2015-10-28 14:40   ` Random832 [this message]
2015-10-28 16:11     ` Eli Zaretskii
     [not found] <mailman.851.1445572367.7904.help-gnu-emacs@gnu.org>
2015-10-23 18:11 ` Javier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oafjukcw.fsf@fastmail.com \
    --to=random832@fastmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.