Basic packages
The basic way to use packages^(1) is pretty simple:
Add to your init file:
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
Then, run M-x list-packages
to get the package menu. From this menu, you can search for packages, view descriptions, install, uninstall, and update packages. Press i
to mark a package for installation, d
for marking a package for uninstallation (deletion), or U
to mark all installed packages that can be upgraded for upgrading. Then, pressing x
will perform these actions.
Freedom from management
Using package installation will handle storing things for you; you don't have to worry about managing files or directories. Once you replace a locally-installed .el file with a package from a repository, you can get rid of the local file and the load instructions from your init file. You will need to keep any configuration of that package, however.
Advanced packages
Other methods include things like Cask, which is a way of automating the management of installed packages. You have a file of packages you want installed, and you can have Cask do installations and upgrades automatically.
[1] Note that this way of dealing with packages is not specific to MELPA -- it will work with the GNU ELPA repo, or Marmalade -- you just have to find the proper location to add to 'package-archives
.
package.el
is not an alternative to the others, it is the library that allows you to interact with Melpa, GNU Elpa, Marmalade, and other such repos.