This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Latest Cygwin update and Emacs in Mintty

On 6/15/2017 6:47 AM, Ken Brown wrote:
On 6/14/2017 3:00 PM, Achim Gratz wrote:
Achim Gratz writes:
After the latest Cygwin update I'm hitting an interesting problem with
emacs-nox running in a mintty: when Emacs starts, it decides that the
background color is gray instead of the usual white (for all but the
rightmost character in the status line, interestingly enough).  I have
the normal mintty background set slightly off-white (to #F8F8F8) and
mintty reports itself as xterm-256color (the same happens in when TERM
is set to screen-256color).  Emacs starts up with the correct background
color, draws the status bar and the menu bar and only then switches the
background to gray.  The gray it choses is very slightly lighter than
the status bar (so lightly in fact that I can make out the difference on
only one of my three monitors).  Emacs really thinks it is using a white
background, as evidenced by the fact that (set-background-color "white")
will produce exactly the same result.  I get my usual background back
with (set-background-color "#F8F8F8"), but I have no idea where the
wrong setting for the named color "white" comes from.

I'm just trying this at home remotely logging in from a konsole terminal
on my Linux box: Here the background chosen is slightly darker than the
status bar, the status bar seems to be #B8B8B8 and the background for
"white seems to be #B4B4B4.  Curious and curiouser...

Ken, did you have a chance to look into this?

Sorry, I must have missed this when you first sent it.  I'll take a look.

I also see some strange behavior, but I can't reproduce what you're seeing. Here's what I tried:

1. I edited .minttyrc to set BackgroundColour=#F8F8F8. (ForegroundColour is 0,0,0, which I guess is the default.)

2. I ran 'emacs-nox -Q'. The background color didn't visibly change; it's still off-white. The mode line and menu line appear to be reversed (black background, off-white foreground, though I can't really be sure that the foreground is off-white rather than white).

3. I evaluated (set-background-color "white"). This caused the background to turn gray. The mode line and menu bar didn't visibly change.

4. I evaluated (set-background-color "#F8F8F8"). The background stayed gray.

I need to investigate 3 and 4, but first I'd like to understand why you and I are seeing different things. One difference is the value of TERM. You say "mintty reports itself as xterm-256color". Do you mean it does this by default, or do you have something in your startup files that causes this? When I start mintty, I get the following:

$ echo $TERM


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]