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

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

";0c" in terminal with slow connections


From: Vincent Lefevre
Subject: ";0c" in terminal with slow connections
Date: Mon, 3 Sep 2007 12:57:23 +0200
User-agent: Mutt/1.5.16-vl-r18739 (2007-08-28)

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

-- 
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)




reply via email to

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