GNU bug report logs - #8687
23.3.50; Emacs doesn't properly initialize a TTY when resuming it

Previous Next

Package: emacs;

Reported by: Courtney Bane <emacs-bugs-7626 <at> cbane.org>

Date: Tue, 17 May 2011 22:13:02 UTC

Severity: normal

Tags: patch

Found in version 23.3.50

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

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 8687 in the body.
You can then email your comments to 8687 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8687; Package emacs. (Tue, 17 May 2011 22:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Courtney Bane <emacs-bugs-7626 <at> cbane.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 17 May 2011 22:13:02 GMT) Full text and rfc822 format available.

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

From: Courtney Bane <emacs-bugs-7626 <at> cbane.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3.50; Emacs doesn't properly initialize a TTY when resuming it
Date: Tue, 17 May 2011 17:12:33 -0500
[Message part 1 (text/plain, inline)]
When an Emacs server resumes a suspended frame on a TTY, it doesn't
switch back to the alternate screen. This causes the UI to still be
visible on the screen after closing the frame, which doesn't match the
behavior of a normal Emacs session. This occurs in the 23.3 release, and
in the latest versions on the "emacs-23" and "trunk" BZR branches.

I have attached a patch which allows Emacs to switch back to the
alternate screen when resuming a TTY frame.

Steps to reproduce:
($ == type at shell prompt; <> == commands for Emacs; # == comments)

$ emacs -Q --daemon
$ emacsclient -t
<press C-z to suspend frame>
# frame suspends, exiting alternate screen
$ fg
# Emacs resumes, but hasn't switched to alternate screen
<press C-x C-c to close frame>
# Emacs closes the frame, but the UI is still visible because it wasn't
# drawn on the alternate screen

What should happen:

An Emacs daemon should behave like a normal Emacs session.

Regular (non-server) Emacs behavior:

$ emacs -Q
<press C-z>
# Emacs exits the alternate screen and suspends
$ fg
# Emacs resumes, switching to alternate screen
<press C-x C-c>
# Emacs exits the alternate screen and quits

Desired client/server behavior:

$ emacs -Q --daemon
$ emacsclient -t
<press C-z to suspend frame>
# frame suspends, and exits alternate screen
$ fg
# Emacs resumes, and switches back to alternate screen
<press C-x C-c to close frame>
# Emacs closes the frame, and exits the alternate screen



In GNU Emacs 23.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4)
 of 2011-05-17 on titan
configured using `configure  '--prefix=/tmp/emacs''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: 1
  line-number-mode: 1
  transient-mark-mode: t

Recent input:
ESC x r e p o r t SPC b u g RET

Recent messages:
("/tmp/emacs/bin/emacs")
Ido mode enabled
For information about GNU Emacs and the GNU system, type <f1> C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 mml easymenu
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils warnings emacsbug cc-styles cc-align
cc-engine cc-vars cc-defs regexp-opt jcb-bindings windmove edmacro
kmacro jcb-variables variables jcb-defuns imenu ffap saveplace ido paren
uniquify advice help-fns advice-preload column-marker tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind system-font-setting font-render-setting
gtk x-toolkit x multi-tty emacs)
[set-hooks-on-resume.diff (text/x-diff, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8687; Package emacs. (Wed, 18 May 2011 00:30:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Courtney Bane <emacs-bugs-7626 <at> cbane.org>
Cc: 8687 <at> debbugs.gnu.org
Subject: Re: bug#8687: 23.3.50;
	Emacs doesn't properly initialize a TTY when resuming it
Date: Tue, 17 May 2011 21:29:13 -0300
> When an Emacs server resumes a suspended frame on a TTY, it doesn't
> switch back to the alternate screen. This causes the UI to still be
> visible on the screen after closing the frame, which doesn't match the
> behavior of a normal Emacs session. This occurs in the 23.3 release, and
> in the latest versions on the "emacs-23" and "trunk" BZR branches.

> I have attached a patch which allows Emacs to switch back to the
> alternate screen when resuming a TTY frame.

Thanks.  I've installed it in the trunk (i.e. for Emacs-24).
I'm not familiar enough with this code to know for sure how safe it is
and it seemed like a fairly minor issue, so I prefer to leave it
unfixed in Emacs-23.4 (if we ever release such a thing).


        Stefan




bug marked as fixed in version 24.1, send any further explanations to 8687 <at> debbugs.gnu.org and Courtney Bane <emacs-bugs-7626 <at> cbane.org> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 18 May 2011 16:27:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Jun 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 7 days ago.

Previous Next


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