2
votes

I have installed some Emacs packages such as the starter-kit using M-x package-install. Both of my ~/.emacs and ~/.emacs.d/init.el files are empty but the installed packages still get loaded.

I wonder how Emacs loads it's installed packages? Where the code that loads the install packages resides?

I am using the pre-compiled Emacs24.BZR.106722.Win32 version.

1
In the *scratch* buffer, what do user-init-file C-j and (expand-file-name user-emacs-directory) C-j report? (or rather, are they the same as you had thought?) - phils
user-init-file C-j reports "c:/Documents and Settings/my_name/.emacs" ; (expand-file-name user-emacs-directory) C-j reports "c:/Documents and Settings/my_name/.emacs.d/" - TomCaps
sorry,I mean my ~/.emacs.d/init.el is empty,the ~/.emacs.d directory is not empty.I have edited the question - TomCaps

1 Answers

1
votes

There should be a ~/.emacs.d/elpa directory, which is where package.el (a.k.a. ELPA for Emacs Lisp Package Archive) stores its data.

Failing that,
C-hv package-user-dir RET

Edit:

From the NEWS file (C-hN):

** An Emacs Lisp package manager is now included. This is a convenient way to download and install additional packages, from a package repository at http://elpa.gnu.org.

* M-x list-packages shows a list of packages, which can be selected for installation.

* New command `describe-package', bound to `C-h P'.

* By default, all installed packages are loaded automatically when Emacs starts up. To disable this, set `package-enable-at-startup' to nil. To specify the packages to load, customize `package-load-list'.