-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong colors using emacs-nox in WT-Ubuntu #2953
Comments
Can you report what the |
@DHowett-MSFT, in WT and outside it (from the Start Menu), Ubuntu has
while in MinTTY, Ubuntu has
MSYS2 bash in MinTTY has
while in WT (using
(here it COPY/PATEs wrong, does not take the In any case, in 2., 3., 4. with the same theme there is the good result. In 1. it is wrong. BTW, I tested this in WT Ubuntu:
and the result is similar to 2., 3., 4. : just the comment lines differ, in RED instead of YELLOW. |
I'm wondering if this is a side effect of #2661. |
This comment has been minimized.
This comment has been minimized.
@HoLengZai , have you tried the color scheme below? It seems a bit better...
|
Okay sorry this one got missed. The I'd suspect that launching emacs with |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
@angelog0 , Not really, it looks like the same as "One Half Light" default color scheme. As a workaround, I change the default e-macs theme instead of changing the Windows Terminal one: That's the fastest workaround I guess. Emacs theme will override all the colours and you will get the same result as above... |
@HoLengZai , thanks for suggestions. I will give it a try... @msftbot, as you see this thread is not dead... and should be your interest to understand why on WT this occurs.. |
@HoLengZai , yes with that theme things are better. I tried it with MSYS2 emacs-nox in WT and MinTTY. In MinTTY it looks a bit different... |
Like I said, this sounds like a TERM mismatch. Changing the color scheme of the Terminal isn't going to magically change the colors that emacs emits for it's own scheme, if it's using 256colors for its scheme. You had different |
Sorry, I didn't catch your comments @zadjii-msft. (I didn't get that I can use your example as a command on my shell :D, I was probably tired.. or your explanation was a way to advance my knowledge of terminal customization) (I used WT Campbell colour scheme for all my tests)
By default, when I type @angelog0 , So I removed "wombat theme" on all my examples above. I just use the default one. Hope it will help anyone like me who just want to have a simple emacs with the proper way to read it through Windows Terminal :D |
@zadjii-msft I just try to understand the issue with emacs only even if on environment variable we see xterm-256color.... I found this article for example for iTerm: https://iterm2.com/faq.html Hence, maybe Windows Terminal can provide this kind of option too? So Emacs will know that we are using xterm-256color or set screen-256color (don't really get the diff) but a custom value on Report Terminal Type option |
When using WSL, the Terminal (and console) both already report themselves as I don't understand why emacs would have different color schemes for |
@HoLengZai, I did the same tests. With I still do not understand why in MinTTY (which has |
Well, I think the ticket can be closed as it is not specific to Windows Terminal but related to Emacs behaviour to determine the right "terminal (emulator) color" I finally found the trick to make it work properly without playing or messing around with an environment variable or affecting emacs keyboard, etc (as some people got issues by changing/playing with $TERM)
So basically if you determine your "frame-background-mode" for emacs, you will be able to fix the issue: (Using emacs-nox)
Check the one you prefer which match the "normal color"
Result: (still using Campbell color scheme) However... Still wondering how emacs retrieve the frame-background-mode, I guess it cannot get it from the terminal so it applies the light one? |
@angelog0 did @HoLengZai's suggestion work for you/? |
@zadjii-msft, I do not use dark mode so i cannot say if that works. Meanwhile I changed the WSL theme. Now I use Anyway, I think you should discuss these things with Emacs people, the developers... |
BTW, MSYS2 has a TTY package of Emacs and to use it in WT I had to change Emacs theme:
With that theme, things work better. BETTER does not mean RIGHT! For this reason, in previous post, I suggested to discuss the issue with Emacs people. |
By default I use MSYS2 MinTTY and by means of
wslbridge
I use also this MinTTY for WSL Ubuntu. With both these apps I use a color scheme which I added to theprofile.json
:In the same
profile.json
I added the profiles for MSYS2 bash. I use the same above color scheme for MSYS2 bash and Ubuntu in WT.In this attachment
emacs-nox-sshots.tar.gz
there are a few screenshots of emacs-nox running on various systems. As you can see I have the same good result in MinTTY (emacs-nox-mintty.png), Ubuntu in MinTTY (emacs-nox-mintty-Ubuntu.png) and in MSYS2 bash in WT (emacs-nox-WT-msys2.png). Instead in WT Ubuntu I get what I call bad result (emacs-nox-WT-Ubuntu.png).
The text was updated successfully, but these errors were encountered: