I am using package
to manage my Emacs extensions. In order to synchronize my Emacs settings on different computers, I\'d like a way to specify a list of package
Emacs 25.1+ will automatically keep track of user-installed packages in the customizable package-selected-packages
variable. package-install
will update the customize variable, and you can install all selected packages with the package-install-selected-packages
function.
Another convenient advantage of this approach is that you can use package-autoremove
to automatically remove packages that are not included in package-selected-packages
(though it will preserve dependencies).
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(package-install-selected-packages)
Source: http://endlessparentheses.com/new-in-package-el-in-emacs-25-1-user-selected-packages.html