GNU bug report logs - #10959
23.3; emacs -nw doesn't always restore the terminal screen

Previous Next

Package: emacs;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Tue, 6 Mar 2012 15:03:01 UTC

Severity: normal

Merged with 14491, 15013

Found in version 23.3

Full log


Message #29 received at 10959 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Eli Zaretskii <eliz <at> gnu.org>, Chong Yidong <cyd <at> gnu.org>
Cc: 10959 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#10959: 23.3; emacs -nw doesn't always restore the terminal
	screen
Date: Sat, 16 Jun 2012 18:13:26 +0200
On 2012-06-16 10:41:26 +0300, Eli Zaretskii wrote:
> I know very little about this, but here's what I know: this feature
> relies upon the "ti" and "te" terminal capabilities.  We use these
> capabilities in tty_set_terminal_modes and tty_reset_terminal_modes,
> respectively.  In both cases, we output the terminal command only if
> the tty->output FILE stream is non-NULL.  So perhaps some timing
> issues cause tty->output to become NULL before we get to
> tty_reset_terminal_modes, or maybe it is still NULL when we get to
> tty_set_terminal_modes?

Since the bug is not always reproducible, it is likely to be a timing
problem.

> In any case, adding some logs to those places could show if that is
> the problem.

Yes, this would be a good idea.

> Alternatively, could it be a problem with the terminal emulators, not
> in Emacs?

As this problem occurs with 3 different terminal emulators (including
at least 2 very different ones: xterm and gnome-terminal), I doubt
about this.

On 2012-06-16 18:00:31 +0800, Chong Yidong wrote:
> I committed a patch to xterm.el that seems to stop the bug from
> happening with the posted recipe.  It adds a `discard-input' call before
> doing the xterm Report Background query, as is already done for the
> Device Attributes query earlier in `terminal-init-xterm'.  I am still
> not 100% sure of the chain of effect leading to the bug, though.

I wonder whether this makes the timing problem much less likely
or this is a real fix (there isn't any input from the user). Is
xterm.el also used for gnome-terminal?

Is this related to the following bug?

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11129

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 9 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.