Skip to main content
13 votes
Accepted

custom-theme-set-faces does not work in emacs 27

Put this line in your init. Theme changes will take effect immediately in Emacs 27. (setq custom--inhibit-theme-enable nil) Presumably the automatic theme changing was disabled for a good reason. ...
Starlight100's user avatar
10 votes

custom-theme-set-faces does not work in emacs 27

Another solution would be to add enable-theme to the custom theme settings, such as: (when (< emacs-major-version 27) (package-initialize)) (load-theme 'leuven t) (custom-theme-set-faces '...
Shaun's user avatar
  • 101
9 votes

How do I change portions of a custom theme?

In spacemacs, install the layer theming, see https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bthemes/theming For example, I have the following snipped in the dotspacemacs/user-init of my ....
Thorsten's user avatar
  • 191
9 votes
Accepted

Different themes in different modes

AFAIK you can't do this with the 'theme' system. I'm pretty sure themes are global. You can have buffer-local face remapping however, and that could take place in a mode hook, so I think there's a ...
phils's user avatar
  • 51.9k
7 votes

Make a function to toggle themes

I wrote a few functions to cycle through a group of themes. (setq ivan/themes '(elixir elixir-dark)) (setq ivan/themes-index 0) (defun ivan/cycle-theme () (interactive) (setq ivan/themes-index (%...
ivan's user avatar
  • 1,948
7 votes
Accepted

Orgmode: Extra vertical space between level 1 and previous line

There may be a better way, but the following can help. From org documentation, if you insert more than one blank line before the heading, one blank line will be displayed: An empty line after the ...
JeanPierre's user avatar
  • 7,475
6 votes

Make a function to toggle themes

Even though the existing answers work fine, I would like to share a simpler one: (defun toggle-theme () (interactive) (if (eq (car custom-enabled-themes) 'leuven) (disable-theme 'leuven) ...
Michel de Ruiter's user avatar
6 votes
Accepted

Is there a way to easily see currently defined faces?

To see all faces currently defined: M-x list-faces-display. It does show a preview. It does not show the samples using the "default 'link' face". The Emacs manual, as usual, is your friend. C-h r i ...
Drew's user avatar
  • 78.1k
6 votes

customize colors of level in org-mode

I think your main problem here is actually you do not consider org-level-1 the face but org-level-1 the function (which is not existing as the error message indicates it). You can use something like ...
slemaguer's user avatar
  • 369
6 votes
Accepted

Make a function to toggle themes

I have made it but I switch 3 themes (My own kosmos, leuven and default) You can check https://github.com/habamax/.emacs.d/blob/master/lisp/haba-appearance.el excerpt from it: (defvar *haba-theme-...
Maxim Kim's user avatar
  • 1,766
6 votes
Accepted

Symbol's function definition is void: use-package

The emacs-darcula-theme README suggests installing via use-package, but this requires installing the use-package first. Since you've already installed the darcula-theme package, you can just do a ...
npostavs's user avatar
  • 9,223
5 votes

Setting up a theme using use-package

My user-emacs-directory points to a folder on my Dropbox. Apparently use-package :load-path points to the user-emacs-directory by default, I just had to put "themes" and the necessary files inside it. ...
Wilson Almeida's user avatar
5 votes
Accepted

How to overwrite properly a face for a particular theme

Well, finally I have a working solution, actually it was so obvious that I don't understand why it took me so long to find out. The answer is to use my previous solution that make use of the custom ...
joe di castro's user avatar
5 votes

Changing emacs theme modeline colors

You need to change these lines. `(mode-line ((t (:background ,atom-one-dark-black :foreground ,atom-one-dark-silver)))) `(mode-line-buffer-id ((t (:weight bold)))) `(mode-line-...
fhdhsni's user avatar
  • 703
5 votes
Accepted

Why are custom themes not usually byte-compiled?

The manual nodes (elisp) Custom Themes, (emacs) Custom Themes and (emacs) Creating Custom Themes make no mention of byte-compilation, so why is it not done? At the time of writing, the manuals indeed ...
Basil's user avatar
  • 12.5k
5 votes
Accepted

Theme editing: bash: change color of heredoc

Put your cursor within the heredoc, and do M-x customize-face: the face suggested by default should be the one present under the cursor.
Stefan's user avatar
  • 26.5k
4 votes

describe-face character not under / unreachable by the cursor

Turns out you can indeed use the mouse (I think this may be exactly what you were looking for): ;; based on: https://emacs.stackexchange.com/a/19585/13444 (defun brds/describe-char-at-mouse-click ...
Braham Snyder's user avatar
4 votes
Accepted

Emacs (as daemon) doesn't load theme

Edit: This question has several answers, which generally seem to boil down to "use after-frame-functions". Original answer: I think you want to call load-theme from after-init-hook. That's where I ...
Aaron Harris's user avatar
  • 2,684
4 votes
Accepted

Theme not loading on startup

If you installed this theme as a package: Packages are initialized after .emacs is read. To use/configure them from there, use constructions like (add-hook 'after-init-hook (lambda () (load-theme '...
Vera Johanna's user avatar
4 votes
Accepted

How to change the color of numbers for a theme?

You can achieve highlighting of numbers in the buffers using highlight-numbers package. The face used for numbering is highlight-numbers-number and it inherits from font-lock-constant-face. For a ...
Chakravarthy Raghunandan's user avatar
4 votes
Accepted

Modify Theme Colors/Font Weight

You were missing a parameter when calling set-face-attribute. Also, the value for weight is a symbol and not a string. (set-face-attribute 'font-lock-type-face nil :weight 'normal) Here is a list of ...
Mathieu Marques's user avatar
4 votes
Accepted

Emacs Terminal vs Emacs GUI: different look & feel for the same theme

That is normal behavior as usually terminals do not have all the colors GUI has. Some theme makers try to do their best to find matching colors on terminals that have only 16 or 256 paletted colors ...
Maxim Kim's user avatar
  • 1,766
4 votes

Emacs Terminal vs Emacs GUI: different look & feel for the same theme

This is normal because most terminals do not support truecolor (24 bit color, specifying 16+ million colors). So the terminal only has 256 colors, while your GUI has more. For instance, macOS's built ...
algal's user avatar
  • 355
4 votes

How to make everything except the text transparent?

I do not know for sure if the text becomes transparent, but this is what I use and I think works pretty well. However, if your font color is white, and you are reading a pdf with a white background ...
Guilherme Salome's user avatar
4 votes
Accepted

Get asked to confirm safe theme forever

Bearing in mind that the init file is an elisp program which is evaluated in sequence, you need to ensure that the call to load-theme happens after the customized variables have been evaluated; ...
phils's user avatar
  • 51.9k
4 votes

Adding box around text without changing the text width

My use case for this SE is to have a box around region face, so the highlighted region in transient-mark-mode is visible even when the region overlaps with some other overlays: (set-face-attribute '...
Victor Rybynok's user avatar
4 votes
Accepted

Custom theme only loads changes every second start-up

My crystal ball says: load-theme loads the theme from ~/.emacs.d/elpa/foo-theme-<version> then package-install-file takes your ~/.emacs.d/foo-theme.el and installs it (aka copies it and ...
Stefan's user avatar
  • 26.5k
4 votes
Accepted

org-mode-hook is always evaluated

Assuming that the O.P. meant to use an underscore in the function name of org_setup (which is possible, but not the standard naming convention), then the problem is with the call to add-hook itself. ...
lawlist's user avatar
  • 19.3k
3 votes
Accepted

Leuven Theme makes org-mode headline too big

Fabrice added a variable for this not too long ago: leuven-scale-outline-headlines. Most importantly, you'll have to set it to nil before the theme is loaded. One way to do that is to it through M-x ...
Dmitry's user avatar
  • 3,813
3 votes

Emacs in OSX Terminal.app not filling entire window

Terminal.app has slight margins on the each end. This works fine for terminal commands, but it also adds an unwanted margin to your "full-screen" terminal applications. I don't think there is any ...
anuragm's user avatar
  • 31

Only top scored, non community-wiki answers of a minimum length are eligible