From unknown Mon Aug 18 02:37:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode Reply-To: Prestoo Ten , 2650@debbugs.gnu.org Resent-From: Prestoo Ten Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 12 Mar 2009 19:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 2650 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123688713912750 (code B ref -1); Thu, 12 Mar 2009 19:55:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Mar 2009 19:45:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2CJjZji012744 for ; Thu, 12 Mar 2009 12:45:36 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhqqV-0005DV-2y for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 15:45:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhqqR-0005CU-Ja for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 15:45:34 -0400 Received: from [199.232.76.173] (port=58864 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhqqR-0005CR-Bd for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 15:45:31 -0400 Received: from mail-gx0-f160.google.com ([209.85.217.160]:47138) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LhqqR-0001hB-0s for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 15:45:31 -0400 Received: by gxk4 with SMTP id 4so586481gxk.18 for ; Thu, 12 Mar 2009 12:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=RgqXvi+TZN8nuTsBFk4QZjAcxRMcRNzhT9DBbatUYzw=; b=lbbkhfO8hAYvjn0ejIJl0oi0gL9hMbEdkOfjUXfcfJmZTawMUkKS1IkchtnkCFJd8E xNi/5Fm0zGjaTVyUEj/o58egPNUBce+HJRlYO+D/ZIAhXzvxU7kZ7LbcPTV/BI4jceup JiiofH8vnpJ39cCO0CrLocYCRXPspaB8Uo/qM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=FyDvtmfQedqdom0uYekUJIxmcigw2PUW1NWKWhENBUL+WfkkhpoKgC12E+hOsuTsEA YJ7AaAxhJ1Y/WdxgeiJzyYnqiDnEF+XY+X1zzbTyhhIA6P2tSdMs/judNjA/5Y29tCvp o/+BlHpjjTcJEVIR19ziXv6ygJe2j0YA10qzk= MIME-Version: 1.0 Received: by 10.231.19.72 with SMTP id z8mr89212iba.42.1236887129478; Thu, 12 Mar 2009 12:45:29 -0700 (PDT) Date: Thu, 12 Mar 2009 21:45:28 +0200 Message-ID: From: Prestoo Ten To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Please consider adding the file "lisp/term/screen.el" with the following contents to support GNU Screen's "screen-256color" terminal type: (load "term/xterm") (defun terminal-init-screen () "Terminal initialization function for screen." ;; Use the xterm color initialization code. (xterm-register-default-colors) (tty-set-up-initial-frame-faces)) See discussion in the following threads on the emacs-devel mailing list: http://article.gmane.org/gmane.emacs.devel/87582/ http://article.gmane.org/gmane.emacs.devel/109504/ From rgm@gnu.org Thu Mar 12 19:32:17 2009 Received: (at control) by emacsbugs.donarmstrong.com; 13 Mar 2009 02:32:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2D2WE1v018504 for ; Thu, 12 Mar 2009 19:32:16 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LhxC2-0007aH-9N; Thu, 12 Mar 2009 22:32:14 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18873.50606.212707.945346@fencepost.gnu.org> Date: Thu, 12 Mar 2009 22:32:14 -0400 From: Glenn Morris To: control Subject: control message X-Debbugs-No-Ack: yes severity 2650 wishlist merge 2602 2653 severity 2648 minor From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 17:35:35 2010 Received: (at control) by debbugs.gnu.org; 25 Jan 2010 22:35:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZXWw-0006YU-P2 for submit@debbugs.gnu.org; Mon, 25 Jan 2010 17:35:34 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZXWu-0006YN-NH for control@debbugs.gnu.org; Mon, 25 Jan 2010 17:35:32 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NZXWq-0000cS-Q9; Mon, 25 Jan 2010 17:35:28 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19294.7344.790292.83914@fencepost.gnu.org> Date: Mon, 25 Jan 2010 17:35:28 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: white X-Ran: 6"^>5bx^3f' 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.0 (-----) tags 2650 patch unarchive 2656 unmerge 2656 severity 2696 minor From unknown Mon Aug 18 02:37:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode Resent-From: Anders Kaseorg Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2010 21:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2650 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Prestoo Ten Cc: 2650@debbugs.gnu.org Received: via spool by 2650-submit@debbugs.gnu.org id=B2650.12805257645593 (code B ref 2650); Fri, 30 Jul 2010 21:37:02 +0000 Received: (at 2650) by debbugs.gnu.org; 30 Jul 2010 21:36:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OexFL-0001SA-AN for submit@debbugs.gnu.org; Fri, 30 Jul 2010 17:36:03 -0400 Received: from dmz-mailsec-scanner-2.mit.edu ([18.9.25.13]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OexB4-0001Q0-HB for 2650@debbugs.gnu.org; Fri, 30 Jul 2010 17:31:49 -0400 X-AuditID: 1209190d-b7c82ae000000a16-b3-4c5344cd64f1 Received: from mailhub-auth-3.mit.edu (MAILHUB-AUTH-3.MIT.EDU [18.9.21.43]) by dmz-mailsec-scanner-2.mit.edu (Symantec Brightmail Gateway) with SMTP id D2.4F.02582.DC4435C4; Fri, 30 Jul 2010 17:31:57 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id o6ULVsSa023203; Fri, 30 Jul 2010 17:31:55 -0400 Received: from localhost (DR-WILY.MIT.EDU [18.181.0.233]) (authenticated bits=0) (User authenticated as andersk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o6ULVqQD025274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 30 Jul 2010 17:31:54 -0400 (EDT) Date: Fri, 30 Jul 2010 17:31:52 -0400 (EDT) From: Anders Kaseorg In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Brightmail-Tracker: AAAAAA== X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Fri, 30 Jul 2010 17:36:02 -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: -1.3 (-) On Thu, 12 Mar 2009, Prestoo Ten wrote: > Please consider adding the file "lisp/term/screen.el" with the > following contents to support GNU Screen's "screen-256color" terminal > type: Note that lisp/faces.el has a heuristic [1] that assumes the terminal has a light background for TERM={xterm*,rxvt*,dtterm*,eterm*}, but a dark background for other TERMs including TERM=screen*. So you may also need to customize frame-background-mode to 'light to prevent the default colors from becoming unreadably bright. Perhaps the heuristic should be updated? [1] http://repo.or.cz/w/emacs.git/blob/EMACS_23_2:/lisp/faces.el#l1876 From unknown Mon Aug 18 02:37:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode Resent-From: Gregor Zattler Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Feb 2011 20:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2650 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Anders Kaseorg Cc: 2650@debbugs.gnu.org, Prestoo Ten Received: via spool by 2650-submit@debbugs.gnu.org id=B2650.12988402792834 (code B ref 2650); Sun, 27 Feb 2011 20:58:02 +0000 Received: (at 2650) by debbugs.gnu.org; 27 Feb 2011 20:57:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ptngj-0000jf-PF for submit@debbugs.gnu.org; Sun, 27 Feb 2011 15:57:58 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Ptngh-0000jN-Fe for 2650@debbugs.gnu.org; Sun, 27 Feb 2011 15:57:56 -0500 Received: (qmail invoked by alias); 27 Feb 2011 20:57:48 -0000 Received: from p4FC2323E.dip.t-dialin.net (EHLO shi.workgroup) [79.194.50.62] by mail.gmx.net (mp070) with SMTP; 27 Feb 2011 21:57:48 +0100 X-Authenticated: #19296480 X-Provags-ID: V01U2FsdGVkX19EZjgSGwpE+vy71b6dlLMvDjtKTEOYio7PimV7f8 anee0Q5LFUd7DF Received: from grfz by shi.workgroup with local (Exim 4.74) (envelope-from ) id 1PtnR7-0004cr-K7; Sun, 27 Feb 2011 21:41:49 +0100 Date: Sun, 27 Feb 2011 21:41:29 +0100 From: Gregor Zattler Message-ID: <20110227204129.GB15699@shi.workgroup> References: 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-Y-GMX-Trusted: 0 X-Spam-Score: -4.3 (----) 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.7 (---) Hi Anders, Prestoo, today I discovered this thread and I'm happy to use Prestoo's solution: * Anders Kaseorg [30. Jul. 2010]: > On Thu, 12 Mar 2009, Prestoo Ten wrote: >> Please consider adding the file "lisp/term/screen.el" with the >> following contents to support GNU Screen's "screen-256color" terminal >> type: > > Note that lisp/faces.el has a heuristic [1] that assumes the terminal has > a light background for TERM={xterm*,rxvt*,dtterm*,eterm*}, but a dark > background for other TERMs including TERM=screen*. So you may also need > to customize frame-background-mode to 'light to prevent the default colors > from becoming unreadably bright. By chance my background is dark, so no problem for me. I tested what would happen if my background was white without other customisations (emacs -Q; screen -c /dev/null) with an org-mode file. It is really barely readable. That's not the case without screen, because Emacs then recognises the brightness of the terminal emulators background (at least for white and black) and adjusts the faces colours. So, if I used white backround with screen I would have to customise frame-background-mode via .emacs or utilise .Xdefaults. But this should not hinder the inclusion of the file lisp/termscreen.el as provided by the OP. > Perhaps the heuristic should be updated? > > [1] http://repo.or.cz/w/emacs.git/blob/EMACS_23_2:/lisp/faces.el#l1876 That's still the same in Emacs trunk. This is way beyond my elisp literacy. But Emacs somehow realises is background is dark or light if invoked in a rxvt-unicode or xterm terminal emulator window. This is for some reason not the case when invoked in a screen session which in turn is invoked in a rxvt-unicode or xterm. Perhaps it is somehow possible to detect the background brightness in screen too? Thanks, Gregor From unknown Mon Aug 18 02:37:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Feb 2011 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2650 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Prestoo Ten Cc: 2650@debbugs.gnu.org, Gregor Zattler , Anders Kaseorg Received: via spool by 2650-submit@debbugs.gnu.org id=B2650.12988420915429 (code B ref 2650); Sun, 27 Feb 2011 21:29:01 +0000 Received: (at 2650) by debbugs.gnu.org; 27 Feb 2011 21:28:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pto9v-0001PT-Jb for submit@debbugs.gnu.org; Sun, 27 Feb 2011 16:28:10 -0500 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pto9o-0001Ov-H3 for 2650@debbugs.gnu.org; Sun, 27 Feb 2011 16:28:06 -0500 Received: from furball ([64.134.100.146]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p1RLRs2O006617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 27 Feb 2011 16:27:55 -0500 Received: by furball (Postfix, from userid 1000) id B64C91600E7; Sun, 27 Feb 2011 16:27:54 -0500 (EST) From: Chong Yidong References: <20110227204129.GB15699@shi.workgroup> Date: Sun, 27 Feb 2011 16:27:54 -0500 In-Reply-To: <20110227204129.GB15699@shi.workgroup> (Gregor Zattler's message of "Sun, 27 Feb 2011 21:41:29 +0100") Message-ID: <87vd05dv6t.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-Spam-Score: -2.6 (--) 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.6 (--) I've added term/screen.el to the trunk. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 27 15:30:12 2012 Received: (at control) by debbugs.gnu.org; 27 Mar 2012 19:30:12 +0000 Received: from localhost ([127.0.0.1]:41604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCc5r-0005aF-6b for submit@debbugs.gnu.org; Tue, 27 Mar 2012 15:30:11 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57862) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCc5o-0005a8-T3 for control@debbugs.gnu.org; Tue, 27 Mar 2012 15:30:09 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SCbbX-0007MI-Ps for control@debbugs.gnu.org; Tue, 27 Mar 2012 14:58:51 -0400 Date: Tue, 27 Mar 2012 14:58:51 -0400 Message-Id: Subject: control message for bug 2650 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.9 (------) close 2650 24.1