From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#12354: 24.2; garbage inserted at the beginning of the buffer even when xterm-extra-capabilities is t Date: Sat, 08 Sep 2012 11:57:50 +0200 Message-ID: References: <87txvcen36.fsf@xvii.vinc17.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347098325 25428 80.91.229.3 (8 Sep 2012 09:58:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2012 09:58:45 +0000 (UTC) Cc: 12354@debbugs.gnu.org To: Vincent Lefevre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 08 11:58:47 2012 Return-path: Envelope-to: geb-bug-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 1TAHoM-0000I2-On for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2012 11:58:46 +0200 Original-Received: from localhost ([::1]:41438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAHoJ-0008Rw-EP for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2012 05:58:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAHoG-0008Rr-QB for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2012 05:58:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAHoF-0001Ls-PI for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2012 05:58:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAHoF-0001Lo-M6 for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2012 05:58:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TAHob-0003iW-Nm for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2012 05:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Sep 2012 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12354 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12354-submit@debbugs.gnu.org id=B12354.134709830314238 (code B ref 12354); Sat, 08 Sep 2012 09:59:01 +0000 Original-Received: (at 12354) by debbugs.gnu.org; 8 Sep 2012 09:58:23 +0000 Original-Received: from localhost ([127.0.0.1]:47832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAHny-0003ha-Bb for submit@debbugs.gnu.org; Sat, 08 Sep 2012 05:58:22 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]:43889) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAHnv-0003hS-AL for 12354@debbugs.gnu.org; Sat, 08 Sep 2012 05:58:20 -0400 Original-Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3XDWD34DXsz3hhVN; Sat, 8 Sep 2012 11:57:55 +0200 (CEST) X-Auth-Info: sOUrn9J5TSGc6//8Yzy60nc7I5L9PFtT84CHM23Tg7U= Original-Received: from linux.local (ppp-93-104-158-104.dynamic.mnet-online.de [93.104.158.104]) by mail.mnet-online.de (Postfix) with ESMTPA id 3XDWD303KZzbbhD; Sat, 8 Sep 2012 11:57:54 +0200 (CEST) Original-Received: by linux.local (Postfix, from userid 501) id 1EFDD1E52FB; Sat, 8 Sep 2012 11:57:51 +0200 (CEST) X-Yow: I know things about TROY DONAHUE that can't even be PRINTED!! In-Reply-To: <87txvcen36.fsf@xvii.vinc17.org> (Vincent Lefevre's message of "Wed, 05 Sep 2012 13:16:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63931 Archived-At: Does this help? Andreas. diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 28fb9da..b93bc5e 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -519,6 +519,9 @@ The relevant features are: ;; Device Attributes (DA)" query. (send-string-to-terminal "\e[>0c") + ;; Wait a bit before trying to read the answer + (sleep-for 0.1) + ;; The reply should be: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c ;; If the timeout is completely removed for read-event, this ;; might hang for terminals that pretend to be xterm, but don't @@ -541,6 +544,7 @@ The relevant features are: (>= version 242))) (discard-input) (send-string-to-terminal "\e]11;?\e\\") + (sleep-for 0.1) (when (and (equal (read-event nil nil 2) ?\e) (equal (read-event nil nil 2) ?\])) (setq str "") -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."