From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: M-x term on Windows Date: Wed, 28 Oct 2015 18:11:43 +0200 Message-ID: <83r3kf2csg.fsf@gnu.org> References: <87vb9yi6n5.fsf@fastmail.com> <83io5yrqxk.fsf@gnu.org> <87oafjukcw.fsf@fastmail.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446048736 10481 80.91.229.3 (28 Oct 2015 16:12:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2015 16:12:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 28 17:12:06 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZrTKX-0002wT-3p for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 17:12:05 +0100 Original-Received: from localhost ([::1]:39263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrTKW-0007Pi-ON for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 12:12:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrTKK-0007Pc-PN for help-gnu-emacs@gnu.org; Wed, 28 Oct 2015 12:11:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrTKE-0006zi-Aa for help-gnu-emacs@gnu.org; Wed, 28 Oct 2015 12:11:52 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:50484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrTKE-0006z9-29 for help-gnu-emacs@gnu.org; Wed, 28 Oct 2015 12:11:46 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NWX00900TR4UK00@mtaout25.012.net.il> for help-gnu-emacs@gnu.org; Wed, 28 Oct 2015 18:09:34 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWX00AX1U7YM110@mtaout25.012.net.il> for help-gnu-emacs@gnu.org; Wed, 28 Oct 2015 18:09:34 +0200 (IST) In-reply-to: <87oafjukcw.fsf@fastmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107866 Archived-At: > From: Random832 > Date: Wed, 28 Oct 2015 10:40:47 -0400 > > Eli Zaretskii 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.