all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Vincent Lefevre <vincent@vinc17.net>
Cc: 12354@debbugs.gnu.org
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	[thread overview]
Message-ID: <m24nn8u99d.fsf@linux-m68k.org> (raw)
In-Reply-To: <87txvcen36.fsf@xvii.vinc17.org> (Vincent Lefevre's message of "Wed, 05 Sep 2012 13:16:45 +0200")

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





  parent reply	other threads:[~2012-09-08  9:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 11:16 bug#12354: 24.2; garbage inserted at the beginning of the buffer even when xterm-extra-capabilities is t Vincent Lefevre
2012-09-05 16:59 ` Glenn Morris
2012-09-05 18:44   ` Vincent Lefevre
2015-05-27 11:27     ` Vincent Lefevre
2015-06-29  1:01       ` Stefan Monnier
2015-06-29  2:35         ` Vincent Lefevre
2015-06-29 13:12           ` Stefan Monnier
2015-06-29 13:47             ` Vincent Lefevre
2015-06-30 14:04               ` Stefan Monnier
2015-07-01  3:19                 ` Stefan Monnier
2015-07-01 15:01                   ` Vincent Lefevre
2015-07-02 14:49                     ` Stefan Monnier
2015-07-03  1:16                       ` Vincent Lefevre
2017-12-17  2:07                         ` Noam Postavsky
2012-09-08  9:57 ` Andreas Schwab [this message]
2012-09-08 11:00   ` Vincent Lefevre

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=m24nn8u99d.fsf@linux-m68k.org \
    --to=schwab@linux-m68k.org \
    --cc=12354@debbugs.gnu.org \
    --cc=vincent@vinc17.net \
    /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.