all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregor Zattler <telegraph@gmx.net>
To: Anders Kaseorg <andersk@MIT.EDU>
Cc: 2650@debbugs.gnu.org, Prestoo Ten <prestooten@gmail.com>
Subject: bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode
Date: Sun, 27 Feb 2011 21:41:29 +0100	[thread overview]
Message-ID: <20110227204129.GB15699@shi.workgroup> (raw)
In-Reply-To: <alpine.DEB.2.00.1007301724530.14251@dr-wily.mit.edu>

Hi Anders, Prestoo,

today I discovered this thread and I'm happy to use Prestoo's
solution:

* Anders Kaseorg <andersk@MIT.EDU> [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





  reply	other threads:[~2011-02-27 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-12 19:45 bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode Prestoo Ten
2010-07-30 21:31 ` Anders Kaseorg
2011-02-27 20:41   ` Gregor Zattler [this message]
2011-02-27 21:27     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110227204129.GB15699@shi.workgroup \
    --to=telegraph@gmx.net \
    --cc=2650@debbugs.gnu.org \
    --cc=andersk@MIT.EDU \
    --cc=prestooten@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.