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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1495 in the body.
You can then email your comments to 1495 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1495
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Paul R <paul.r.ml <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Hi,
I usually work on X version of emacs 23. However, sometime, I just want
to alter a config file from the terminal. In this case I type
emacs -nw conf_file.conf
Very often I know that the line I want to go to is fairly low so before
emacs has finished to load I'm already pressing C-n waiting for the
display to show line and point. I guess a lot of user do the same and
often don't wait for the display to finish before typing what they want.
In this particular case, emacs would insert strange chars at point, for
example : 1;1704;0c
You won't be warned, and it will be saved along with your real
modifications, which is embarassing.
To reproduce, open any multiline file from the terminal, for example
.bash_history, with 'emacs -nw' and immediatly maintain C-n until the
display come up entirely. You should find at point the strange chars.
Tested with emacs23cvs with -Q on Gnu/Linux with xterm and
gnome-terminal.
--
Paul
Merged 1494 1495.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 04 Dec 2008 22:15:03 GMT)
Full text and
rfc822 format available.
Merged 1494 1495.
Request was from
"Juanma Barranquero" <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 04 Dec 2008 22:45:04 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1495
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
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
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1495
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #19 received at 1495 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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.
While arguing that there's probably no way to do much better than that,
it occurred to me that "the right way" to do it might be to move the
"check for \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c and run
xterm-turn-on-modify-other-keys if applicable" into the
input-decode-map.
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Fri, 09 Jan 2009 15:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.