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

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

bug#1495: emacs -nw inserts unwanted chars if user is impatient


From: Chong Yidong
Subject: bug#1495: emacs -nw inserts unwanted chars if user is impatient
Date: Thu, 04 Dec 2008 23:10:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Dan Nicolaescu <address@hidden> writes:

> I'm fairly confident this is due to the code in xterm.el that deals
> with modifyOtherKeys, the input probably comes while emacs is waiting
> from an answer from xterm.

This indeed seems to be the problem.

Discard pending input before doing the terminal query seems to fix the
bug for me.  I don't know if it's possible for the user's input to come
inat exactly at the correct moment to fool the terminal query; if so, a
more complicated solution might be required.

Thoughts?

*** trunk/lisp/term/xterm.el.~1.59.~    2008-09-30 20:01:30.000000000 -0400
--- trunk/lisp/term/xterm.el    2008-12-04 23:07:47.000000000 -0500
***************
*** 475,480 ****
--- 475,481 ----
          (str nil))
        ;; Try to find out the type of terminal by sending a "Secondary
        ;; Device Attributes (DA)" query.
+       (discard-input)
        (send-string-to-terminal "\e[>0c")
  
        ;; The reply should be of the form: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c






reply via email to

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