From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7117: 23.2.2 mangles terminal escape sequences Date: Thu, 30 Sep 2010 16:59:51 +0200 Message-ID: <837hi3p994.fsf@gnu.org> References: <4CA089B5.80601@ece.cmu.edu> <4CA174DA.701@ece.cmu.edu> <4CA47684.5020806@ece.cmu.edu> <4CA4A10B.8050201@ece.cmu.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1285859499 1360 80.91.229.12 (30 Sep 2010 15:11:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Sep 2010 15:11:39 +0000 (UTC) Cc: 7117@debbugs.gnu.org To: Ryan Johnson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 30 17:11:36 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1KnH-0002xz-W2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Sep 2010 17:11:36 +0200 Original-Received: from localhost ([127.0.0.1]:38027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1KnH-0000kh-Bz for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Sep 2010 11:11:35 -0400 Original-Received: from [140.186.70.92] (port=42665 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1KnA-0000kS-Hj for bug-gnu-emacs@gnu.org; Thu, 30 Sep 2010 11:11:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P1Kn8-000172-Gb for bug-gnu-emacs@gnu.org; Thu, 30 Sep 2010 11:11:28 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33072) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P1Kn8-00016y-FB for bug-gnu-emacs@gnu.org; Thu, 30 Sep 2010 11:11:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P1KaA-0001E1-2U; Thu, 30 Sep 2010 10:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Sep 2010 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7117-submit@debbugs.gnu.org id=B7117.12858586664701 (code B ref 7117); Thu, 30 Sep 2010 14:58:02 +0000 Original-Received: (at 7117) by debbugs.gnu.org; 30 Sep 2010 14:57:46 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P1KZq-0001Dm-Gp for submit@debbugs.gnu.org; Thu, 30 Sep 2010 10:57:46 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P1KZm-0001Dg-MR for 7117@debbugs.gnu.org; Thu, 30 Sep 2010 10:57:40 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L9K00A00EQM2U00@a-mtaout22.012.net.il> for 7117@debbugs.gnu.org; Thu, 30 Sep 2010 16:59:50 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.123.60]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L9K009LJEZNNA80@a-mtaout22.012.net.il>; Thu, 30 Sep 2010 16:59:49 +0200 (IST) In-reply-to: <4CA4A10B.8050201@ece.cmu.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 30 Sep 2010 10:58:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40575 Archived-At: > From: Ryan Johnson > Cc: 7117@debbugs.gnu.org > > At this point the symptom is easy enough to understand: sometimes > discard-input gets unlucky and chops the front off of a partly-arrived > escape sequence. > > The real question is, why would the command loop encounter errors and > need to discard input at all? > [1] _longjmp() > =>[2] unwind_to_catch() > [3] Fsignal() > [4] xsignal() > [5] xsignal0() > [6] window_scroll() The only calls to xsignal0 I see in window_scroll (or, rather, in its subroutines) is to signal Qbeginning_of_buffer or Qend_of_buffer. > From the above, it seems that scrolling past beginning or end of buffer > triggers an error, which I guess is somewhat justifiable. Indeed. Perhaps we need some infrastructure to ignore errors in this case (I assume `ignore-errors' won't help). Or maybe we should allow not to discard input when we signal an error. Or maybe discard-input should be smarter, and not discard partial escape sequences? > However, on a > very slow connection this morning mouse-clicking between or even within > buffers caused problems. Unfortunately, setting debug-on-error doesn't > seem to catch errors generated from C code. > > I could try to break on longjmp over another slow connection, but with > the number of times it gets called for other reasons this would be slow > going... > > Ideas? You could put a breakpoint in Fsignal, and see if the problems with mouse-clicking within buffers is also caused by signaling an error.