all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode
@ 2009-03-12 19:45 Prestoo Ten
  2010-07-30 21:31 ` Anders Kaseorg
  0 siblings, 1 reply; 4+ messages in thread
From: Prestoo Ten @ 2009-03-12 19:45 UTC (permalink / raw)
  To: bug-gnu-emacs

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/







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Kaseorg @ 2010-07-30 21:31 UTC (permalink / raw)
  To: Prestoo Ten; +Cc: 2650

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode
  2010-07-30 21:31 ` Anders Kaseorg
@ 2011-02-27 20:41   ` Gregor Zattler
  2011-02-27 21:27     ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Gregor Zattler @ 2011-02-27 20:41 UTC (permalink / raw)
  To: Anders Kaseorg; +Cc: 2650, Prestoo Ten

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#2650: Add "lisp/term/screen.el" to support GNU Screen's 256 colors mode
  2011-02-27 20:41   ` Gregor Zattler
@ 2011-02-27 21:27     ` Chong Yidong
  0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2011-02-27 21:27 UTC (permalink / raw)
  To: Prestoo Ten; +Cc: 2650, Gregor Zattler, Anders Kaseorg

I've added term/screen.el to the trunk.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-27 21:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-02-27 21:27     ` Chong Yidong

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.