From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vincent Lefevre Newsgroups: gmane.emacs.bugs Subject: ";0c" in terminal with slow connections Date: Mon, 3 Sep 2007 12:57:23 +0200 Message-ID: <20070903105723.GA4091@prunille.vinc17.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1188817057 1566 80.91.229.12 (3 Sep 2007 10:57:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Sep 2007 10:57:37 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 03 12:57:36 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IS9cc-00004r-1n for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Sep 2007 12:57:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IS9ca-0004oc-Qu for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Sep 2007 06:57:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IS9cX-0004mN-SE for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2007 06:57:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IS9cW-0004mB-Uw for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2007 06:57:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IS9cW-0004m8-Q1 for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2007 06:57:28 -0400 Original-Received: from vinc17.pck.nerim.net ([213.41.242.187] helo=prunille.vinc17.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IS9cW-0005Vo-8k for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2007 06:57:28 -0400 Original-Received: by prunille.vinc17.org (Postfix, from userid 501) id 7864B18C3F68; Mon, 3 Sep 2007 12:57:23 +0200 (CEST) Content-Disposition: inline X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.16-vl-r18739 (2007-08-28) X-Detected-Kernel: FreeBSD 6.x (2) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16480 Archived-At: I have the following problem with the recent snapshot emacs versions on Debian (at least in the emacs-snapshot 20070824-1 Debian package). When I connect by ssh via an ADSL connection, I get some characters (see explanation below) in the Emacs buffer just after starting Emacs (running in the current terminal, i.e. not with its graphic interface). This is almost 100% reproducible under these conditions. But this bug doesn't occur with fast ssh connections. I suppose that Emacs does some flushing, but it probably occurs too early with an ADSL connection, due to a higher latency. Also note that the bug doesn't occur with Emacs22 on the same machine (I first thought it could be a bug in the ncurses library, but this doesn't seem so). The characters that appear in the buffer are those coming from the "Send Device Attributes". I analyzed the terminal logs and could see that Emacs sent the following sequences: home cnorm cvvis \E[60d el rmkx cnorm rmcup op ^M smcup cvvis smkx \E[>0c \E>4;1m \E[60;1H The problem comes from the \E[>0c. /usr/share/doc/xterm/ctlseqs.txt.gz (under Debian) says: CSI > Ps c Send Device Attributes (Secondary DA) Ps =3D 0 or omitted -> request the terminal's identification code. The response depends on the decTerminalID resource set- ting. It should apply only to VT220 and up, but xterm extends this to VT100. -> CSI > Pp ; Pv ; Pc c where Pp denotes the terminal type -> 0 (``VT100'') -> 1 (``VT220'') and Pv is the firmware version (for xterm, this was originally the XFree86 patch number, starting with 95). In a DEC termi- nal, Pc indicates the ROM cartridge registration number and is always zero. Note that when ssh isn't used, this sequence is still sent by Emacs, but I think that some flushing of the input takes care of this. From a shell, you can type printf "\e[>0c" to see the effect: characters are sent to the input and appears in the command line. --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)