unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ryan Johnson <ryanjohn@ece.cmu.edu>
Cc: 7117@debbugs.gnu.org
Subject: bug#7117: 23.2.2 mangles terminal escape sequences
Date: Thu, 30 Sep 2010 16:59:51 +0200	[thread overview]
Message-ID: <837hi3p994.fsf@gnu.org> (raw)
In-Reply-To: <4CA4A10B.8050201@ece.cmu.edu>

> From: Ryan Johnson <ryanjohn@ece.cmu.edu>
> 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.





  reply	other threads:[~2010-09-30 14:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 12:10 bug#7117: 23.2.2 mangles terminal escape sequences Ryan Johnson
2010-09-27 20:52 ` Stefan Monnier
2010-09-28  4:53   ` Ryan Johnson
2010-09-30 11:37     ` Ryan Johnson
2010-09-30 14:39       ` Ryan Johnson
2010-09-30 14:59         ` Eli Zaretskii [this message]
2010-09-30 15:14           ` Ryan Johnson
2010-09-30 15:44             ` Eli Zaretskii
2010-09-30 16:11               ` Ryan Johnson
2022-02-07  0:33 ` Lars Ingebrigtsen
2022-03-07  2:37   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837hi3p994.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=7117@debbugs.gnu.org \
    --cc=ryanjohn@ece.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).