I find that the best way is to store the entire ~/.emacs.d directory
(including the /elpa subdirectory) in a git repository.  This makes it
easy to keep your entire config in sync between machines, and it means
you keep your init file in sync with the versions of packages.
Otherwise you may find that when you install your init file on a new
machine and install the same packages, you get newer versions that have
breaking changes, and it usually happens when you don't have time to fix
it.

If for some reason you don't want to do that, the use-package macro
makes it easy to install packages, like:

(use-package org
  :ensure t)

That will install org using the package system, if it's not already installed.


Reply via email to