From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 18:12:49 2011 Received: (at submit) by debbugs.gnu.org; 17 May 2011 22:12:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMSVU-0003Gr-Vt for submit@debbugs.gnu.org; Tue, 17 May 2011 18:12:49 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMSVS-0003Gb-7y for submit@debbugs.gnu.org; Tue, 17 May 2011 18:12:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMSVM-0005Zr-7T for submit@debbugs.gnu.org; Tue, 17 May 2011 18:12:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:59476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMSVM-0005Zm-5n for submit@debbugs.gnu.org; Tue, 17 May 2011 18:12:40 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMSVK-0002kb-Q2 for bug-gnu-emacs@gnu.org; Tue, 17 May 2011 18:12:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMSVJ-0005ZO-BR for bug-gnu-emacs@gnu.org; Tue, 17 May 2011 18:12:38 -0400 Received: from dione.cbane.org ([74.207.249.60]:33126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMSVI-0005ZD-UT for bug-gnu-emacs@gnu.org; Tue, 17 May 2011 18:12:37 -0400 Received: from titan.cbane.org (titan.home.cbane.org [IPv6:2001:470:8:574:223:54ff:fe4f:f020]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "titan.cbane.org", Issuer "titan.cbane.org" (not verified)) by dione.cbane.org (Postfix) with ESMTPS id B4707423E for ; Tue, 17 May 2011 17:12:34 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cbane.org; s=2011; t=1305670354; bh=g7EXWn0pbC/bsChjOLDupsOGWKEAI0Vm7E2ww5Zj2kc=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=jpq2BNbCRImVmzGE4nR6cDkyllL24tnWC4hp/nGY5vwrv4JnvCvJTTY5VbywhKpZ9 wlz3QgUiEWHDXVAp49hNYShei768aZA/zeToNqurGx5dscgSN/2AlHTsao2Zhmmuj/ KnbCOgJItzM5Lj1s5JcwndjWiQDB1zWVtueS9GudDWNi7OI9wTy0+wv/V0gWZbzg9s BXsCrQSY493NQhWopELhuTgGvGBV1QouLQeJcSff9PM8MjZ8uFB7Owzp6vtoU1VDrd mDuoLMOtTHKYjk0+Ry1JH0cjAUZnZWxG46F30ZeV+z6FytnT1VScgluUzIenQq4z0R k6/iibxhZ6O8A== Received: by titan.cbane.org (Postfix, from userid 1000) id 4D0413416D; Tue, 17 May 2011 17:12:33 -0500 (CDT) From: Courtney Bane To: bug-gnu-emacs@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-ID: <87mxildlim.fsf@titan.home.cbane.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --=-=-= 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 # frame suspends, exiting alternate screen $ fg # Emacs resumes, but hasn't switched to alternate screen # 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 # Emacs exits the alternate screen and suspends $ fg # Emacs resumes, switching to alternate screen # Emacs exits the alternate screen and quits Desired client/server behavior: $ emacs -Q --daemon $ emacsclient -t # frame suspends, and exits alternate screen $ fg # Emacs resumes, and switches back to alternate screen # 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 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) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=set-hooks-on-resume.diff Content-Description: Patch to restore hooks before reinitializing TTY === modified file 'src/term.c' --- src/term.c 2011-04-08 18:44:36 +0000 +++ src/term.c 2011-05-17 21:24:33 +0000 @@ -2476,6 +2476,7 @@ FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); } + set_tty_hooks (t); init_sys_modes (t->display_info.tty); /* Run `resume-tty-functions'. */ --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 20:29:24 2011 Received: (at 8687) by debbugs.gnu.org; 18 May 2011 00:29:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMUdf-0006FM-Me for submit@debbugs.gnu.org; Tue, 17 May 2011 20:29:23 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMUde-0006FB-8Z for 8687@debbugs.gnu.org; Tue, 17 May 2011 20:29:22 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:41970 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QMUdY-0004hA-DN; Tue, 17 May 2011 20:29:16 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 88FA266131; Tue, 17 May 2011 21:29:13 -0300 (ART) From: Stefan Monnier To: Courtney Bane Subject: Re: bug#8687: 23.3.50; Emacs doesn't properly initialize a TTY when resuming it Message-ID: References: <87mxildlim.fsf@titan.home.cbane.org> Date: Tue, 17 May 2011 21:29:13 -0300 In-Reply-To: <87mxildlim.fsf@titan.home.cbane.org> (Courtney Bane's message of "Tue, 17 May 2011 17:12:33 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8687 Cc: 8687@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > 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 From debbugs-submit-bounces@debbugs.gnu.org Wed May 18 12:26:18 2011 Received: (at control) by debbugs.gnu.org; 18 May 2011 16:26:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMjZh-0004yn-6Y for submit@debbugs.gnu.org; Wed, 18 May 2011 12:26:17 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMjZf-0004yY-47 for control@debbugs.gnu.org; Wed, 18 May 2011 12:26:15 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QMjZZ-0000tG-NX for control@debbugs.gnu.org; Wed, 18 May 2011 12:26:09 -0400 Date: Wed, 18 May 2011 12:26:09 -0400 Message-Id: Subject: control message for bug 8687 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) close 8687 24.1 From unknown Sat Jun 21 10:42:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 Jun 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator