Skip to content

Instantly share code, notes, and snippets.

@sachac
Created October 26, 2015 18:28
Show Gist options
  • Save sachac/de3abe013d34882d2b5f to your computer and use it in GitHub Desktop.
Save sachac/de3abe013d34882d2b5f to your computer and use it in GitHub Desktop.

Save package symbols:

(with-temp-file "~/.emacs.d/.package-list"
  (prin1 (mapcar 'car package-archive-contents) (current-buffer))
  nil)

Compare package symbols:

(with-temp-buffer
  (insert-file "~/.emacs.d/.package-list")
  (goto-char (point-min))
  (let ((old-list (read (current-buffer))))
    (mapcar (lambda (symbol)
              (let ((package-desc (assoc symbol package-archive-contents)))
                (format "[[package:%s][%s]]: %s" 
                        (symbol-name symbol)
                        (symbol-name symbol) 
                        (package-desc-summary (cadr package-desc)))))
            (-difference (mapcar 'car package-archive-contents) old-list))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment