Question

How to change default installed packages location?

I'd like to build stand-alone emacs distribution. Something that I can put on net folder or a usb stick, unpack on arbitrary system that has emacs itself installed, work with provided settings and doesn't mess with original emacs settings resided on the system. It is like a showcase for what emacs is capable for my buddies.

I've redefined load-path and so on in init.el but failed to customize elpa working locations. I search through emacs self-documenting info system and found no documentation about package system's meta-files location and installed packages path. Obviously I can not leave with default values, and I doesn't know what variables to modify or hooks to setup.

Was it helpful?

Solution

package-user-dir is the variable you want. From the docs:

package-user-dir is a variable defined in `package.el'. Its value is "~/.emacs.d/elpa"

This variable is potentially risky when used as a file local variable.

Documentation: Directory containing the user's Emacs Lisp packages. The directory name should be absolute. Apart from this directory, Emacs also looks for system-wide packages in `package-directory-list'.

(I found this using M-x apropos-variable and searching for 'package').

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top