GNU bug report logs -
#1495
emacs -nw inserts unwanted chars if user is impatient
Previous Next
Reported by: Paul R <paul.r.ml <at> gmail.com>
Date: Thu, 4 Dec 2008 21:55:04 UTC
Severity: normal
Merged with 1494
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 1495 <at> emacsbugs.donarmstrong.com (full text, mbox):
Dan Nicolaescu <dann <at> ics.uci.edu> 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
This bug report was last modified 16 years and 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.