East_Staff3288 · 2022-07-25 14:43
I have looked into /etc/ folder but I don't see any emacs directory.
I havent' found any themes directory with theme files inside \~/.emacs.d directory, but maybe it's just hidden in some subdirectory os something.
Where are theme files for themes like what I have right now - leuven theme - stored on macOS?
For example I would like to see the leuven theme code where is it located?
I am using Spacemacs if it's important.
Ethan045627 · 2022-07-25 15:06
You have to set something like this in your init.el :
And for safety first delete leuven theme package and after setting config again install the package then see if its available.
​
`;; To Add path of theme`
`(add-to-list 'custom-theme-load-path "/PATH/TO/EMACS-LEUVEN-THEME/lisp")`
`;; To set the theme`
`(load-theme 'leuven t)`
East_Staff3288 · 2022-07-25 15:13
So the theme is so far in C and the Lisp code hasn't been generated from the C code by Emacs? I am already using the leuven theme so it has to come from somewhere already.
Ethan045627 · 2022-07-25 15:16
[https://emacsthemes.com/themes/leuven-theme.html](https://emacsthemes.com/themes/leuven-theme.html)
is this the theme you are talking about?
The only directory that emacs is concerned about is .emacs.d (Maybe I am wrong) but if you already have theme and you haven't manually set the custom-theme-load-path then it must be somewhere in your .emacs.d directory only (Try to do a find or fd search)
BTW I am assumming that you are using vanilla emacs.
East_Staff3288 · 2022-07-25 16:48
I have mentioned that I am using Spacemacs.
But on my Windows 11 laptop where I installed the vanilla Emacs via the exe installer provided from the [emacs.org](http://ftp.gnu.org/gnu/emacs/windows/emacs-28/) website. I do NOT see any themes directory either. Even though I can select and use the theme leuven via M-x load-theme leuven or wombat etc. so clearly it has to be stored somewhere. But where? Any idea? I can't find it even on a vanilla Windows installation of Emacs.
Where is leuven stored on your macOS installation of Emacs?
MitchellMarquez42 · 2022-07-25 19:32
Run M-x find-library RET leuven-theme RET
This will open the lisp file where the theme is defined.
HM0880 · 2022-07-25 19:43
You are wrong. Emacs looks in the paths contained in the variable `custom-theme-load-path`. From this, we see that the variable `data-directory` is where the built-in themes are located.
To answer OP's question, on my Mac, the path is `/Applications/Emacs.app/Contents/Resources/etc/themes/`.