Starting from scratch with small jams 🤔

I started an exercise with my laptop to build an Arch/Hyprland from scratch.

It is a very enriching process, but sometimes I find surprises, like the one I got when building Emcas.

For the building process I was guided by this site and there were no problems.

My problem is that I configured a font and theme and saved the options, but I can’t find where I saved them. I hoped to find a custom.el in .emacs.d but it does not exist.

Can you help me to find the generated configuration?

Thanks. :blush:

I reply to myself.

I saw it saved in an .emacs file, but not in .config.

Sorry about that. :flushed:

Yep i faced this issue myself. I usually delete .emacs file in home folder and move the stuff to ~/.config/emacs/init.el

By default it will use the ~/.emacs.d folder to store various bits and pieces, however if a .config/emacs folder exists (and no .emacs file or ~/.emacs.d folder) it will use that one.
This can be very confusing as just starting emacs on an unconfigured system will likely create a ~/.emacs.d/ folder and if you add your desired config in the .config folder, emacs will ignore it. I have been bitten by that a few times now. The solution is to that is to rm -rf ~/.emacs.d.
Similarly the custom settings are by default persisted to the init file being used, i.e. .config/emacs/init.el or .emacs unless a separate custom file is configured. If you want to share your config over different machines this wreaks havoc and causes frequent conflicts.
I have as the first thing in my ~/.config/emacs the snippet

(setq custom-file (concat user-emacs-directory "custom.el"))
(when (and custom-file
           (file-exists-p custom-file))
  (load custom-file nil :nomessage))

to save the customization settings in a custom.el file in the default emacs directory.

1 Like