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

From: Robert Pluim <[email-masked]>
Date: Tue, 06 Sep 2022 16:30:15 +0200

>>>>> On Tue, 06 Sep 2022 15:49:29 +0200, Robert Pluim <[email-masked]> said:

>>>>> On Tue, 06 Sep 2022 12:34:00 +0200, Lars Ingebrigtsen <[email-masked]> said:
    Lars> Robert Pluim <[email-masked]> writes:
    >>> How do we define 'fresher'?

    Lars> 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.

    Lars> Hm...  I wonder whether we could just drop the variable altogether.
    Lars> That is, checking for freshness sounds like as much work as
    Lars> recalculating the variable.

    Robert> On further testing, using package--find-non-dependencies doesnʼt seem
    Robert> to work 100% correctly: installing a package in emacs-29 and then
    Robert> going back to emacs-28 has it showing up as 'dependency', not
    Robert> 'installed', in `list-packages'.

OK, this is because emacs-28 doesnʼt always update
`package-selected-packages' the way I expected it to. I think weʼve
come full circle, and would have to have emacs-29 continue to update
it, unless itʼs explicitly set to some distinct value (Someone™
upthread suggested 'external).

Robert
--