     emacs-build-info))
 
 (defmacro emacs-pkg-debug-setup (pkg-alist &rest body)
-  "Install packages in PKG-ALIST and evaluate BODY.
+  "Install packages in PKG-ALIST and evaluate BODY in a temporary directory.
+
+The packages are installed in
+\"`temporary-file-directory'/`user-login-name'/.emacs.d-debug/elpa_`emacs-major-version'/\".
+
 Each element of PKG-ALIST has the form (((ID . LOCATION) . (PKG1 PKG2 ..)) ..).
 The ID and LOCATION are the same as the ones in `package-archives'.
 PKG1, PKG2, .. are package names from the ID archive.
 
+If a package is available in one of the default archives from
+`package-archives', leave the ID as nil.
+
 Example usage:
 
 1. Launch 'emacs -Q'.
 2. Copy this macro definition to its scratch buffer and evaluate it.
 3. Evaluate a minimum working example using this macro as below:
-     (emacs-pkg-debug-setup '(;; Install hydra from GNU Elpa
+     (emacs-pkg-debug-setup \\='(;; Install Hydra from GNU Elpa.
                               (nil . (hydra))
-                              ;; Install org from Org Elpa
-                              ((\"org\" . \"http://orgmode.org/elpa/\") . (org)))
-       ;; Then evaluate the below forms
-       (org-mode)) "
+                              ;; Install ox-hugo from Melpa.
+                              ((\"melpa\" . \"https://melpa.org/packages/\") . (ox-hugo)))
+       ;; Then evaluate the below forms.
+       (org-version nil :full)) "
   (declare (indent 1) (debug t))
   `(progn
      (require 'package)

                                  dir))
     (setq package-user-dir (let ((elpa-dir-name (format "elpa_%s" emacs-major-version))) ;default = ~/.emacs.d/elpa/
                              (file-name-as-directory (expand-file-name elpa-dir-name user-emacs-directory))))
     (let (archive pkgs)
       (dolist (archive-alist ,pkg-alist)
	 (setq archive (car archive-alist))
	 (when archive
           (add-to-list 'package-archives archive :append))
         (setq pkgs (append pkgs (cdr archive-alist))))
       (package-initialize)
       (package-refresh-contents)


         (require pkg))

       ,@body)))
;; (emacs-pkg-debug-setup '((("melpa" . "https://melpa.org/packages/") . (use-package ox-hugo)))
;;   (message "Done!"))

;; http://stackoverflow.com/a/20747279/1219634
