emacs Package Management Automatic Package Management with el-get


Example

el-get is an open source package management system for GNU Emacs. el-get works with melpa, as well as with many common version control systms. Its documentation includes a simple self-installer for your .emacs:

(unless (require 'el-get nil t)
  (url-retrieve
    "https://raw.github.com/dimitri/el-get/master/el-get-install.el"
    (lambda (s)
      (let (el-get-master-branch)
        (goto-char (point-max))
        (eval-print-last-sexp)))))

(el-get 'sync)

el-get maintains package installations in a directory structure at ~/.emacs.d/el-get. It loads definitions from ~/.emacs.d/el-get/.loaddefs.el and tracks package status with ~/.emacs.d/el-get/.status.el. (el-get 'sync) installs or removes packages to bring the actual machine state in sync with the package .status.el.

el-get is self-hosted - here is its own status from .status.el:

(el-get status "installed" recipe
  (:name el-get :website "https://github.com/dimitri/el-get#readme" :description "Manage the external elisp bits and pieces you depend upon." :type github :branch "master" :pkgname "dimitri/el-get" :info "." :compile 
         ("el-get.*\\.el$" "methods/")
         :features el-get :post-init
         (when
             (memq 'el-get
                   (bound-and-true-p package-activated-list))
           (message "Deleting melpa bootstrap el-get")
           (unless package--initialized
             (package-initialize t))
           (when
               (package-installed-p 'el-get)
             (let
                 ((feats
                   (delete-dups
                    (el-get-package-features
                     (el-get-elpa-package-directory 'el-get)))))
               (el-get-elpa-delete-package 'el-get)
               (dolist
                   (feat feats)
                 (unload-feature feat t))))
           (require 'el-get))))