I just downloaded emacs on my mac but the UI looks way different from the System Crafters videos I'm watching on YouTube. Why is this?
1 Answer
Vanilla Emacs Looks Plain
- Vanilla unconfigured Emacs looks very plain on all operating systems.
- The System Crafters videos typically use a custom configuration with a theme applied to it.
- Based on this article, I believe the theme he uses is doom-palenight. https://github.com/doomemacs/themes
- Here's how you configure your Emacs to use that theme.
How To Change Your Theme
Open Your Init File
- C-x C-f
~/.emacs.d/init.elRET - M-x
make-directoryRET RET - Do this if it's your first time to ensure that~/.emacs.d/exists.
Install The Theme With use-package
- Since this is your first time, you have to tell Emacs where to download packages from.
- Paste the following into the top of your
init.el.
(require 'package) (package-initialize) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (when (< emacs-major-version 29) (unless (package-installed-p 'use-package) (unless package-archive-contents (package-refresh-contents)) (package-install 'use-package))) - Then, paste the following
use-packageexpression from the doomemacs/themes README intoinit.el.
(use-package doom-themes :ensure t :custom ;; Global settings (defaults) (doom-themes-enable-bold t) ; if nil, bold is universally disabled (doom-themes-enable-italic t) ; if nil, italics is universally disabled ;; for treemacs users (doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme :config (load-theme 'doom-palenight t) ; Change this line to load a different theme at startup. ;; Enable flashing mode-line on errors (doom-themes-visual-bell-config) ;; Enable custom neotree theme (nerd-icons must be installed!) (doom-themes-neotree-config) ;; or for treemacs users (doom-themes-treemacs-config) ;; Corrects (and improves) org-mode's native fontification. (doom-themes-org-config)) - To run all this code, M-x
eval-bufferRET.- This will take a few seconds to download and install doom-themes the first time you do this.
- Another way to run code is to hit C-x C-e to evaluate one expression at a time.
- Put your cursor after the closing parentheses of the expression you want to run and hit C-x C-e.
- This is more fine-grained.
Trying Different Themes
- M-x
load-themeRET - Hit TAB to see a list of available options.
Another way to do the same thing is to use the ielm REPL.
- M-x
ielmRET - Then type the following Elisp into the REPL.
(load-theme 'doom-nord t) Closing Thoughts
I've found over time that the better I am at Elisp, the more I enjoy Emacs. Here are some tips to get you started.
- Docs: C-h f [function] C-h v [variable] C-h k [keybinding] C-h m [mode] M-x ielm [REPL]
- Memorize the above and use them often.
- https://protesilaos.com/emacs/emacs-lisp-elements (Emacs Lisp Elements)
emacs -Q.