reddit / emacs

MELPA Set Package Install Location

NewFerris · 2022-11-30 02:42
I have MELPA's stable archive in my `init.el` and all my configuration files are located in `~/.config/emacs/` (based on X-Directory). If I make a change to any of these files they do into effect, but when I try to install a package, the mini-buffer shows the default directory: `Directory ‘~/.emacs.d/’ does not exist; create? (y or n)`. How can I ensure that MELPA installs packages in the Emacs directory located inside XDG home (`$HOME/.config/emacs`) instead of the default user home (`~/.emacs.d`) ?
olikn · 2022-11-30 06:42
You can set the user dir in early-init.el or at the beginning of init.el: `(setq package-user-dir "~/.config/emacs/elpa")`
NewFerris · 2022-11-30 07:16
This worked, thanks a lot !!