I'd like :package keyword to save the target packages into the variable package-selected-packages no matter whether they are already installed or not, and that is all.
When leaf processes the keyword :package, the handler leaf-handler-package will just call package-install only if the package is not yet installed; otherwise it does nothing. As a result, we will have an empty package-selected-package when we have already installed all the :ensured packages, which is painful, for example, when we wanna call package-autoremove. It is best if we write the target packages of :package into the variable package-selected-package when we don't call package-install. This can be easily and cleanly achieved with package.el's function package--update-selected-packages. I'll follow up with a PR.
Description
I'd like
:package
keyword to save the target packages into the variablepackage-selected-packages
no matter whether they are already installed or not, and that is all.When
leaf
processes the keyword:package
, the handlerleaf-handler-package
will just callpackage-install
only if the package is not yet installed; otherwise it does nothing. As a result, we will have an emptypackage-selected-package
when we have already installed all the:ensure
d packages, which is painful, for example, when we wanna callpackage-autoremove
. It is best if we write the target packages of:package
into the variablepackage-selected-package
when we don't callpackage-install
. This can be easily and cleanly achieved withpackage.el
's functionpackage--update-selected-packages
. I'll follow up with a PR.