Emacs basics: Changing the background color

| emacs, wickedcoolemacs

One of the first things you’ll probably want to change about Emacs is the default face. This controls the foreground color, the background color, the font, and other attributes. For example, many graphical environments give Emacs a background of white. If you prefer a black background (which can be less tiring during long periods of use), you can change the background to black my customizing the default face.

To change the background color and other attributes, use the command M-x customize-face, and specify default as the face to customize. Change the attributes and the sample text will reflect your settings. When you are satisfied, select Save for future sessions. Your changes will be saved to ~/.emacs and reloaded the next time you start the editor.


This is a draft for Wicked Cool Emacs, a book that will be published by No Starch Press. (if we manage to get it all together! =)

You can view 10 comments or e-mail me at sacha@sachachua.com.

10 comments

For making changes i need to press enter on the [value] node. Then to actually see the changes i need to press enter on the [SET for this Session] node. For font family I just saw a box that said default...there was no option to change it. I guess this means I don't have any console fonts installed?

@bob thx for the recomendation!

Oh... emacs for the masses.
Thanks for your simple and effective explanation. :)

Thanks

-

anonyoyoyomopsus

2014-07-30T00:49:04Z

Well, EMACS for life

Thank you! This is I've been looking for

i found this completely unhelpful. I can't read any text. How then can I select from menus?
(set-background-color "black")
(set-foreground-color "wheat")
works for me.

Glad you found something that does!

Emmanuel Goldstein

2017-05-13T09:21:12Z

Is it possible to modify an existing theme and save its new parameters instead of leading the theme and then adding code to .emacs to override certain features of the theme?

You may like https://www.gnu.org/softwar... . Hope that helps! =)

Navid Rayan

2017-06-02T12:26:13Z

my eyes are at trouble with white screen