From 2620a173aec17d3c1f630ae8f6ebded7a8c07e35 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 15 Jul 2014 21:45:42 +0100 Subject: Emacs: Make package-archive-stats more resilient Filters out packages missing from package-archive-contents --- tag-emacs/emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index e1352fc..317309b 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -69,7 +69,7 @@ (puthash (car arc) 0 archives)) (maphash (lambda (k v) (setq assoc (cons (cons k v) assoc))) - (dolist (pkg (package-list-installed) archives) + (dolist (pkg (-filter #'identity (package-list-installed)) archives) (let ((pkg-arc (package-desc-archive pkg))) (incf (gethash pkg-arc archives))))) assoc)) -- cgit 1.4.1