[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: comint.el - comint-highlight-prompt and unreadable colors
From: |
Dan Nicolaescu |
Subject: |
Re: RFC: comint.el - comint-highlight-prompt and unreadable colors |
Date: |
Mon, 26 Mar 2007 09:24:37 -0700 |
Miles Bader <address@hidden> writes:
> Jari Aalto <address@hidden> writes:
> > Have a look at these:
> >
> > 1) On Windows, terminal Putty, which is very popular free SSH terminal.
> >
> > http://cante.net/~jaalto/tmp/bug/emacs/m-x-shell-color--win32-putty.jpg
> ...
> > 2) On windows, displaying a rxvt terminal back to the Cygwin X11 server
> > from a Unix host using "-bg black -fg snow"
> >
> >
http://cante.net/~jaalto/tmp/bug/emacs/m-x-shell-color--rxvt-cygwin-X11.jpg
>
> In both cases it looks like Emacs doesn't realize that it's on a
> dark-background terminal, and is using light-background mode (which
> indeed defaults to a darkish blue for comint prompts).
>
> This is a common problem, because Emacs generally _cannot_ tell the
> background color on a terminal, so it has to guess; I don't know about
> windows, but on X11 it defaults to assuming dark-background on terminals
> unless the TERM environment variable is "xterm". If TERM = "xterm",
> Emacs assumes a light background.
>
> Since rxvt sets TERM to "xterms", that's almost certainly what's
> happening in the 2nd case. On windows, I don't know, but it's probably
> a similar problem.
If the term is rxvt, then it's not a good idea to set TERM to xterms.
With "xterms" no term/*.el terminal initialization file is run!
rxvt sets the variable COLORFGBG to show the default foreground and
background. Based on COLORFGBG that term/rxvt.el can determine the
default background color, and correctly decide if the background is
light or dark.
Unfortunately other terminals do not have such a feature...
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, (continued)
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, tomas, 2007/03/29
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, Stefan Monnier, 2007/03/29
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, tomas, 2007/03/30
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, Jari Aalto+mail.emacs, 2007/03/26
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, Miles Bader, 2007/03/26
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, Robert J. Chassell, 2007/03/26
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors,
Dan Nicolaescu <=
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, Robert J. Chassell, 2007/03/25
- Re: RFC: comint.el - comint-highlight-prompt and unreadable colors, Jari Aalto+mail.emacs, 2007/03/26