* bug#1494: emacs -nw inserts unwanted chars if user is impatient @ 2008-12-04 21:39 ` Paul R 2008-12-06 4:05 ` bug#1494: marked as done (emacs -nw inserts unwanted chars if user is impatient) Emacs bug Tracking System 0 siblings, 1 reply; 6+ messages in thread From: Paul R @ 2008-12-04 21:39 UTC (permalink / raw) To: submit 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#1494: marked as done (emacs -nw inserts unwanted chars if user is impatient) 2008-12-04 21:39 ` bug#1494: emacs -nw inserts unwanted chars if user is impatient Paul R @ 2008-12-06 4:05 ` Emacs bug Tracking System 0 siblings, 0 replies; 6+ messages in thread From: Emacs bug Tracking System @ 2008-12-06 4:05 UTC (permalink / raw) To: Chong Yidong [-- Attachment #1: Type: text/plain, Size: 868 bytes --] Your message dated Fri, 05 Dec 2008 22:57:12 -0500 with message-id <87ljuuot0n.fsf@cyd.mit.edu> and subject line Re: emacs -nw inserts unwanted chars if user is impatient has caused the Emacs bug report #1494, regarding emacs -nw inserts unwanted chars if user is impatient to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) -- 1494: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1494 Emacs Bug Tracking System Contact don@donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 3179 bytes --] From: Paul R <paul.r.ml@gmail.com> To: submit@emacsbugs.donarmstrong.com Subject: emacs -nw inserts unwanted chars if user is impatient Date: Thu, 04 Dec 2008 22:39:28 +0100 Message-ID: <87d4g78vsf.fsf@gmail.com> 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 [-- Attachment #3: Type: message/rfc822, Size: 1083 bytes --] From: Chong Yidong <cyd@stupidchicken.com> To: 1494-done@emacsbugs.donarmstrong.com Subject: Re: emacs -nw inserts unwanted chars if user is impatient Date: Fri, 05 Dec 2008 22:57:12 -0500 Message-ID: <87ljuuot0n.fsf@cyd.mit.edu> I don't see any other way to handle this, so I've checked in the fix involving discarding pending input before reading the reply to the terminal attributes query. ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#1495: emacs -nw inserts unwanted chars if user is impatient @ 2008-12-04 21:46 ` Paul R 2008-12-06 4:05 ` bug#1495: marked as done (emacs -nw inserts unwanted chars if user is impatient) Emacs bug Tracking System 0 siblings, 1 reply; 6+ messages in thread From: Paul R @ 2008-12-04 21:46 UTC (permalink / raw) To: submit 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#1495: marked as done (emacs -nw inserts unwanted chars if user is impatient) 2008-12-04 21:46 ` bug#1495: emacs -nw inserts unwanted chars if user is impatient Paul R @ 2008-12-06 4:05 ` Emacs bug Tracking System 0 siblings, 0 replies; 6+ messages in thread From: Emacs bug Tracking System @ 2008-12-06 4:05 UTC (permalink / raw) To: Chong Yidong [-- Attachment #1: Type: text/plain, Size: 868 bytes --] Your message dated Fri, 05 Dec 2008 22:57:12 -0500 with message-id <87ljuuot0n.fsf@cyd.mit.edu> and subject line Re: emacs -nw inserts unwanted chars if user is impatient has caused the Emacs bug report #1494, regarding emacs -nw inserts unwanted chars if user is impatient to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) -- 1494: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1494 Emacs Bug Tracking System Contact don@donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 3240 bytes --] From: Paul R <paul.r.ml@gmail.com> To: submit@emacsbugs.donarmstrong.com Subject: emacs -nw inserts unwanted chars if user is impatient Date: Thu, 04 Dec 2008 22:46:20 +0100 Message-ID: <87bpvr8vgz.fsf@gmail.com> 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 [-- Attachment #3: Type: message/rfc822, Size: 1083 bytes --] From: Chong Yidong <cyd@stupidchicken.com> To: 1494-done@emacsbugs.donarmstrong.com Subject: Re: emacs -nw inserts unwanted chars if user is impatient Date: Fri, 05 Dec 2008 22:57:12 -0500 Message-ID: <87ljuuot0n.fsf@cyd.mit.edu> I don't see any other way to handle this, so I've checked in the fix involving discarding pending input before reading the reply to the terminal attributes query. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <87ljuv92uq.fsf@gmail.com>]
[parent not found: <87d4g7d9gn.fsf@cyd.mit.edu>]
[parent not found: <200812042030.mB4KU5Jn003761@mothra.ics.uci.edu>]
* bug#1495: emacs -nw inserts unwanted chars if user is impatient [not found] ` <200812042030.mB4KU5Jn003761@mothra.ics.uci.edu> @ 2008-12-05 4:10 ` Chong Yidong [not found] ` <87skp3w9c4.fsf@cyd.mit.edu> 1 sibling, 0 replies; 6+ messages in thread From: Chong Yidong @ 2008-12-05 4:10 UTC (permalink / raw) To: Dan Nicolaescu; +Cc: 1495, Paul R, emacs-devel Dan Nicolaescu <dann@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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <87skp3w9c4.fsf@cyd.mit.edu>]
* bug#1495: emacs -nw inserts unwanted chars if user is impatient [not found] ` <87skp3w9c4.fsf@cyd.mit.edu> @ 2008-12-11 16:32 ` Stefan Monnier 0 siblings, 0 replies; 6+ messages in thread From: Stefan Monnier @ 2008-12-11 16:32 UTC (permalink / raw) To: Chong Yidong; +Cc: 1495, Dan Nicolaescu, emacs-devel, Paul R > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-11 16:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <87ljuuot0n.fsf@cyd.mit.edu> 2008-12-04 21:39 ` bug#1494: emacs -nw inserts unwanted chars if user is impatient Paul R 2008-12-06 4:05 ` bug#1494: marked as done (emacs -nw inserts unwanted chars if user is impatient) Emacs bug Tracking System 2008-12-04 21:46 ` bug#1495: emacs -nw inserts unwanted chars if user is impatient Paul R 2008-12-06 4:05 ` bug#1495: marked as done (emacs -nw inserts unwanted chars if user is impatient) Emacs bug Tracking System [not found] <87ljuv92uq.fsf@gmail.com> [not found] ` <87d4g7d9gn.fsf@cyd.mit.edu> [not found] ` <200812042030.mB4KU5Jn003761@mothra.ics.uci.edu> 2008-12-05 4:10 ` bug#1495: emacs -nw inserts unwanted chars if user is impatient Chong Yidong [not found] ` <87skp3w9c4.fsf@cyd.mit.edu> 2008-12-11 16:32 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).