wwwfff0 · 2022-02-20 18:46
\*FIXED (in comments)\*
So i recently started using emacs (doom emacs) and i have a few problems.And that whould be that the text color is the same as the background color.(My pywal might cause that) but then another question comes up,why doesent emacs launch in a new window? It just runs in the terminal (that's not what i have seen on anybody elses emacs videos).
\*EDIT it's not pywal
I whould appreciate the help!
radicalzephyr · 2022-02-20 19:13
The color thing is hard to help with but a good diagnostic step with any issue with emacs is to launch it with `emacs -q`. This launches emacs with no init files loaded (so without Doom customizations) which will let you know if it’s a problem with the color scheme in Doom or there’s something funky with your terminal color settings. One possibility is that you changed the default terminal colors and two different color codes now render as the same color.
Regarding why emacs doesn’t launch in a gui window… it’s hard to say without knowing more about what system you’re running, how you installed emacs and how you’re trying to run it.
The basic answer is that by default emacs does try to run in a graphical window unless you specifically tell it to open in terminal mode with `-nw`or `—-no-windows`. If you aren’t passing that option then it’s likely that your emacs was either built without gui support (rare but not impossible, for instance the default installation of emacs on Mac OS X is built that way) or it doesn’t have access to make graphical windows for some reason (like the terminal is over an SSH connection that doesn’t have X window forwarding enabled).
wwwfff0 · 2022-02-20 19:20
`emacs -q` does not have any problems,so the problem is with the colorscheme? I have built emacs with the following useflags `"X alsa nvidia gtk elogind contrib"`.
I run emacs this way:
`/usr/bin/emacs --daemon &`
then `emacs` or `emacsclient -c -a 'emacs'`
radicalzephyr · 2022-02-21 09:07
> emacs -q does not have any problems,so the problem is with the colorscheme?
Yes. One thing to keep in mind is that many terminal emulators only support 256 colors unless the proper environment variables are set for both the terminal and the program. So if the color scheme in doom is relatively low contrast and designed with a greater color depth in mind it might just be collapsing two different colors into the one that’s closest to both when reverting to the terminal.
> I have built emacs with the following useflags "X alsa nvidia gtk elogind contrib" .
Those flags seem reasonable if minimal, should be possible to make a gtk window. Is there a package manager you can install from instead of building from source? That would be a good troubleshooting step even if it has a version older than you want to use.
> then emacs or emacsclient -c -a 'emacs'
That way of invoking `emacsclient` should work to create a terminal. If you [read the details for the `-c` option](https://www.gnu.org/software/emacs/manual/html_node/emacs/emacsclient-Options.html) it says:
> If Emacs cannot create a new graphical frame (e.g., if it cannot connect to the X server), it tries to create a text terminal client frame, as though you had supplied the ‘-t’ option instead.
This suggests that there is no X server available to the `emacs` process. How do you run the daemon `emacs` manually from the terminal or as part of a startup script? If it’s in a startup script it may be running before the necessary X windows environment is set up.
What OS are you running in? Is this like a Linux VM running inside WSL or is it a vanilla Linux distro installed directly on the machine?
Also FYI, unless you have an alias, just running `emacs` will not use the daemon emacs server it will start a new instance.
WonderLemming · 2022-02-21 15:12
In Doom Emacs you can `SPC h t` to get a list of available themes and then us the up/down arrow keys to scroll through the different themes and see if one works for you.
wwwfff0 · 2022-02-21 18:36
Thank you all for the answers.I checked the useflags for emacs on [gentoo packages](https://packages.gentoo.org/), i had to reemerge emacs with the gui useflag.