From unknown Sun Jun 22 15:20:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7002 <7002@debbugs.gnu.org> To: bug#7002 <7002@debbugs.gnu.org> Subject: Status: Emacs initializes the alternate screen twice Reply-To: bug#7002 <7002@debbugs.gnu.org> Date: Sun, 22 Jun 2025 22:20:50 +0000 retitle 7002 Emacs initializes the alternate screen twice reassign 7002 emacs submitter 7002 emacs-bugs-7626@cbane.org severity 7002 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 08 19:44:37 2010 Received: (at submit) by debbugs.gnu.org; 8 Sep 2010 23:44:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtUJh-0008LN-A0 for submit@debbugs.gnu.org; Wed, 08 Sep 2010 19:44:37 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtUFK-0008Hf-9m for submit@debbugs.gnu.org; Wed, 08 Sep 2010 19:40:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtUHF-0001Gj-Fq for submit@debbugs.gnu.org; Wed, 08 Sep 2010 19:42:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:53244) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtUHF-0001Gf-E8 for submit@debbugs.gnu.org; Wed, 08 Sep 2010 19:42:05 -0400 Received: from [140.186.70.92] (port=34263 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtUHE-0000P8-BY for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2010 19:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtUHC-0001GL-Oj for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2010 19:42:04 -0400 Received: from dione.cbane.org ([74.207.249.60]:43640) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtUHC-0001Fu-Ke for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2010 19:42:02 -0400 Received: from titan.cbane.org (c-71-207-198-241.hsd1.al.comcast.net [71.207.198.241]) (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 4D6EBC0CF for ; Wed, 8 Sep 2010 18:41:59 -0500 (CDT) Received: by titan.cbane.org (Postfix, from userid 1000) id 95A4F1BE106; Wed, 8 Sep 2010 18:41:57 -0500 (CDT) Date: Wed, 8 Sep 2010 18:41:57 -0500 From: emacs-bugs-7626@cbane.org To: bug-gnu-emacs@gnu.org Subject: Emacs initializes the alternate screen twice Message-ID: <20100908234157.GA26881@cbane.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 08 Sep 2010 19:44:36 -0400 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 (-----) --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline When a console-mode Emacs initializes its terminal, it sends the escape sequence to switch to the alternate screen twice. This causes problems when running under screen (and maybe other terminal programs as well): exiting or suspending Emacs completely clears the screen. I have attached a patch that fixes this. --WIyZ46R2i8wDzkSu Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="fix-double-alt-screen-init.diff" diff --git a/src/term.c b/src/term.c index fda06d6..fc013be 100644 --- a/src/term.c +++ b/src/term.c @@ -250,7 +250,6 @@ tty_set_terminal_modes (struct terminal *terminal) cmputc ('\n'); } - OUTPUT_IF (tty, tty->TS_termcap_modes); OUTPUT_IF (tty, visible_cursor ? tty->TS_cursor_visible : tty->TS_cursor_normal); OUTPUT_IF (tty, tty->TS_keypad_mode); losecursor (tty); --WIyZ46R2i8wDzkSu-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 08:58:58 2010 Received: (at 7002-done) by debbugs.gnu.org; 11 Sep 2010 12:58:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuPfW-000142-6T for submit@debbugs.gnu.org; Sat, 11 Sep 2010 08:58:58 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuPZv-0000u9-S9 for 7002-done@debbugs.gnu.org; Sat, 11 Sep 2010 08:53:12 -0400 Received: from IMPmailhost1.adm.correo ([10.20.102.38]) by IMPaqm4.telefonica.net with bizsmtp id 5QYh1f00Q0piX6q3QQvHui; Sat, 11 Sep 2010 14:55:17 +0200 Received: from ceviche.home ([83.61.39.212]) by IMPmailhost1.adm.correo with BIZ IMP id 5QvG1f0024aeRwb1hQvGd9; Sat, 11 Sep 2010 14:55:17 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 50B02660D2; Sat, 11 Sep 2010 14:55:16 +0200 (CEST) From: Stefan Monnier To: emacs-bugs-7626@cbane.org Subject: Re: bug#7002: Emacs initializes the alternate screen twice Message-ID: References: <20100908234157.GA26881@cbane.org> Date: Sat, 11 Sep 2010 14:55:16 +0200 In-Reply-To: <20100908234157.GA26881@cbane.org> (emacs-bugs's message of "Wed, 8 Sep 2010 18:41:57 -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: -2.0 (--) X-Debbugs-Envelope-To: 7002-done X-Mailman-Approved-At: Sat, 11 Sep 2010 08:58:56 -0400 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: -2.0 (--) > When a console-mode Emacs initializes its terminal, it sends the escape > sequence to switch to the alternate screen twice. This causes problems > when running under screen (and maybe other terminal programs as well): > exiting or suspending Emacs completely clears the screen. I have > attached a patch that fixes this. Thanks, installed in the emacs-23 branch. In the future, please include a name of some sort in your communications, since we need it to maintain accurate copyright information. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 12:27:44 2010 Received: (at 7002) by debbugs.gnu.org; 11 Sep 2010 16:27:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuSvY-0006PF-DB for submit@debbugs.gnu.org; Sat, 11 Sep 2010 12:27:44 -0400 Received: from dione.cbane.org ([74.207.249.60]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuSvW-0006P2-QS for 7002@debbugs.gnu.org; Sat, 11 Sep 2010 12:27:43 -0400 Received: from titan.cbane.org (c-71-207-198-241.hsd1.al.comcast.net [71.207.198.241]) (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 CF0A412AB6; Sat, 11 Sep 2010 11:29:48 -0500 (CDT) Received: by titan.cbane.org (Postfix, from userid 1000) id E662D1BE106; Sat, 11 Sep 2010 11:29:47 -0500 (CDT) Date: Sat, 11 Sep 2010 11:29:47 -0500 From: Courtney Bane To: Stefan Monnier Subject: Re: bug#7002: Emacs initializes the alternate screen twice Message-ID: <20100911162947.GA17363@cbane.org> References: <20100908234157.GA26881@cbane.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 7002 Cc: 7002@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: -3.3 (---) On Sat, Sep 11, 2010 at 02:55:16PM +0200, Stefan Monnier wrote: > Thanks, installed in the emacs-23 branch. Great, thanks. > In the future, please include a name of some sort in your > communications, since we need it to maintain accurate > copyright information. Sorry about that. I don't send much email from my alternate addresses, and forgot to include my name on that one. -- Courtney Bane (emacs-bugs-7626@cbane.org) "He that would make his own liberty secure, must guard even his enemy from oppression; for if he violates this duty, he establishes a precedent that will reach to himself." -- Thomas Paine From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 12 11:37:15 2010 Received: (at 7002-done) by debbugs.gnu.org; 12 Sep 2010 15:37:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuocF-0000sX-54 for submit@debbugs.gnu.org; Sun, 12 Sep 2010 11:37:15 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oulxh-00089v-3F for 7002-done@debbugs.gnu.org; Sun, 12 Sep 2010 08:47:13 -0400 Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm4.telefonica.net with bizsmtp id 5n2K1f00k0r0BT63QopLkJ; Sun, 12 Sep 2010 14:49:20 +0200 Received: from ceviche.home ([83.61.39.212]) by IMPmailhost2.adm.correo with BIZ IMP id 5opK1f0034aeRwb1iopKfp; Sun, 12 Sep 2010 14:49:20 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 3547E660D2; Sun, 12 Sep 2010 14:49:19 +0200 (CEST) From: Stefan Monnier To: Courtney Bane Subject: Re: bug#7002: Emacs initializes the alternate screen twice Message-ID: References: <20100908234157.GA26881@cbane.org> <20100911162947.GA17363@cbane.org> Date: Sun, 12 Sep 2010 14:49:19 +0200 In-Reply-To: <20100911162947.GA17363@cbane.org> (Courtney Bane's message of "Sat, 11 Sep 2010 11:29:47 -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: -2.0 (--) X-Debbugs-Envelope-To: 7002-done X-Mailman-Approved-At: Sun, 12 Sep 2010 11:37:11 -0400 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: -2.0 (--) >> In the future, please include a name of some sort in your >> communications, since we need it to maintain accurate >> copyright information. > Sorry about that. I don't send much email from my alternate addresses, > and forgot to include my name on that one. Thanks, updated the ChangeLog, Stefan From unknown Sun Jun 22 15:20:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Oct 2010 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 From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 19:41:53 2011 Received: (at control) by debbugs.gnu.org; 23 May 2011 23:41:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOekz-0007J0-LX for submit@debbugs.gnu.org; Mon, 23 May 2011 19:41:53 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOeky-0007Io-FY for control@debbugs.gnu.org; Mon, 23 May 2011 19:41:52 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QOekt-0006QF-44 for control@debbugs.gnu.org; Mon, 23 May 2011 19:41:47 -0400 Date: Mon, 23 May 2011 19:41:47 -0400 Message-Id: Subject: control message for bug 7440 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 (------) unarchive 7002 forcemerge 7002 7440 From unknown Sun Jun 22 15:20:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 21 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