Display package installation info in *spacemacs*

This commit is contained in:
syl20bnr 2014-09-06 04:54:44 -04:00
parent c1b9dabd0c
commit 1f65627781

View file

@ -84,16 +84,23 @@ extension.
"Install the packages all the packages if there are not currently installed." "Install the packages all the packages if there are not currently installed."
(interactive) (interactive)
(let* ((pkg-list (ht-keys spacemacs-all-packages)) (let* ((pkg-list (ht-keys spacemacs-all-packages))
(not-installed (remove-if 'package-installed-p pkg-list))) (not-installed (remove-if 'package-installed-p pkg-list))
(not-installed-count (length not-installed)))
;; installation ;; installation
(if not-installed (if not-installed
(if (y-or-n-p (format (progn
"there are %d packages to be installed. install them? " (append-to-spacemacs-buf (format "Found %s new package(s) to install..."
(length not-installed))) not-installed-count))
(progn (package-refresh-contents) (package-refresh-contents)
(dolist (pkg pkg-list) (setq installed-count 0)
(dolist (pkg not-installed)
(when (not (package-installed-p pkg)) (when (not (package-installed-p pkg))
(package-install pkg)))))))) (package-install pkg))
(setq installed-count (1+ installed-count))
(replace-last-line-of-spacemacs-buf
(format "--> %s/%s packages installed"
installed-count not-installed-count))
(redisplay))))))
(defun contribsys/initialize-packages () (defun contribsys/initialize-packages ()
"Initialize all the declared packages." "Initialize all the declared packages."