When I load a custom color scheme (through M-x load-theme or M-x customize-theme) the results only seem to be applied when Emacs runs in a separate window:
But when Emacs is run in a terminal with -nw, the default colors seem to be used:
(source: raghav at www.ocf.berkeley.edu)
I'm new to Emacs, so I don't know if this is expected behavior -- but it doesn't seem to be, since Googling turns up several people discussing using color themes in console mode. Any help would be much appreciated.
You can enable a specific Custom theme in the current Emacs session by typing M-x load-theme . This prompts for a theme name, loads the theme from the theme file, and enables it. If a theme file has been loaded before, you can enable the theme without loading its file by typing M-x enable-theme .
Launch Windows Terminal and then select the small downward-facing arrow in the title bar. This will open a pull-down menu that lists the available profiles on your system (for example, Windows PowerShell and Command Prompt) and some other options. Select Settings, and the settings.
Call customize-themes to set a color theme. emacs M-x customize-themes. Click to see the change immediately. Alternatively, call load-theme , then press Tab ↹ to show a list of available themes.
You can define a Custom theme using an interface similar to the customization buffer, by typing M-x customize-create-theme . This switches to a buffer named *Custom Theme* . It also offers to insert some common Emacs faces into the theme (a convenience, since Custom themes are often used to customize faces).
See this question: How to make Emacs terminal colors the same as Emacs GUI colors?
The theme in your console looks quite close to the one in the GUI, so my bet is that you will have to live with it -- or use the GUI.
I am very late, but I had the same problem and I solved it adding the following line to my ~/.zshrc
export TERM=xterm-256color
If you are not using zsh (for example you are using bash), you must add it on your right console init file (for example ~/.bashrc)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With