Subject: bug#57503: 28.1.91; package-selected-packages should not be saved to custom-file

From: <[email-masked]>
Date: Tue, 06 Sep 2022 18:45:21 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> Robert Pluim <[email-masked]> writes:
>
>> How do we define 'fresher'?
>
> I left that as an exercise for the reader.  🫠  
>
>>  Anyway, if in doubt, use brute force:
>>
>> (define-multisession-variable package-selected-packages-ms
>>                               (package--find-non-dependencies))
>>
>> works fine. We could even condition it on `package-selected-packages'
>> being non-nil.
>
> Hm...  I wonder whether we could just drop the variable altogether.
> That is, checking for freshness sounds like as much work as
> recalculating the variable.
>
> What are the actual effects of the variable?  That is, what code is it
> supposed to speed up?

Isn't it used for distinguishing packages installed automatically as
dependencies from packages installed explicitly by the user? This
affects M-x package-autoremove.

And if my opinion counts, I like having the variable in my .emacs,
possibly under revision control. On a fresh machine, I can then simply
type M-x package-install-selected-packages to install all the packages
from the variable, and M-x package-autoremove to uninstall all packeges
not in listed the variable.