Wolf writes: > On 2022-11-23 17:30:07 +0000, ( wrote: >> That's why I use this code to redirect all custom customisations into >> ~/.config/emacs/custom.el: >> >> (setq custom-file >> (concat (or (getenv "XDG_CONFIG_HOME") >> (concat (getenv "HOME") "/.config")) >> "/emacs/custom.el")) >> (load custom-file) > > I'm totally new to emacs, so this might be very stupid question, but > based on the internets I've put the following into the init.el: > > (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) > (load-file custom-file) > > Is there any practical difference or reason to prefer your version? > > W. No, I think yours one is better, because it's OS independent. I can suggest the following, which basically the same but will save you a few byte on your HDD/SSD: --8<---------------cut here---------------start------------->8--- (setq custom-file (locate-user-emacs-file "custom.el")) (load-file custom-file) --8<---------------cut here---------------end--------------->8--- -- Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5 Fediverse: akib@hostux.social Codeberg: akib emailselfdefense.fsf.org | "Nothing can be secure without encryption."