Received: (at 79957) by debbugs.gnu.org; 16 Feb 2026 17:17:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 16 12:17:49 2026 Received: from localhost ([127.0.0.1]:33419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vs2EH-0006E9-HD for submit <at> debbugs.gnu.org; Mon, 16 Feb 2026 12:17:49 -0500 Received: from mout01.posteo.de ([185.67.36.65]:40847) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1vs2EF-0006Dn-7X for 79957 <at> debbugs.gnu.org; Mon, 16 Feb 2026 12:17:47 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 32DBC240028 for <79957 <at> debbugs.gnu.org>; Mon, 16 Feb 2026 18:17:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1771262261; bh=1gmEiRRhZTfwv566HKRd5s/HZnztQwzurCwK9vFI1nc=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=HUXnMQDjurGpRYpGHQ7uy0IjfhXRZJbwaHFtM/3jlAIiPbR8JtqIAJ4ZQoUanRNHL V8RgJtuaxiREE4ZQXSLka90Ji9O5lRux504Ty1jCDtp5sOGhX8E+Qvox3N4AFRX32m SxIDE9qYg2agxQFSh0FFUny/ZWI5+1B5x2OYuR1ZbXvBcfAMfenWj1yMDJni5H1BWc WYhOf/IGoOLFaOBrxgGoaqZ9u2B2cY0HK4SJjHyTA9GqYnU5+p0xzQFtR6XkZ/d+Rt VeNYSh7a55pUr8aXJRA5c4BkENoPaxyy+iwHBywC6Qb+WE/tTk8X1bI5I9L4XP/ljH YZLas3NkP5Amg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4fF8bm4WKrz9rxF; Mon, 16 Feb 2026 18:17:40 +0100 (CET) From: Philip Kaludercic <philipk@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87bjhpty4r.fsf@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN> <87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN> <87seb5tuld.fsf@HIDDEN> <3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN> <87h5rjszje.fsf@HIDDEN> <87bjhqxsxe.fsf@HIDDEN> <87bjhpty4r.fsf@HIDDEN> OpenPGP: id=philipk@HIDDEN; url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN"; preference=signencrypt Date: Mon, 16 Feb 2026 17:17:40 +0000 Message-ID: <87y0kstxor.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) [...] >> Also, should we use a similar logic to `package-review-policy' to allow >> for the users to select which packages or archives they want to retain >> old versions for? > > I'm not familiar with this part of the code. > Concretely, does this mean the self-contained patch under discussion is > incomplete? What I was referring to was that the new package-review feature can be configured to apply to all packages, only specific packages/archives or the complement of such a selection. I think it would make sense to re-use that logic here as well. Essentially I am proposing to generalise `package--review-p' to a more general predicate. > Or is this a future refinement whereby the user can choose a subset of > packages? Because the reason for this particular change is to avoid > breaking a separate running Emacs that is not to be upgraded, and so > selecting packages by hand is by definition impractical for that use > case scenario. If we want to push the feature now as it is and then later on add this kind of a refinement then I think that is fine as well. >> (Sorry for the back and forth, if you don't want to discuss the ideas >> that is no problem, and I can take care of them at some point in the >> future.) > > I am happy to discuss the ideas, but also I find it helps for progress > to keep the changes separate where possible. > > This patch under discussion was a small patch, and we can also discus > the larger change which was the initial bug report as a wishlist item > once I have time to propose a first implementation. > > Is package-review-policy a third thread? No, I think that can remain part of this thread because how we interpret the user option relates directly to this patch.
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 16 Feb 2026 17:14:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 16 12:14:08 2026
Received: from localhost ([127.0.0.1]:33337 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vs2Ah-0005vg-BH
for submit <at> debbugs.gnu.org; Mon, 16 Feb 2026 12:14:08 -0500
Received: from mout01.posteo.de ([185.67.36.65]:41501)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <philipk@HIDDEN>)
id 1vs2Af-0005uR-1j
for 79957 <at> debbugs.gnu.org; Mon, 16 Feb 2026 12:14:06 -0500
Received: from submission (posteo.de [185.67.36.169])
by mout01.posteo.de (Postfix) with ESMTPS id C8429240028
for <79957 <at> debbugs.gnu.org>; Mon, 16 Feb 2026 18:13:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
t=1771262038; bh=QR1sN6o+8IAfZt2CLWEm2DEEuiEyYIg84/JlCqgYXFY=;
h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version:
Content-Type:From;
b=bHJhA6x5LhZr7bIRPd/09cHvfZTx6BGZyz5oY5jFUrUbKUjX87GpgTcV2bhC/fHv9
K5LXG1DxsWTL5YB+2uYuN4XBossHvR1BHt7R34rUvL/s9Ly3QZDrGA8Pmv6F74nu0i
1uzQL29eBVZMrIh9BeJ9OWoR9Lf/XS1txBb15onj0qS/jbTZASzWQ/9qCq+Bp2l/P3
cyKlERrIri0L9jL3WvAhv+4ZRBhbQs5sA8WOVuLpN+4jJvRW9vDT/YoMffj9rBwmUU
y9n7HbU1H4CQv8NVBbw5TFN5O9w/6fOOu823JTEfgQg5O4PhGj9sosMDSwafps6hEw
L4+JM/zKOJEow==
Received: from customer (localhost [127.0.0.1])
by submission (posteo.de) with ESMTPSA id 4fF8WV0XWkz9rxL;
Mon, 16 Feb 2026 18:13:57 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
To: Jeremy Bryant <jb@HIDDEN>
Subject: Re: bug#79957: 30.2; Don't delete old versions of packages -
Feature request - Incorporate package upgrades started from other Emacs
instances
In-Reply-To: <87bjhpty4r.fsf@HIDDEN>
References: <87jyyzrxo8.fsf@HIDDEN>
<jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
<87ms2xpl8u.fsf@HIDDEN>
<jwva4yxm288.fsf-monnier+emacs@HIDDEN>
<87343mr9a4.fsf@HIDDEN>
<jwvwm0xlq59.fsf-monnier+emacs@HIDDEN>
<87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN>
<87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN>
<87seb5tuld.fsf@HIDDEN>
<3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN>
<87h5rjszje.fsf@HIDDEN> <87bjhqxsxe.fsf@HIDDEN>
<87bjhpty4r.fsf@HIDDEN>
OpenPGP: id=philipk@HIDDEN;
url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN";
preference=signencrypt
Date: Mon, 16 Feb 2026 17:13:58 +0000
Message-ID: <873430vcfe.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79957
Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
Jeremy Bryant <jb@HIDDEN> writes:
> Philip Kaludercic <philipk@HIDDEN> writes:
>
>> Jeremy Bryant <jb@HIDDEN> writes:
>>
>>> Philip Kaludercic <philipk@HIDDEN> writes:
>>>
>>>> I would expect an option like the one you propose to affect both
>>>> "methods" of upgrading (of course, we should eventually merge the
>>>> two...). So I wouldn't have it in a separate patch.
>>>
>>> Revised patch with what I think is your suggestion - WDYT?
>>
>> That should do the job, but I think it would be generally better to use
>> the diff I sent you in the last message and just centralise the logic of
>> determining what packages to upgrade.
>
> OK - messages crossed, revised patch, incorporating your change verbatim.
> Is this what you meant?
>
> From 6a014c4a5fa1a698eb31ef872058ee9be410bd73 Mon Sep 17 00:00:00 2001
> From: Jeremy Bryant <jb@HIDDEN>
> Date: Sun, 8 Feb 2026 23:07:33 +0000
> Subject: [PATCH] ; Add facility to keep previous package versions on upgrade
> (bug#79957)
>
> This change adds a conditional to keep old package versions on upgrade.
> This allows users to keep running multiple Emacsen without a package
> upgrade in one Emacs breaking another running Emacs.
>
> * lisp/emacs-lisp/package.el
> (package-upgrade-keep-previous): New boolean user option.
> (package-upgrade): Use it.
> (package-menu--mark-upgrades-1): Use it.
> (package-menu--find-upgrades): Make consistent with new option.
>
> * etc/NEWS: Announce it.
> ---
> etc/NEWS | 5 +++++
> lisp/emacs-lisp/package.el | 41 +++++++++++++++++---------------------
> 2 files changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/etc/NEWS b/etc/NEWS
> index 8929fcc1215..39e2b5db128 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -636,6 +636,11 @@ will change its appearance if the tab buffer has been modified.
> This user option controls which buffers should appear in the tab line.
> By default, this is set to not filter the buffers.
>
> +*** New user option 'package-upgrade-keep-previous'.
> +This user option controls whether to keep previous packages versions
> +on upgrade. By default, this is set to nil, to keep the previous
> +behavior.
> +
> ** Project
>
> ---
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index 407c4496d81..dd60a254cd7 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -428,6 +428,11 @@ package-archive-column-width
> :type 'natnum
> :version "28.1")
>
> +(defcustom package-upgrade-keep-previous nil
> + "If non-nil, keep previous packages versions on upgrade."
> + :type 'boolean
> + :version "31.1")
> +
>
> ;;; `package-desc' object definition
> ;; This is the struct used internally to represent packages.
> @@ -2093,7 +2098,7 @@ package-upgrade
> ;; An active built-in has never been "selected"
> ;; before. Mark it as installed explicitly.
> (and pkg-desc 'dont-select))
> - (when pkg-desc
> + (when (and (not package-upgrade-keep-previous) pkg-desc)
> (package-delete pkg-desc 'force 'dont-unselect))))))
>
> (defun package--upgradeable-packages (&optional include-builtins)
> @@ -3855,27 +3860,16 @@ package-menu--find-upgrades
> The alist has the same form as `package-alist', namely a list
> of elements of the form (PKG . DESCS), but where DESCS is the `package-desc'
> object corresponding to the newer version."
> - (let (installed available upgrades)
> - ;; Build list of installed/available packages in this buffer.
> - (dolist (entry tabulated-list-entries)
> - ;; ENTRY is (PKG-DESC [NAME VERSION STATUS DOC])
> - (let ((pkg-desc (car entry))
> - (status (aref (cadr entry) 2)))
> - (cond ((member status '("installed" "dependency" "unsigned" "external" "built-in"))
> - (push pkg-desc installed))
> - ((member status '("available" "new"))
> - (setq available (package--append-to-alist pkg-desc available))))))
> - ;; Loop through list of installed packages, finding upgrades.
> - (dolist (pkg-desc installed)
> - (let* ((name (package-desc-name pkg-desc))
> - (avail-pkg (cadr (assq name available))))
> - (and avail-pkg
> - (version-list-< (package-desc-priority-version pkg-desc)
> - (package-desc-priority-version avail-pkg))
> - (or (not (package--active-built-in-p pkg-desc))
> - package-install-upgrade-built-in)
> - (push (cons name avail-pkg) upgrades))))
> - upgrades))
> + (mapcar
> + (lambda (pkg-name)
> + (cons pkg-name
> + (seq-find
> + (let ((curr (package-desc-version
> + (cadr (assq pkg-name package-alist)))))
> + (lambda (pkg-desc)
> + (version-list-< curr (package-desc-version pkg-desc))))
> + (cdr (assq pkg-name package-archive-contents)))))
> + (package--upgradeable-packages)))
>
> (defvar package-menu--mark-upgrades-pending nil
> "Whether mark-upgrades is waiting for a refresh to finish.")
> @@ -3898,7 +3892,8 @@ package-menu--mark-upgrades-1
> ((equal pkg-desc upgrade)
> (package-menu-mark-install))
> (t
> - (package-menu-mark-delete))))))
> + (when (not package-upgrade-keep-previous)
> + (package-menu-mark-delete)))))))
This is almost what I meant, we just don't need this check here anymore
now! But I can take care of that if we want to merge it as is. I'll
wait for Stefan to comment on it as well.
> (message "Packages marked for upgrading: %d"
> (length upgrades)))))
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 15 Feb 2026 22:56:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 15 17:56:09 2026
Received: from localhost ([127.0.0.1]:50873 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vrl29-0003ob-10
for submit <at> debbugs.gnu.org; Sun, 15 Feb 2026 17:56:09 -0500
Received: from out-172.mta0.migadu.com ([2001:41d0:1004:224b::ac]:23021)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <jb@HIDDEN>)
id 1vrl25-0003o2-NN
for 79957 <at> debbugs.gnu.org; Sun, 15 Feb 2026 17:56:07 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net;
s=key1; t=1771196158;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=uTTOiv13YGBvNdmYL1Hv+FtP2cvgwgW6cAWwLtlN0+k=;
b=Pqfj33XAJeRkdE9HUXxJRvzjX34vNHL3qV7tkeFaru+/ixKsjTl8L/LekbA3icQnfy3aVP
JBqyv/b4+t7SZD8iSDRz86Uh0bLCoNzXqidLTuUI9kYehcPqKgniOZBsncjEJbcdHhqoKb
m6FJ/XIIt3ybtED2gY1yP/OQdHR7alb/KQ9A3jgoxuPpC1DwVGCy5a0GEaR+qB3z7VnbeO
hx/ZOvJETEhRYlN6fg3DfXYqYNd5hl2tsWMVXAP735yue34ottsiq2N+Nc0ksKQiMwas/g
vMfZxbfjAFIU8sJtFlbg4p8jRAWhBjo9AD2JHEzljr5bDXITAv2L7pyOQ0CKag==
From: Jeremy Bryant <jb@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#79957: 30.2; Don't delete old versions of packages -
Feature request - Incorporate package upgrades started from other Emacs
instances
In-Reply-To: <87bjhqxsxe.fsf@HIDDEN> (Philip Kaludercic's message of "Sun,
15 Feb 2026 09:22:23 +0000")
References: <87jyyzrxo8.fsf@HIDDEN>
<jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
<87ms2xpl8u.fsf@HIDDEN>
<jwva4yxm288.fsf-monnier+emacs@HIDDEN>
<87343mr9a4.fsf@HIDDEN>
<jwvwm0xlq59.fsf-monnier+emacs@HIDDEN>
<87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN>
<87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN>
<87seb5tuld.fsf@HIDDEN>
<3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN>
<87h5rjszje.fsf@HIDDEN> <87bjhqxsxe.fsf@HIDDEN>
Date: Sun, 15 Feb 2026 22:55:48 +0000
Message-ID: <87bjhpty4r.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 79957
Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--=-=-=
Content-Type: text/plain
Philip Kaludercic <philipk@HIDDEN> writes:
> Jeremy Bryant <jb@HIDDEN> writes:
>
>> Philip Kaludercic <philipk@HIDDEN> writes:
>>
>>> I would expect an option like the one you propose to affect both
>>> "methods" of upgrading (of course, we should eventually merge the
>>> two...). So I wouldn't have it in a separate patch.
>>
>> Revised patch with what I think is your suggestion - WDYT?
>
> That should do the job, but I think it would be generally better to use
> the diff I sent you in the last message and just centralise the logic of
> determining what packages to upgrade.
OK - messages crossed, revised patch, incorporating your change verbatim.
Is this what you meant?
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=0001-Add-facility-to-keep-previous-package-versions-on-up.patch
From 6a014c4a5fa1a698eb31ef872058ee9be410bd73 Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <jb@HIDDEN>
Date: Sun, 8 Feb 2026 23:07:33 +0000
Subject: [PATCH] ; Add facility to keep previous package versions on upgrade
(bug#79957)
This change adds a conditional to keep old package versions on upgrade.
This allows users to keep running multiple Emacsen without a package
upgrade in one Emacs breaking another running Emacs.
* lisp/emacs-lisp/package.el
(package-upgrade-keep-previous): New boolean user option.
(package-upgrade): Use it.
(package-menu--mark-upgrades-1): Use it.
(package-menu--find-upgrades): Make consistent with new option.
* etc/NEWS: Announce it.
---
etc/NEWS | 5 +++++
lisp/emacs-lisp/package.el | 41 +++++++++++++++++---------------------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 8929fcc1215..39e2b5db128 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -636,6 +636,11 @@ will change its appearance if the tab buffer has been modified.
This user option controls which buffers should appear in the tab line.
By default, this is set to not filter the buffers.
+*** New user option 'package-upgrade-keep-previous'.
+This user option controls whether to keep previous packages versions
+on upgrade. By default, this is set to nil, to keep the previous
+behavior.
+
** Project
---
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 407c4496d81..dd60a254cd7 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -428,6 +428,11 @@ package-archive-column-width
:type 'natnum
:version "28.1")
+(defcustom package-upgrade-keep-previous nil
+ "If non-nil, keep previous packages versions on upgrade."
+ :type 'boolean
+ :version "31.1")
+
;;; `package-desc' object definition
;; This is the struct used internally to represent packages.
@@ -2093,7 +2098,7 @@ package-upgrade
;; An active built-in has never been "selected"
;; before. Mark it as installed explicitly.
(and pkg-desc 'dont-select))
- (when pkg-desc
+ (when (and (not package-upgrade-keep-previous) pkg-desc)
(package-delete pkg-desc 'force 'dont-unselect))))))
(defun package--upgradeable-packages (&optional include-builtins)
@@ -3855,27 +3860,16 @@ package-menu--find-upgrades
The alist has the same form as `package-alist', namely a list
of elements of the form (PKG . DESCS), but where DESCS is the `package-desc'
object corresponding to the newer version."
- (let (installed available upgrades)
- ;; Build list of installed/available packages in this buffer.
- (dolist (entry tabulated-list-entries)
- ;; ENTRY is (PKG-DESC [NAME VERSION STATUS DOC])
- (let ((pkg-desc (car entry))
- (status (aref (cadr entry) 2)))
- (cond ((member status '("installed" "dependency" "unsigned" "external" "built-in"))
- (push pkg-desc installed))
- ((member status '("available" "new"))
- (setq available (package--append-to-alist pkg-desc available))))))
- ;; Loop through list of installed packages, finding upgrades.
- (dolist (pkg-desc installed)
- (let* ((name (package-desc-name pkg-desc))
- (avail-pkg (cadr (assq name available))))
- (and avail-pkg
- (version-list-< (package-desc-priority-version pkg-desc)
- (package-desc-priority-version avail-pkg))
- (or (not (package--active-built-in-p pkg-desc))
- package-install-upgrade-built-in)
- (push (cons name avail-pkg) upgrades))))
- upgrades))
+ (mapcar
+ (lambda (pkg-name)
+ (cons pkg-name
+ (seq-find
+ (let ((curr (package-desc-version
+ (cadr (assq pkg-name package-alist)))))
+ (lambda (pkg-desc)
+ (version-list-< curr (package-desc-version pkg-desc))))
+ (cdr (assq pkg-name package-archive-contents)))))
+ (package--upgradeable-packages)))
(defvar package-menu--mark-upgrades-pending nil
"Whether mark-upgrades is waiting for a refresh to finish.")
@@ -3898,7 +3892,8 @@ package-menu--mark-upgrades-1
((equal pkg-desc upgrade)
(package-menu-mark-install))
(t
- (package-menu-mark-delete))))))
+ (when (not package-upgrade-keep-previous)
+ (package-menu-mark-delete)))))))
(message "Packages marked for upgrading: %d"
(length upgrades)))))
--
2.47.3
--=-=-=
Content-Type: text/plain
> Also, should we use a similar logic to `package-review-policy' to allow
> for the users to select which packages or archives they want to retain
> old versions for?
I'm not familiar with this part of the code.
Concretely, does this mean the self-contained patch under discussion is
incomplete?
Or is this a future refinement whereby the user can choose a subset of
packages? Because the reason for this particular change is to avoid
breaking a separate running Emacs that is not to be upgraded, and so
selecting packages by hand is by definition impractical for that use
case scenario.
> (Sorry for the back and forth, if you don't want to discuss the ideas
> that is no problem, and I can take care of them at some point in the
> future.)
I am happy to discuss the ideas, but also I find it helps for progress
to keep the changes separate where possible.
This patch under discussion was a small patch, and we can also discus
the larger change which was the initial bug report as a wishlist item
once I have time to propose a first implementation.
Is package-review-policy a third thread?
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 15 Feb 2026 09:22:32 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 15 04:22:32 2026 Received: from localhost ([127.0.0.1]:40587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vrYKm-0002Nr-3I for submit <at> debbugs.gnu.org; Sun, 15 Feb 2026 04:22:32 -0500 Received: from mout02.posteo.de ([185.67.36.66]:55673) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1vrYKj-0002NX-Qp for 79957 <at> debbugs.gnu.org; Sun, 15 Feb 2026 04:22:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 938F7240101 for <79957 <at> debbugs.gnu.org>; Sun, 15 Feb 2026 10:22:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1771147343; bh=g6aTrSN3SPY8HkpP7ADq6lcYmVHWj1BO7fjdHBtx9k8=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=P3DHQO8G+ptZwE9/V2mUt92kp+/EVrLkRQKog1MnAIFm9by3dWXqlXSB4CrOoynC1 NLwoXNuz8mORMFvy6FMkppeRvAW3PP5pZRa8/SbHwuXmiA9y8KeA4M96wESL26ni19 GI6jXmwuURwtbzhG/M9ozwV0AgCMqMmWU1B/PFcD6QYywV0JAU/mSDwxUuosSQWNp+ XAwdqCHugNHW339b8F2oHmPrVT1Jkz3Wk799L+L66KjaT7z6/zsaFm1hb5arRuhdZv FFNKIWG0Cospe3GMAT3OOGNzg6aRW/7rOZFREXAIR4edzRP7H/3V4Tt4vWqPRBQ0ld G8rueS0uJlXiA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4fDL5p3lsjz6twg; Sun, 15 Feb 2026 10:22:22 +0100 (CET) From: Philip Kaludercic <philipk@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87h5rjszje.fsf@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN> <87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN> <87seb5tuld.fsf@HIDDEN> <3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN> <87h5rjszje.fsf@HIDDEN> OpenPGP: id=philipk@HIDDEN; url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN"; preference=signencrypt Date: Sun, 15 Feb 2026 09:22:23 +0000 Message-ID: <87bjhqxsxe.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Jeremy Bryant <jb@HIDDEN> writes: > Philip Kaludercic <philipk@HIDDEN> writes: > >> I would expect an option like the one you propose to affect both >> "methods" of upgrading (of course, we should eventually merge the >> two...). So I wouldn't have it in a separate patch. > > Revised patch with what I think is your suggestion - WDYT? That should do the job, but I think it would be generally better to use the diff I sent you in the last message and just centralise the logic of determining what packages to upgrade. Also, should we use a similar logic to `package-review-policy' to allow for the users to select which packages or archives they want to retain old versions for? (Sorry for the back and forth, if you don't want to discuss the ideas that is no problem, and I can take care of them at some point in the future.) > PS: > If this is merged, we should keep this bug open because of the other > feature request initially proposed. OK!
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 14 Feb 2026 22:58:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 14 17:58:46 2026
Received: from localhost ([127.0.0.1]:57771 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vrOb8-0005CQ-86
for submit <at> debbugs.gnu.org; Sat, 14 Feb 2026 17:58:46 -0500
Received: from out-176.mta1.migadu.com ([95.215.58.176]:22587)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <jb@HIDDEN>)
id 1vrOb4-0005Bi-6w
for 79957 <at> debbugs.gnu.org; Sat, 14 Feb 2026 17:58:43 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net;
s=key1; t=1771109913;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=uFJr2JhoxWYSFYsIwNJ1McV8xhppBwTLMxH9QwurTq4=;
b=KJiOgEc+wM6akK5tGOLCQqPEdoVDJDP62eiOydxi/uWv1IsD0JmxqgqnpTBofm6tC02b0r
RR98S1GV1lcjJeg0geGDtjWW77j+DoeSSRn+aLe/Lucr8Ex9Vl7GSLge8ty9VC7rMhcT5w
M3HRc6tdoLhLs2AYi5cnIRa7swob4sq+Moi3ORJwWJF8G+pwkhtF08oV0DQM3QWA2sGc+z
yI0OjDyQzff7DsbkTl7WFNMVZnDGkrswUXh7auVDWvL2Vp7OIta8lKUzh4LpkOShnPdvx1
3Jemp6ljwkL00XMBF2fJUiy1j/yBiVlxdNLd8ssiqWekb8I2bPBzgR1As/DoEQ==
From: Jeremy Bryant <jb@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#79957: 30.2; Don't delete old versions of packages -
Feature request - Incorporate package upgrades started from other Emacs
instances
In-Reply-To: <3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN> (Philip
Kaludercic's message of "Fri, 13 Feb 2026 07:28:23 +0000")
References: <87jyyzrxo8.fsf@HIDDEN>
<jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
<87ms2xpl8u.fsf@HIDDEN>
<jwva4yxm288.fsf-monnier+emacs@HIDDEN>
<87343mr9a4.fsf@HIDDEN>
<jwvwm0xlq59.fsf-monnier+emacs@HIDDEN>
<87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN>
<87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN>
<87seb5tuld.fsf@HIDDEN>
<3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN>
Date: Sat, 14 Feb 2026 22:58:29 +0000
Message-ID: <87h5rjszje.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 79957
Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
--=-=-=
Content-Type: text/plain
Philip Kaludercic <philipk@HIDDEN> writes:
> I would expect an option like the one you propose to affect both "methods" of upgrading (of course, we should eventually merge the two...). So I wouldn't have it in a separate patch.
Revised patch with what I think is your suggestion - WDYT?
PS:
If this is merged, we should keep this bug open because of the other
feature request initially proposed.
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=0001-Add-facility-to-keep-previous-package-versions-on-up.patch
From 7c8028c88538875c44afe6692de05cdcea72bff4 Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <jb@HIDDEN>
Date: Sun, 8 Feb 2026 23:07:33 +0000
Subject: [PATCH] ; Add facility to keep previous package versions on upgrade
(bug#79957)
This change adds a conditional to keep old package versions on upgrade.
This allows users to keep running multiple Emacsen without a package
upgrade in one Emacs breaking another running Emacs.
* lisp/emacs-lisp/package.el
(package-upgrade-keep-previous): New boolean user option.
(package-upgrade): Use it.
(package-menu--mark-upgrades-1): Use it.
* etc/NEWS: Announce it.
---
etc/NEWS | 5 +++++
lisp/emacs-lisp/package.el | 10 ++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 8929fcc1215..39e2b5db128 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -636,6 +636,11 @@ will change its appearance if the tab buffer has been modified.
This user option controls which buffers should appear in the tab line.
By default, this is set to not filter the buffers.
+*** New user option 'package-upgrade-keep-previous'.
+This user option controls whether to keep previous packages versions
+on upgrade. By default, this is set to nil, to keep the previous
+behavior.
+
** Project
---
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 407c4496d81..4594f7032e9 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -428,6 +428,11 @@ package-archive-column-width
:type 'natnum
:version "28.1")
+(defcustom package-upgrade-keep-previous nil
+ "If non-nil, keep previous packages versions on upgrade."
+ :type 'boolean
+ :version "31.1")
+
;;; `package-desc' object definition
;; This is the struct used internally to represent packages.
@@ -2093,7 +2098,7 @@ package-upgrade
;; An active built-in has never been "selected"
;; before. Mark it as installed explicitly.
(and pkg-desc 'dont-select))
- (when pkg-desc
+ (when (and (not package-upgrade-keep-previous) pkg-desc)
(package-delete pkg-desc 'force 'dont-unselect))))))
(defun package--upgradeable-packages (&optional include-builtins)
@@ -3898,7 +3903,8 @@ package-menu--mark-upgrades-1
((equal pkg-desc upgrade)
(package-menu-mark-install))
(t
- (package-menu-mark-delete))))))
+ (when (not package-upgrade-keep-previous)
+ (package-menu-mark-delete)))))))
(message "Packages marked for upgrading: %d"
(length upgrades)))))
--
2.47.3
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 13 Feb 2026 21:35:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 13 16:35:36 2026
Received: from localhost ([127.0.0.1]:55243 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vr0p5-0002Kf-IY
for submit <at> debbugs.gnu.org; Fri, 13 Feb 2026 16:35:35 -0500
Received: from mout01.posteo.de ([185.67.36.65]:57367)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <philipk@HIDDEN>)
id 1vr0p2-0002K9-Cg
for 79957 <at> debbugs.gnu.org; Fri, 13 Feb 2026 16:35:34 -0500
Received: from submission (posteo.de [185.67.36.169])
by mout01.posteo.de (Postfix) with ESMTPS id 12D71240027
for <79957 <at> debbugs.gnu.org>; Fri, 13 Feb 2026 22:35:25 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
t=1771018526; bh=x939+aSYcBPUjFud+WOdPUKdvR38Yapvp8cj4nfJPYM=;
h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version:
Content-Type:From;
b=HaDkDFsPDD0E1WzizSIRX0ZOTOg+i1IV4eHxvVcBDSmVN2d3CuzEbrmoaJtIFtGfF
uUNISzHjS62Hs0UyPviRMsWOGCnaM/5vdD4mwH9CTtCknvb5FmVlBgzDKJuoOopjB9
eS4Tetz1FpdSKsnhNTelUvGPiId2zlf/Z7axbZdG5BTmK4a/Yu7jswITnGtGL8cKnH
BKHGq3NsN4HCJd9KOTqFzDU2wgmTThOm04b0b8i4FNIVFqMzHu/ku+pNK2WqSP0avE
tGI9C2hpJbXv8frUPScfQh15T8zPnQdag+10A20M6Xqy5LBuzno59FLGyhk3YNyOJ6
TTROzPLI2siGQ==
Received: from customer (localhost [127.0.0.1])
by submission (posteo.de) with ESMTPSA id 4fCQSY0Jv2z9rxF;
Fri, 13 Feb 2026 22:35:24 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
To: Jeremy Bryant <jb@HIDDEN>
Subject: Re: bug#79957: 30.2; Don't delete old versions of packages -
Feature request - Incorporate package upgrades started from other Emacs
instances
In-Reply-To: <3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN>
References: <87jyyzrxo8.fsf@HIDDEN>
<jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
<87ms2xpl8u.fsf@HIDDEN>
<jwva4yxm288.fsf-monnier+emacs@HIDDEN>
<87343mr9a4.fsf@HIDDEN>
<jwvwm0xlq59.fsf-monnier+emacs@HIDDEN>
<87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN>
<87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN>
<87seb5tuld.fsf@HIDDEN>
<3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN>
OpenPGP: id=philipk@HIDDEN;
url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN";
preference=signencrypt
Date: Fri, 13 Feb 2026 21:35:25 +0000
Message-ID: <87qzqomin8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79957
Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
--=-=-=
Content-Type: text/plain
Philip Kaludercic <philipk@HIDDEN> writes:
> I would expect an option like the one you propose to affect both
> "methods" of upgrading (of course, we should eventually merge the
> two...). So I wouldn't have it in a separate patch.
Re: "merge the two", this might be enough to implement that:
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index bbc1e8242ac..02ac4e20669 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3855,27 +3854,16 @@ package-menu--find-upgrades
The alist has the same form as `package-alist', namely a list
of elements of the form (PKG . DESCS), but where DESCS is the `package-desc'
object corresponding to the newer version."
- (let (installed available upgrades)
- ;; Build list of installed/available packages in this buffer.
- (dolist (entry tabulated-list-entries)
- ;; ENTRY is (PKG-DESC [NAME VERSION STATUS DOC])
- (let ((pkg-desc (car entry))
- (status (aref (cadr entry) 2)))
- (cond ((member status '("installed" "dependency" "unsigned" "external" "built-in"))
- (push pkg-desc installed))
- ((member status '("available" "new"))
- (setq available (package--append-to-alist pkg-desc available))))))
- ;; Loop through list of installed packages, finding upgrades.
- (dolist (pkg-desc installed)
- (let* ((name (package-desc-name pkg-desc))
- (avail-pkg (cadr (assq name available))))
- (and avail-pkg
- (version-list-< (package-desc-priority-version pkg-desc)
- (package-desc-priority-version avail-pkg))
- (or (not (package--active-built-in-p pkg-desc))
- package-install-upgrade-built-in)
- (push (cons name avail-pkg) upgrades))))
- upgrades))
+ (mapcar
+ (lambda (pkg-name)
+ (cons pkg-name
+ (seq-find
+ (let ((curr (package-desc-version
+ (cadr (assq pkg-name package-alist)))))
+ (lambda (pkg-desc)
+ (version-list-< curr (package-desc-version pkg-desc))))
+ (cdr (assq pkg-name package-archive-contents)))))
+ (package--upgradeable-packages)))
(defvar package-menu--mark-upgrades-pending nil
"Whether mark-upgrades is waiting for a refresh to finish.")
--=-=-=
Content-Type: text/plain
> On 13 February 2026 00:23:10 CET, Jeremy Bryant <jb@HIDDEN> wrote:
>>Philip Kaludercic <philipk@HIDDEN> writes:
>>
>>> We also have to make sure that this option affects the package menu in
>>> the expected way, so e.g. `package-menu--mark-upgrades-1' doesn't mark
>>> the old package for deletion and doesn't regard packages with a newer
>>> version installed as obsolete, recommending their deletion.
>>
>>OK, conceptually, can it be a separate patch related to the menu system,
>>or must this change be part of the first patch (which relates to
>>package-upgrade on its own)? Please clarify.
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 13 Feb 2026 07:28:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 13 02:28:33 2026 Received: from localhost ([127.0.0.1]:38081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vqnbM-0006qQ-Nu for submit <at> debbugs.gnu.org; Fri, 13 Feb 2026 02:28:33 -0500 Received: from mout02.posteo.de ([185.67.36.66]:43425) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1vqnbK-0006q2-Cr for 79957 <at> debbugs.gnu.org; Fri, 13 Feb 2026 02:28:31 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 022B5240101 for <79957 <at> debbugs.gnu.org>; Fri, 13 Feb 2026 08:28:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1770967704; bh=dp6ue2O8qjOdT9eNOTcqvGSTMsT/8/kB73bxTWeLeQQ=; h=Date:From:To:CC:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=CKfXWc9vc3p+Q5aXbGIiHZL4vssn6c2qmQxSRcXGZdPtlT+1oi8SFvni0nNfb4KcA T/RyPSch//RFrSTl28gsYDYqFFyEEURcfLFuRTdi7R7GVwlHKyjncJRgX/vU43f9SI Eod0cAjzLSW0uKvEg1vLNOfM7n8tTPbF4bPTTcFy5/vO0IaYqSS4EJCLAPrnTf4g2o 1GTjFOtKsuw7oFk0Se3wUVunRqlKKzRmIy9UlU2098EcG+JN3UPBVVmgDxZbwSbjTR +UHGIOqYWswXcZYjlLZaZASyi5YzMGaJ0NF3br/+w+2NbSmaF23U9R5n+BQ+LQcY7r axHf7nEB8G9pg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4fC3gB6yy3z9rxN; Fri, 13 Feb 2026 08:28:22 +0100 (CET) Date: Fri, 13 Feb 2026 07:28:23 +0000 From: Philip Kaludercic <philipk@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: =?US-ASCII?Q?Re=3A_bug=2379957=3A_30=2E2=3B_Don=27t_delete_o?= =?US-ASCII?Q?ld_versions_of_packages_-_Feature_re?= =?US-ASCII?Q?quest_-_Incorporate_package_upgrade?= =?US-ASCII?Q?s_started_from_other_Emacs_instances?= In-Reply-To: <87seb5tuld.fsf@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN> <87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN> <87seb5tuld.fsf@HIDDEN> Message-ID: <3E1DE2DA-E5BC-4F5C-858A-2075132EB785@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) I would expect an option like the one you propose to affect both "methods" = of upgrading (of course, we should eventually merge the two=2E=2E=2E)=2E S= o I wouldn't have it in a separate patch=2E On 13 February 2026 00:23:10 CET, Jeremy Bryant <jb@jeremybryant=2Enet> wr= ote: >Philip Kaludercic <philipk@posteo=2Enet> writes: > >> We also have to make sure that this option affects the package menu in >> the expected way, so e=2Eg=2E `package-menu--mark-upgrades-1' doesn't m= ark >> the old package for deletion and doesn't regard packages with a newer >> version installed as obsolete, recommending their deletion=2E > >OK, conceptually, can it be a separate patch related to the menu system, >or must this change be part of the first patch (which relates to >package-upgrade on its own)? Please clarify=2E
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 12 Feb 2026 23:23:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 12 18:23:34 2026 Received: from localhost ([127.0.0.1]:57785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vqg22-0001P7-6l for submit <at> debbugs.gnu.org; Thu, 12 Feb 2026 18:23:34 -0500 Received: from out-186.mta1.migadu.com ([2001:41d0:203:375::ba]:11219) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <jb@HIDDEN>) id 1vqg1z-0001Oe-Aw for 79957 <at> debbugs.gnu.org; Thu, 12 Feb 2026 18:23:32 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1770938604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eqnL8U4+g2bJsPEuxLM4o2rFPYmbVKfhdo5cCSlpeoQ=; b=LlHYc6CiLXCviSzJOzhhw70tM9v82UUMMTPmmNuGvfC6bguy+Ahnk1gmHcanb+tv1x/0QH B+WHQr6yzQRl/9ZxWvasgX3jrDnjp1Gg/lumF4JD3QorEiYgAfeYnWua6cQKEeayNzOeiW TAAdOTEH/+Kwhgogx06IwEXko0iuY4Yui1yejRCzAPgPeRtPtXMf7YdSXv2NcjOquQ5Q8Y pdCB7Z5vWUnVWEvi8dGTiYzHcK4Gd5PBs1NR1K9AFl76RBhZrpqxeXC5HzjS0+6xabEqWm d2JfvzixpOemmLi8aYmO1pm0wmjTT8q/Rx8heB6sCzAej+URSYUn9A/QFtdfdw== From: Jeremy Bryant <jb@HIDDEN> To: Philip Kaludercic <philipk@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87o6lxyxg5.fsf@HIDDEN> (Philip Kaludercic's message of "Tue, 10 Feb 2026 05:33:31 +0000") References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN> <87y0l1tu0e.fsf@HIDDEN> <87o6lxyxg5.fsf@HIDDEN> Date: Thu, 12 Feb 2026 23:23:10 +0000 Message-ID: <87seb5tuld.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 79957 Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Philip Kaludercic <philipk@HIDDEN> writes: > We also have to make sure that this option affects the package menu in > the expected way, so e.g. `package-menu--mark-upgrades-1' doesn't mark > the old package for deletion and doesn't regard packages with a newer > version installed as obsolete, recommending their deletion. OK, conceptually, can it be a separate patch related to the menu system, or must this change be part of the first patch (which relates to package-upgrade on its own)? Please clarify.
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 10 Feb 2026 05:33:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 10 00:33:41 2026 Received: from localhost ([127.0.0.1]:51006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vpgNZ-00010S-BK for submit <at> debbugs.gnu.org; Tue, 10 Feb 2026 00:33:41 -0500 Received: from mout02.posteo.de ([185.67.36.66]:44223) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1vpgNW-0000zv-BL for 79957 <at> debbugs.gnu.org; Tue, 10 Feb 2026 00:33:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AC098240101 for <79957 <at> debbugs.gnu.org>; Tue, 10 Feb 2026 06:33:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1770701611; bh=4y91jQpjcLZs2Ug3+e1yKmB9VORIbCdkCeYf7e5Y6T4=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=JYoWLqS7ghuI8CNfCnTd18cuPLmnhwEVxVYzrZuGMRCKV7I9mTLVylFl8cr3wO0JQ Rthw/dhO7jcdv4GNPVb2zDfbXw9pnuwY3JQahqTfK0I0aKx08o0f20gVS9DxjN70Wq pqikZVyJD4VxJuORUTaYw4qIHBdxOL8melNgFgRf5Du597DMaEa6n0hxWoiHN3ZpPK 2SDj3B9VUH8ZKHjRCWXJro4VxeEiQ23D8QEYdoEdhm4Mv6VWntCJJl08RuKDFLuaxg M0eyNgHTMOmkVfAFObkwiDSJa1AlhBc/lh2kJhP2vasSIW9WIEPfaECSoW8AkCrQ8S rFEN0tW9pt3Qg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4f99G25y6qz6twr; Tue, 10 Feb 2026 06:33:30 +0100 (CET) From: Philip Kaludercic <philipk@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87y0l1tu0e.fsf@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN> <87y0l1tu0e.fsf@HIDDEN> OpenPGP: id=philipk@HIDDEN; url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN"; preference=signencrypt Date: Tue, 10 Feb 2026 05:33:31 +0000 Message-ID: <87o6lxyxg5.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Jeremy Bryant <jb@HIDDEN> writes: > Philip Kaludercic <philipk@HIDDEN> writes: > >> Jeremy Bryant <jb@HIDDEN> writes: >>> - (when pkg-desc >>> - (package-delete pkg-desc 'force 'dont-unselect)))))) >>> + (when package-upgrade-delete-previous >>> + (when pkg-desc >> >> So (and package-upgrade-delete-previous pkg-desc)... Doesn't really >> matter, but keeps the diff smaller :) >> > > Revised patch. > > This implements the smaller diff as above, as well as the previous > suggestion from Stefan to reverse the meanings. I've also renamed the > new defcustom to clarify. > > WDYT? > > From 5cb7f9713de685ccb450bd3dab0f2a78b8f800df Mon Sep 17 00:00:00 2001 > From: Jeremy Bryant <jb@HIDDEN> > Date: Sun, 8 Feb 2026 23:07:33 +0000 > Subject: [PATCH] ; Add facility to keep previous package versions on upgrade > (bug#79957) > > This change adds a conditional to keep old package versions on upgrade. > This allows users to keep running multiple Emacsen without a package > upgrade in one Emacs breaking another running Emacs. > > * lisp/emacs-lisp/package.el > (package-upgrade-keep-previous): New boolean user option. > (package-upgrade): Use it. > > * etc/NEWS: Announce it. > --- > etc/NEWS | 5 +++++ > lisp/emacs-lisp/package.el | 7 ++++++- > 2 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/etc/NEWS b/etc/NEWS > index 8929fcc1215..39e2b5db128 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -636,6 +636,11 @@ will change its appearance if the tab buffer has been modified. > This user option controls which buffers should appear in the tab line. > By default, this is set to not filter the buffers. > > +*** New user option 'package-upgrade-keep-previous'. > +This user option controls whether to keep previous packages versions > +on upgrade. By default, this is set to nil, to keep the previous > +behavior. > + > ** Project > > --- > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 407c4496d81..5b6d56e48b0 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -428,6 +428,11 @@ package-archive-column-width > :type 'natnum > :version "28.1") > > +(defcustom package-upgrade-keep-previous nil > + "If non-nil, keep previous packages versions on upgrade." > + :type 'boolean > + :version "31.1") > + > > ;;; `package-desc' object definition > ;; This is the struct used internally to represent packages. > @@ -2093,7 +2098,7 @@ package-upgrade > ;; An active built-in has never been "selected" > ;; before. Mark it as installed explicitly. > (and pkg-desc 'dont-select)) > - (when pkg-desc > + (when (and (not package-upgrade-keep-previous) pkg-desc) > (package-delete pkg-desc 'force 'dont-unselect)))))) > > (defun package--upgradeable-packages (&optional include-builtins) We also have to make sure that this option affects the package menu in the expected way, so e.g. `package-menu--mark-upgrades-1' doesn't mark the old package for deletion and doesn't regard packages with a newer version installed as obsolete, recommending their deletion.
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 10 Feb 2026 02:54:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 09 21:54:48 2026 Received: from localhost ([127.0.0.1]:49170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vpdto-000505-A2 for submit <at> debbugs.gnu.org; Mon, 09 Feb 2026 21:54:48 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52143) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1vpdtl-0004ze-9b for 79957 <at> debbugs.gnu.org; Mon, 09 Feb 2026 21:54:46 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0852D1000BC; Mon, 9 Feb 2026 21:54:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1770692077; bh=YJxOHqvouq+aT/zSJDU9s5Pp0yvYCMzvh+wjE2kUSnc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mlrVi50E+4xwDT/92PbMEa8jNQ8rPhyg9j6ZXYe8VHpVgCwU5LNB5gtbH5TpGj5PF s/gilnIbznk8kB3aq4Zv2y0vLRANaaTvHQX8OUynPt0uhuji+QVS3ICwLzNseXlqsU fbyS8qMzuq0ZxOBliQT6bbwt/c8pJ2WKNo1hABbj7k1PPNeu0lmmTxW0PUI0y3dX9i Frd52x0Nx42vNcI1vYCOhVCsALjxnd7Ikt5YW5evVBvFak8aBKfxEyVqPpN7Bz1COM WdgpqK2dvK67tiPP0pwYspRAtSZtu6tA6g1BaKIi7WW8y4ztcPrsWaBk8XAKn0Azt2 y+e8WNTjWAy1g== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DDC8F10002D; Mon, 9 Feb 2026 21:54:37 -0500 (EST) Received: from pastel (104-195-243-38.cpe.teksavvy.com [104.195.243.38]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A81FC1209B4; Mon, 9 Feb 2026 21:54:37 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87y0l1tu0e.fsf@HIDDEN> Message-ID: <jwv3439z4tk.fsf-monnier+emacs@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN> <87y0l1tu0e.fsf@HIDDEN> Date: Mon, 09 Feb 2026 21:54:29 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.186 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Revised patch. No objection on my side. === Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 9 Feb 2026 22:46:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 09 17:46:59 2026
Received: from localhost ([127.0.0.1]:47405 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vpa1w-0004bF-Re
for submit <at> debbugs.gnu.org; Mon, 09 Feb 2026 17:46:59 -0500
Received: from out-185.mta0.migadu.com ([91.218.175.185]:38507)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <jb@HIDDEN>)
id 1vpa1r-0004ZI-Ap
for 79957 <at> debbugs.gnu.org; Mon, 09 Feb 2026 17:46:54 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net;
s=key1; t=1770677204;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=WJOBiZrwyCI7ZIG3nM1kSpJhPvdFpjIO7CpeG8F7oGk=;
b=fPog7bvq7ZN+H46l12Dz1WPTy/Eqa8rThvzjl+lUN6W90Dw8k32du7Yrz7CD2BRWV3SaPJ
4I92uPOIOII6XCo0GK5IZ5+w8YMSfqbYoGfDR7Xh5xYl6YWm6Ff3akHLFOu7wj8qDAREgS
WeC7jWzE2psjM6m5CW2LB9otaj1wjF1UO4lCj0+iatXbe5ubMUT4rtFvdmi3DkyUVxbsAk
/PajGHcHH6OdZFNJs+JgdlKYHsemBwIehjtS4siKiI135udNmcw3U1jOEYwh4ZhCuMeK0H
Mknl+0w08x2w4pazHcUZefSQFY/6N03jnIgdNXhKTW3fC+fq2baSaxgC85oQJg==
From: Jeremy Bryant <jb@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#79957: 30.2; Don't delete old versions of packages -
Feature request - Incorporate package upgrades started from other Emacs
instances
In-Reply-To: <87ms1hr7vv.fsf@HIDDEN> (Philip Kaludercic's message of "Mon,
09 Feb 2026 20:15:18 +0000")
References: <87jyyzrxo8.fsf@HIDDEN>
<jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
<87ms2xpl8u.fsf@HIDDEN>
<jwva4yxm288.fsf-monnier+emacs@HIDDEN>
<87343mr9a4.fsf@HIDDEN>
<jwvwm0xlq59.fsf-monnier+emacs@HIDDEN>
<87a4xivn5i.fsf@HIDDEN> <87ms1hr7vv.fsf@HIDDEN>
Date: Mon, 09 Feb 2026 22:46:41 +0000
Message-ID: <87y0l1tu0e.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 79957
Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
--=-=-=
Content-Type: text/plain
Philip Kaludercic <philipk@HIDDEN> writes:
> Jeremy Bryant <jb@HIDDEN> writes:
>> - (when pkg-desc
>> - (package-delete pkg-desc 'force 'dont-unselect))))))
>> + (when package-upgrade-delete-previous
>> + (when pkg-desc
>
> So (and package-upgrade-delete-previous pkg-desc)... Doesn't really
> matter, but keeps the diff smaller :)
>
Revised patch.
This implements the smaller diff as above, as well as the previous
suggestion from Stefan to reverse the meanings. I've also renamed the
new defcustom to clarify.
WDYT?
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=0001-Add-facility-to-keep-previous-package-versions-on-up.patch
From 5cb7f9713de685ccb450bd3dab0f2a78b8f800df Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <jb@HIDDEN>
Date: Sun, 8 Feb 2026 23:07:33 +0000
Subject: [PATCH] ; Add facility to keep previous package versions on upgrade
(bug#79957)
This change adds a conditional to keep old package versions on upgrade.
This allows users to keep running multiple Emacsen without a package
upgrade in one Emacs breaking another running Emacs.
* lisp/emacs-lisp/package.el
(package-upgrade-keep-previous): New boolean user option.
(package-upgrade): Use it.
* etc/NEWS: Announce it.
---
etc/NEWS | 5 +++++
lisp/emacs-lisp/package.el | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 8929fcc1215..39e2b5db128 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -636,6 +636,11 @@ will change its appearance if the tab buffer has been modified.
This user option controls which buffers should appear in the tab line.
By default, this is set to not filter the buffers.
+*** New user option 'package-upgrade-keep-previous'.
+This user option controls whether to keep previous packages versions
+on upgrade. By default, this is set to nil, to keep the previous
+behavior.
+
** Project
---
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 407c4496d81..5b6d56e48b0 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -428,6 +428,11 @@ package-archive-column-width
:type 'natnum
:version "28.1")
+(defcustom package-upgrade-keep-previous nil
+ "If non-nil, keep previous packages versions on upgrade."
+ :type 'boolean
+ :version "31.1")
+
;;; `package-desc' object definition
;; This is the struct used internally to represent packages.
@@ -2093,7 +2098,7 @@ package-upgrade
;; An active built-in has never been "selected"
;; before. Mark it as installed explicitly.
(and pkg-desc 'dont-select))
- (when pkg-desc
+ (when (and (not package-upgrade-keep-previous) pkg-desc)
(package-delete pkg-desc 'force 'dont-unselect))))))
(defun package--upgradeable-packages (&optional include-builtins)
--
2.47.3
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 9 Feb 2026 22:30:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 09 17:30:13 2026 Received: from localhost ([127.0.0.1]:47236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vpZll-0003DG-GN for submit <at> debbugs.gnu.org; Mon, 09 Feb 2026 17:30:13 -0500 Received: from out-178.mta0.migadu.com ([2001:41d0:1004:224b::b2]:14176) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <jb@HIDDEN>) id 1vpZlg-00035U-Ms for 79957 <at> debbugs.gnu.org; Mon, 09 Feb 2026 17:30:11 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1770676201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FDybCJ1eYLLqBn1srdiEWR/fb1nFd92m6KY7NpPPgU0=; b=bUbgRqJaXHtP9xloBwhj8wRiXo8N9et7+6JwbpGzXB6xjtXdHHaUjOhHpNYSZ4XfD3ca0p 4EE+FGOokC6aYZjxiEnUTpbsNEQqSmM8z6QcddPlOyRjR/V5mYpZLOAWaIclFEoyXbRdYV RUWR6iV1t65VAYaxHfP/90rvXEbk5F3SLJa+Vjw5IIY5a6J0liUokp2OVt3LL51wBjPgtY r1pTObJmPWRxkdL+PgBwcv8AMslRsLPu4khNkLI1l3pJQgNFyL8wwMogB0Wft9jB1Uqew0 NtGaNY8bNFJV+CP5QyqEiQsn1krANNKe1D9TH2SHBs3zlelivL+FBLYJ0AfJoA== From: Jeremy Bryant <jb@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <jwvo6lyzuf2.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message of "Sun, 08 Feb 2026 18:33:04 -0500") References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> <jwvo6lyzuf2.fsf-monnier+emacs@HIDDEN> Date: Mon, 09 Feb 2026 22:29:58 +0000 Message-ID: <874inpv9cp.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Stefan Monnier <monnier@HIDDEN> writes: >> +(defcustom package-upgrade-delete-previous t >> + "If non-nil, delete previous packages versions on upgrade." >> + :type 'boolean >> + :version "31.1") > > I'd reverse it, i.e. if nil, do as before and if t then keep the old > package version. OK, I'll work on that. > But, in any case, this begs the question: when will old packages > be deleted? This is indeed not resolved in this patch. This bug report effectively has two parts, this one under discussion on keeping old packages around, and the initial feature request on incorporating package upgrades from other instances. In this other patch which I have started to work on I imagine having a function to delete old packages - if you have ideas on how timplement it, they are welcome. But with multiple long-running Emacsen, having old versions for a while is useful, and minimal disk space, so I think it may be useful for other users, as I find it useful. > > > === Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 9 Feb 2026 20:15:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 09 15:15:30 2026 Received: from localhost ([127.0.0.1]:45715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vpXfN-0000g5-DR for submit <at> debbugs.gnu.org; Mon, 09 Feb 2026 15:15:30 -0500 Received: from mout02.posteo.de ([185.67.36.66]:55973) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1vpXfJ-0000fi-K1 for 79957 <at> debbugs.gnu.org; Mon, 09 Feb 2026 15:15:28 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 22A9C240101 for <79957 <at> debbugs.gnu.org>; Mon, 9 Feb 2026 21:15:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1770668119; bh=CWAGRcbZ20en82SYVrD+JCm8m5Rz5NxGVLshNzRlWcM=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=ZevJjaEPiuEhgbs3ryEnpLtuB7tjHhCq5uWghuDFusVGnB9pnln7qqu3s79e510eL D3mUXJKdBComeTgVAwvb0ws1PSx5xMPfU5lPUR11FZwaXOiaeIeaBzdvnD5Bl55QqH RkNlfpCDlcM19Kle7mQGRr20kRGH2DaP3igwy/2KlBIw7GEpYYFGbHgAB5aYYW/DyV vRWtWCSTUYXdaLOtFEBd0coJDodhD7IBWO6ZN9TGw4yhM2f9OESbhbB9scbcRGYToX 6ZIUs/OybA+C96DSr/IxJIisak3pEM9nuMT1siGqM+1yOWrOoqLC7PAYv6A3AXEF9v CzOjH2bgFiZPw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4f8wsx51Z6z6twP; Mon, 9 Feb 2026 21:15:17 +0100 (CET) From: Philip Kaludercic <philipk@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87a4xivn5i.fsf@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> OpenPGP: id=philipk@HIDDEN; url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN"; preference=signencrypt Date: Mon, 09 Feb 2026 20:15:18 +0000 Message-ID: <87ms1hr7vv.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Stefan Monnier <monnier@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Jeremy Bryant <jb@HIDDEN> writes: > Stefan Monnier <monnier@HIDDEN> writes: > >>> After studying the source code for package.el, it seems to me that >>> package-upgrade essentially deletes the previous version, and installs >>> the new ones from scratch. >>> >>> Is this true? >> >> Yes. >> >>> Could we modify this to have a parameter to keep the old versions (and >>> possibly a user option)? Would this work as a small patch? >> >> I think so. >> >> >> === Stefan > > Please find attached a proposed patch to implement my suggestion. > > Any feedback, critique, welcome. > Otherwise kindly merge into Emacs (presumably the master branch). > > From 2a844edbb4e033e604a44b071e5319e77bfbda53 Mon Sep 17 00:00:00 2001 > From: Jeremy Bryant <jb@HIDDEN> > Date: Sun, 8 Feb 2026 23:07:33 +0000 > Subject: [PATCH] ; Add facility to keep previous package versions on upgrade > (bug#79957) > > This change adds a conditional to preserve old package versions on > upgrade. > This allows users to keep running multiple Emacsen without one a package > upgrade in one Emacs breaking another running Emacs. > > * lisp/emacs-lisp/package.el > (package-upgrade-delete-previous): New boolean user option. > (package-upgrade): Use it. > > * etc/NEWS: Announce it. > --- > etc/NEWS | 5 +++++ > lisp/emacs-lisp/package.el | 10 ++++++++-- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/etc/NEWS b/etc/NEWS > index 8929fcc1215..c6e0c205dea 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -636,6 +636,11 @@ will change its appearance if the tab buffer has been modified. > This user option controls which buffers should appear in the tab line. > By default, this is set to not filter the buffers. > > +*** New user option 'package-upgrade-delete-previous'. > +This user option controls whether to delete previous packages versions > +on upgrade. By default, this is set to t, to keep the previous > +behavior. > + > ** Project > > --- > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 407c4496d81..64bc533dc9c 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -428,6 +428,11 @@ package-archive-column-width > :type 'natnum > :version "28.1") > > +(defcustom package-upgrade-delete-previous t > + "If non-nil, delete previous packages versions on upgrade." > + :type 'boolean > + :version "31.1") > + > > ;;; `package-desc' object definition > ;; This is the struct used internally to represent packages. > @@ -2093,8 +2098,9 @@ package-upgrade > ;; An active built-in has never been "selected" > ;; before. Mark it as installed explicitly. > (and pkg-desc 'dont-select)) > - (when pkg-desc > - (package-delete pkg-desc 'force 'dont-unselect)))))) > + (when package-upgrade-delete-previous > + (when pkg-desc So (and package-upgrade-delete-previous pkg-desc)... Doesn't really matter, but keeps the diff smaller :) > + (package-delete pkg-desc 'force 'dont-unselect))))))) > > (defun package--upgradeable-packages (&optional include-builtins) > ;; Initialize the package system to get the list of package
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 8 Feb 2026 23:33:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 08 18:33:15 2026 Received: from localhost ([127.0.0.1]:58165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vpEHD-0001rw-1L for submit <at> debbugs.gnu.org; Sun, 08 Feb 2026 18:33:15 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37655) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1vpEHA-0001qy-V0 for 79957 <at> debbugs.gnu.org; Sun, 08 Feb 2026 18:33:13 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5FA88441540; Sun, 8 Feb 2026 18:33:06 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1770593585; bh=L70ic5y15qVxnx6VNkTfTbkSP+A8yL+b0tL9FpiGwdI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KN1puRAh7fd8nViJ6yG/VUkiEIdmJAoLVv/qaedv99n04GfyHNWFU7S82c9FbJ+pK K4zE0mvBx6ai4xt4p6l1oQgekyEMU8j9o8zr+So5xE5nWzp5+wNsRPFkLeIYkHkY9P Uo/2Gwr9depx4OIlHy4PcIR+MNXPdl15huCyIkQKMo5V+V6s6UQbT4IYa2PhmHjjHz 9xTL1gUYdgEBaFB1Rj9VozhFYc4vpwHYnI9xI4tThB/pC3nvGIsZk0QbcQHxRhPxAt koF71z8oisUBmCxwXc35G/7FA2efj7nTEpw/kmk/ANNc6DggrtbIj+4tRIXSAb6mvn HM+F+sGFZRdxw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5B872441534; Sun, 8 Feb 2026 18:33:05 -0500 (EST) Received: from pastel (104-195-243-38.cpe.teksavvy.com [104.195.243.38]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2ED3912006C; Sun, 8 Feb 2026 18:33:05 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87a4xivn5i.fsf@HIDDEN> Message-ID: <jwvo6lyzuf2.fsf-monnier+emacs@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> <87a4xivn5i.fsf@HIDDEN> Date: Sun, 08 Feb 2026 18:33:04 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.202 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > +(defcustom package-upgrade-delete-previous t > + "If non-nil, delete previous packages versions on upgrade." > + :type 'boolean > + :version "31.1") I'd reverse it, i.e. if nil, do as before and if t then keep the old package version. But, in any case, this begs the question: when will old packages be deleted? === Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 8 Feb 2026 23:19:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 08 18:19:54 2026
Received: from localhost ([127.0.0.1]:57953 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vpE4H-0000Tn-VZ
for submit <at> debbugs.gnu.org; Sun, 08 Feb 2026 18:19:54 -0500
Received: from out-173.mta1.migadu.com ([95.215.58.173]:51653)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <jb@HIDDEN>)
id 1vpE4D-0000SW-Ib
for 79957 <at> debbugs.gnu.org; Sun, 08 Feb 2026 18:19:51 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net;
s=key1; t=1770592782;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=2BJU+de8qM821XvyjmLVWHCNtjwIZ/8n3QqN50vvS3Q=;
b=VMNQ6UYUriI6n1jHVHmaeZWHlL1aviL7VJfcMv2DxbrnOxdsJOsYhqQ5triFSIE6mfcqQp
rKdBYvcTRt3qJmhbCAeQuLvB4VLa5Qmz8nKrGdURAsJ6/b9unlQ3plOzUevu8uxDywe6jY
NATUi6y3x7HzBeKxG5hNcdcAtgUgbEQl6PwYcDoEvwaq/y4mN37bebP3p0P7LbJIpLuXrb
rf3Yo9/OwL9oHFvxtlzlLlH6Yz4aOr4/fLsDfk/qD7CLrClSwrx6aFgNbv5oEhKQBJl2ql
M8HWf8zKlFl66jg+EUADvXcWS4+lzEKtxO84Ud3v7z2z54js5n+WuTcgd4rAbQ==
From: Jeremy Bryant <jb@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#79957: 30.2; Don't delete old versions of packages -
Feature request - Incorporate package upgrades started from other Emacs
instances
In-Reply-To: <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
of "Sat, 31 Jan 2026 11:10:35 -0500")
References: <87jyyzrxo8.fsf@HIDDEN>
<jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
<87ms2xpl8u.fsf@HIDDEN>
<jwva4yxm288.fsf-monnier+emacs@HIDDEN>
<87343mr9a4.fsf@HIDDEN>
<jwvwm0xlq59.fsf-monnier+emacs@HIDDEN>
Date: Sun, 08 Feb 2026 23:19:37 +0000
Message-ID: <87a4xivn5i.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 79957
Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
--=-=-=
Content-Type: text/plain
Stefan Monnier <monnier@HIDDEN> writes:
>> After studying the source code for package.el, it seems to me that
>> package-upgrade essentially deletes the previous version, and installs
>> the new ones from scratch.
>>
>> Is this true?
>
> Yes.
>
>> Could we modify this to have a parameter to keep the old versions (and
>> possibly a user option)? Would this work as a small patch?
>
> I think so.
>
>
> === Stefan
Please find attached a proposed patch to implement my suggestion.
Any feedback, critique, welcome.
Otherwise kindly merge into Emacs (presumably the master branch).
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=0001-Add-facility-to-keep-previous-package-versions-on-up.patch
From 2a844edbb4e033e604a44b071e5319e77bfbda53 Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <jb@HIDDEN>
Date: Sun, 8 Feb 2026 23:07:33 +0000
Subject: [PATCH] ; Add facility to keep previous package versions on upgrade
(bug#79957)
This change adds a conditional to preserve old package versions on
upgrade.
This allows users to keep running multiple Emacsen without one a package
upgrade in one Emacs breaking another running Emacs.
* lisp/emacs-lisp/package.el
(package-upgrade-delete-previous): New boolean user option.
(package-upgrade): Use it.
* etc/NEWS: Announce it.
---
etc/NEWS | 5 +++++
lisp/emacs-lisp/package.el | 10 ++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 8929fcc1215..c6e0c205dea 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -636,6 +636,11 @@ will change its appearance if the tab buffer has been modified.
This user option controls which buffers should appear in the tab line.
By default, this is set to not filter the buffers.
+*** New user option 'package-upgrade-delete-previous'.
+This user option controls whether to delete previous packages versions
+on upgrade. By default, this is set to t, to keep the previous
+behavior.
+
** Project
---
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 407c4496d81..64bc533dc9c 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -428,6 +428,11 @@ package-archive-column-width
:type 'natnum
:version "28.1")
+(defcustom package-upgrade-delete-previous t
+ "If non-nil, delete previous packages versions on upgrade."
+ :type 'boolean
+ :version "31.1")
+
;;; `package-desc' object definition
;; This is the struct used internally to represent packages.
@@ -2093,8 +2098,9 @@ package-upgrade
;; An active built-in has never been "selected"
;; before. Mark it as installed explicitly.
(and pkg-desc 'dont-select))
- (when pkg-desc
- (package-delete pkg-desc 'force 'dont-unselect))))))
+ (when package-upgrade-delete-previous
+ (when pkg-desc
+ (package-delete pkg-desc 'force 'dont-unselect)))))))
(defun package--upgradeable-packages (&optional include-builtins)
;; Initialize the package system to get the list of package
--
2.47.3
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 31 Jan 2026 16:12:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 31 11:12:47 2026 Received: from localhost ([127.0.0.1]:55135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vmDaY-0000XX-TE for submit <at> debbugs.gnu.org; Sat, 31 Jan 2026 11:12:47 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23514) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1vmDaW-0000X9-Ss for 79957 <at> debbugs.gnu.org; Sat, 31 Jan 2026 11:12:45 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 84F56100146; Sat, 31 Jan 2026 11:12:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1769875958; bh=2RSZn3Sw6g4sRHSeRYV2lTCraeJ6JnGlm7qJxoB0hOE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IWaLBt0+DbWtkyZgPFvAWDtrmUXAuZTarZTfEZTjoQyvWwtX5ljKhg91vCE6WpA+8 e8/CdByeTeazYT/7DvPo5050IUfUgLs4d33iqRoTeqjzBiSift6fLt6bqXW49CXyeC OSz7uAZSWn2ApuVIxoNKpC5qoubJaX+0ZrTw/Ipc7/C7hOq5yDUSxwqz3ejcI5kpTL R8khgruESo6ze7L9ctMX+6ujwe9B/5K9pcvlQbLLu7lNl9eC12BJUA76oc+7lv4vbb XMI/x/qySmZfpjvpbdSsOf3M7q87W3q+40bGcQeMgdRG37gD9C55j/A0VucMEiww7l WaW4PCWLqS99g== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6E4A9100034; Sat, 31 Jan 2026 11:12:38 -0500 (EST) Received: from pastel (104-195-243-38.cpe.teksavvy.com [104.195.243.38]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3D7B012037A; Sat, 31 Jan 2026 11:12:38 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87wm0ypuke.fsf@HIDDEN> Message-ID: <jwvqzr5lq2x.fsf-monnier+emacs@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87wm0ypuke.fsf@HIDDEN> Date: Sat, 31 Jan 2026 11:12:37 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.193 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Reflecting on the right thing to do here, what is the 'code we used in > Emacs #1' in this context? IIRC it's `package--reload-previously-loaded`. === Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 31 Jan 2026 16:10:45 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 31 11:10:45 2026 Received: from localhost ([127.0.0.1]:55099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vmDYb-0000NL-7Z for submit <at> debbugs.gnu.org; Sat, 31 Jan 2026 11:10:45 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12753) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1vmDYY-0000N2-J6 for 79957 <at> debbugs.gnu.org; Sat, 31 Jan 2026 11:10:43 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F28DD441135; Sat, 31 Jan 2026 11:10:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1769875836; bh=sAXdT2B7cxczSFojV0pplPA5owoHs4QocNn0GKP2uYw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=oRxkHnj6wX8BHvztMHfWZ22yW9urtYDqNC14UjnF2i3PrawUNsjVIyZoUSP7lja7d rZnn7+GAP08A5asfsvCyNQg0L1oAjZG3G4qaEoyzje5+O5uNXCu+LJlNKM+zWFzLxg vVCaET8L092Pn8pXfIUC1QrWO68cdjFZfxwfKZYPMMVtCs+PGqCvT1vpYTU3xA9MSv Iyh4zPk8royDQHDNj0RzbFUMNacjt1PWyCOyKzNxqmnqVUphWSGB9/QwaMmBR9UAuk 1V+wwYjkeqsDJ4EBNjPpmlo0k4Ewnn9zyScESc/TR9HZlgm/VBbE8aK0hl4nwlRyj+ E6c6l11rRJ6oQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 152AF441161; Sat, 31 Jan 2026 11:10:36 -0500 (EST) Received: from pastel (104-195-243-38.cpe.teksavvy.com [104.195.243.38]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DD8B012062C; Sat, 31 Jan 2026 11:10:35 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Jeremy Bryant <jb@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <87343mr9a4.fsf@HIDDEN> Message-ID: <jwvwm0xlq59.fsf-monnier+emacs@HIDDEN> References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> <87343mr9a4.fsf@HIDDEN> Date: Sat, 31 Jan 2026 11:10:35 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.224 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > After studying the source code for package.el, it seems to me that > package-upgrade essentially deletes the previous version, and installs > the new ones from scratch. > > Is this true? Yes. > Could we modify this to have a parameter to keep the old versions (and > possibly a user option)? Would this work as a small patch? I think so. === Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 30 Jan 2026 23:09:07 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 30 18:09:07 2026 Received: from localhost ([127.0.0.1]:45715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vlxbu-0002Xx-FA for submit <at> debbugs.gnu.org; Fri, 30 Jan 2026 18:09:06 -0500 Received: from out-186.mta0.migadu.com ([91.218.175.186]:53904) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <jb@HIDDEN>) id 1vlxbr-0002XH-RX for 79957 <at> debbugs.gnu.org; Fri, 30 Jan 2026 18:09:04 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1769814537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p4X+diVD4b1aQ9si6tVC6SEb/3sycdBQia9m9x5uYiA=; b=Um5U3V0Ce9k3McCn/1dhUcErfQYQnMIKrieIGQ9BPNKCB6Ov2BmTvq2QrzTZEw6OsrA0Ds /Azqh6gFLdZTuYCZqIo9BKWF6moNm/bDFqPehresniHnFwvUziGgBccrZmVseYyvGrPhh6 HpSmAJ5VtNHuKYZw2PZyfGiCTkT/+KwC6D/cNlWy9yuXh9vIHn5rBWTaLdEKoMqAg39H24 iyB8ekSk/G+/tuZnb/UNL4ea3xw/KcCEDFfclv01Lz8bE6USFK0k5P4wFX7tpQXP8aR82G 1VygfHMVI1O85aC4+/HGMMT+HffwClxVHiBuF80njske+U65152GUZG5JtDd3w== From: Jeremy Bryant <jb@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#79957: 30.2; Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message of "Sat, 06 Dec 2025 20:35:53 -0500") References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> Date: Fri, 30 Jan 2026 23:08:49 +0000 Message-ID: <87wm0ypuke.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Stefan Monnier <monnier@HIDDEN> writes: >> Say you run two instances, Emacs #1 and Emacs #2, both using an ELPA >> package called, say, PackageX. >> >> From Emacs #1, upgrade PackageX v1 to PackageX v2. >> Usually you can benefit from the new version. >> >> From Emacs #2, still using PackageX v1, how to use PackageX v2 without r= estarting? >> It seems that some of the package.el infrastructure invoked in the >> upgrade on Emacs #1 would need to be called or implemented from Emacs #2 >> >> Is this possible in the design of the packaging infrastructure? > > AFAIK, this is "as possible as" the upgrade that's done in Emacs #1. > So, yes, it's definitely possible, but with the same caveats as apply to > the Emacs #1 where it will often work but not always 100%. > >> Is this documented and I've missed it? > > I don't think it's documented, no. > >> Or is the recommended way for a different Emacs instance to restart? In >> which case is there some work that could be done to implement the above? > > IIRC the "best" way to do that would be probably look something like > a function `package-activate-refresh` which aims to behave like > `package-activate-all` but starting from a state where some packages > have already been activated (or even loaded). > > So it would: > > - Collect the set N of packages that should now be activated. > - Compare that set with the current set O. > - For all packages that are both in O and in N but not with the same > version (i.e. upgrade or downgrade), use the code we used in Emacs #1 > to force-reload the new files to override the old ones we had > already loaded. Reflecting on the right thing to do here, what is the 'code we used in Emacs #1' in this context? > - For the set that's in O but now in N, hmm... that's a tough one. > Maybe we can try `unload-feature` (tho I'm not sure if that works for > package-quickstart now that I think about it). > - For the set that's in N but not in O, that's easy, we just activate the= m. > > Note: such a function would be useful not only for the situation you > describe but also after changing config vars like > `package-directory-list` or `package-load-list`. > > Note=C2=B2: I'm not sure how to find the version of the packages in O, tho > maybe we don't actually need that, we instead need to find the > directories (in `load-path`) corresponding to the packages in O. > Not sure how to do that either, mind you, but some heuristic might go > a long way. > > > Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 30 Jan 2026 23:05:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 30 18:05:52 2026 Received: from localhost ([127.0.0.1]:45698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vlxYm-0002R6-HQ for submit <at> debbugs.gnu.org; Fri, 30 Jan 2026 18:05:52 -0500 Received: from out-177.mta0.migadu.com ([91.218.175.177]:62779) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <jb@HIDDEN>) id 1vlxYj-0002Qo-Qk for 79957 <at> debbugs.gnu.org; Fri, 30 Jan 2026 18:05:50 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1769814342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m3a5qNKmSGDAy5WQNfGjoV2+WYqdxYIhd72CkmRd+WY=; b=PelC9n7CYvrBCxO2OH+upCl6yXn476/K2Ul8N+UqbLagfBdoPJQB0SXs3BctIrVzOQslaL qbqU8C6PkufsKNVVTvxkzF53lOTH6YjpcfVae9zvsqLMhIIFQSfr+P7vjLtnD+wjBgmKtB ItIXqn9Yqpet5uyFUKd63Sm3eyp9wxysZXmg6cCUJcWa+nudEb7o/JlQ1RbZ+rvEABBVw6 YCKMubUQNx8d02HZSWXpqTmdMGO3bDjrL2ukDz2EwJSelcT1uys629XA4QeFpmYXRR85og Sqg2suG303m6d5q1E9rfePd7CIdwJX5uzL04dL8L2GH8aGqwOsPO5Atluzr/qQ== From: Jeremy Bryant <jb@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#79957: 30.2; Don't delete old versions of packages - Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <jwva4yxm288.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message of "Thu, 01 Jan 2026 16:55:11 -0500") References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> <87ms2xpl8u.fsf@HIDDEN> <jwva4yxm288.fsf-monnier+emacs@HIDDEN> Date: Fri, 30 Jan 2026 23:05:39 +0000 Message-ID: <87343mr9a4.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Stefan Monnier <monnier@HIDDEN> writes: >> It appears that updating packages in one instance of Emacs generally deletes the >> previous files of the previous version of the packages. Whilst this is >> good for an update, it also confuses separate Emacs instances with an >> older load-path. > > Good point, indeed, thanks. > >> Would there be a way to make it possible to have staggered versions of >> packages concurrently? I've read up on the Emacs and Elisp manuals >> and it is not apparent. > > `package.el` was designed so as to support the case where multiple > versions of a package are installed: after collecting the set of all > installed packages, it picks which ones to activate, which includes > selecting which version of each package to activate (one cannot > activate two versions of the same package in the same Emacs process). > > So, indeed we could keep the old package around and mark it for later > deletion instead (the precise definition of "later" left as an exercise > for the reader). > > > Stefan After studying the source code for package.el, it seems to me that package-upgrade essentially deletes the previous version, and installs the new ones from scratch. Is this true? Could we modify this to have a parameter to keep the old versions (and possibly a user option)? Would this work as a small patch?
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 1 Jan 2026 21:55:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 01 16:55:31 2026
Received: from localhost ([127.0.0.1]:54787 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vbQdm-0007wd-O8
for submit <at> debbugs.gnu.org; Thu, 01 Jan 2026 16:55:31 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32408)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
id 1vbQdj-0007wA-Br
for 79957 <at> debbugs.gnu.org; Thu, 01 Jan 2026 16:55:28 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2870710013E;
Thu, 1 Jan 2026 16:55:20 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1767304513;
bh=K5puuIHsherBcl+DgVBPvfzriHBQKtClQ/74Mr+GkDg=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=daPjlO75IW4S21E5KKa+oYjhJ9ciyzZGTFv5iaCz8zDPJx9Z/eVxT3gTmDQctNjaD
0udB3bOVvIKtrFsobaMq7tYg29oOuXnnXKJzG4mHL9CRSNKQQGhbR9dgvDv+qtXmhz
g6P81cFq14DPXtdM0/eIiDVMtE9nCZB9SazBBt1GkgASEZg2zhJXiqF15tEA63T96P
taZWQ0DlJYiVgtXdBG+y3qZ1rUpWCCHXKHhwwZUn1xHzpq4+u58Px0qb1P3VJzPBde
c1r77zkdEpqUl9C0w6FjJpzegRpO7jW2Pg9npTpUcT8ogwsz7xTfaat9IM9LQJ90Ra
JJvljBH+EsvPg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 784CD10002E;
Thu, 1 Jan 2026 16:55:13 -0500 (EST)
Received: from pastel (104-195-203-100.cpe.teksavvy.com [104.195.203.100])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 48E5312030F;
Thu, 1 Jan 2026 16:55:13 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Jeremy Bryant <jb@HIDDEN>
Subject: Re: bug#79957: 30.2; Feature request - Incorporate package upgrades
started from other Emacs instances
In-Reply-To: <87ms2xpl8u.fsf@HIDDEN>
Message-ID: <jwva4yxm288.fsf-monnier+emacs@HIDDEN>
References: <87jyyzrxo8.fsf@HIDDEN>
<jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
<87ms2xpl8u.fsf@HIDDEN>
Date: Thu, 01 Jan 2026 16:55:11 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.085 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain
DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
domain
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79957
Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
> It appears that updating packages in one instance of Emacs generally deletes the
> previous files of the previous version of the packages. Whilst this is
> good for an update, it also confuses separate Emacs instances with an
> older load-path.
Good point, indeed, thanks.
> Would there be a way to make it possible to have staggered versions of
> packages concurrently? I've read up on the Emacs and Elisp manuals
> and it is not apparent.
`package.el` was designed so as to support the case where multiple
versions of a package are installed: after collecting the set of all
installed packages, it picks which ones to activate, which includes
selecting which version of each package to activate (one cannot
activate two versions of the same package in the same Emacs process).
So, indeed we could keep the old package around and mark it for later
deletion instead (the precise definition of "later" left as an exercise
for the reader).
Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at 79957) by debbugs.gnu.org; 1 Jan 2026 12:31:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 01 07:31:59 2026 Received: from localhost ([127.0.0.1]:53072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vbHqR-0005dX-DW for submit <at> debbugs.gnu.org; Thu, 01 Jan 2026 07:31:59 -0500 Received: from out-184.mta0.migadu.com ([91.218.175.184]:39784) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <jb@HIDDEN>) id 1vbHqL-0005dF-U1 for 79957 <at> debbugs.gnu.org; Thu, 01 Jan 2026 07:31:56 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1767270707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e5EHK934gxHENfhhGWzIG4+OBGfJzSfqavIC8AAuAeo=; b=m7DdOGHWjfxn6No8gooQWb9VsRqdG6cxePXg5vLUQNyh1aXUMlWhQh8NcsSMr9mcryvS+1 SVuK2u2Hyplqmqv+KaJZP1IKCcRz6hgAEweW11HbBCr63QM44Q0BDy8LmVC+mV3w1t2ofJ xEUrpu1lCGMjEN0G7eEfT4hD9fipzczdFfkG6efqQ3H+d/kP9Z3XeEyKSF5dOS8C9c/nFU BaB663DOD1kJ/82CIs9rPqw7qS4ZpB8oXMGDrraBHpCEA5l3jL1CVLPPaZyc52vH/SO87n LdsaB9FVmmKEbZF9jIIaL4n1EtX2rLSx0sX+cDOGjzjydYoRl861PZ6csD3sgg== From: Jeremy Bryant <jb@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#79957: 30.2; Feature request - Incorporate package upgrades started from other Emacs instances In-Reply-To: <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message of "Sat, 06 Dec 2025 20:35:53 -0500") References: <87jyyzrxo8.fsf@HIDDEN> <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN> Date: Thu, 01 Jan 2026 12:31:45 +0000 Message-ID: <87ms2xpl8u.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79957 Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Stefan Monnier <monnier@HIDDEN> writes: >> Or is the recommended way for a different Emacs instance to restart? In >> which case is there some work that could be done to implement the above? > > IIRC the "best" way to do that would be probably look something like > a function `package-activate-refresh` which aims to behave like > `package-activate-all` but starting from a state where some packages > have already been activated (or even loaded). > > So it would: Thanks Stefan for these ideas to implement the work. There is a related feature request, which I am putting into this bug request for ease of tracking. It appears that updating packages in one instance of Emacs generally deletes the previous files of the previous version of the packages. Whilst this is good for an update, it also confuses separate Emacs instances with an older load-path. Would there be a way to make it possible to have staggered versions of packages concurrently? I've read up on the Emacs and Elisp manuals and it is not apparent. One of my underlying motivations is that running multiple Emacs instances enables some parallelism and effectively using multiple CPU cores for parallel Lisp interpreters. I think in practice it is easier to reconcile mismatches in package versions, than in evolving Emacs to handle more parallelism within the same Lisp interpreter.
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
Received: (at 79957) by debbugs.gnu.org; 7 Dec 2025 01:38:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 06 20:38:19 2025
Received: from localhost ([127.0.0.1]:35632 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vS3j8-0008Kb-6w
for submit <at> debbugs.gnu.org; Sat, 06 Dec 2025 20:38:19 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57763)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
id 1vS3h0-0008FQ-Lw
for 79957 <at> debbugs.gnu.org; Sat, 06 Dec 2025 20:36:09 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C778B4410DE;
Sat, 6 Dec 2025 20:36:00 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1765071359;
bh=iCdNuQrNv4/vkldc5DPuEEh4bYVPZuopg/DM2N3/B1I=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=TUVYn6LqEyx8YvybDDWLt13PBi3+LL+aica3ZAZerPJ87+2DBlfP7FcbUdPARxygW
2wrFhqKq3DjTdw9lTZ+fhC53cqv4+z3BOczq5Y52yB9uyGb6ks6MNFCET66epRw/v4
uMkJYg1hPMz6crRlyltRC23uGeuW7L6tHW7Nv/Y1EG5C10GZOkYngXVxKcu1E9b9Mv
zdkmLO+pZ10wl4OFUh5x0LUo6gRRaXc9GiTWM4Hbz1kpqjxcdVakt83zZWNv+G/fPe
uQl69yVFSK9S4RzNxYYqAOPvMVUa5wVlmqjaTowJGtv+bGwHp5jP0chc2IDcKCvfj4
UaX1Eu0jtPLbQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 790E14410AA;
Sat, 6 Dec 2025 20:35:59 -0500 (EST)
Received: from asado (unknown [181.28.45.30])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E35641202FC;
Sat, 6 Dec 2025 20:35:57 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Jeremy Bryant <jb@HIDDEN>
Subject: Re: bug#79957: 30.2; Feature request - Incorporate package upgrades
started from other Emacs instances
In-Reply-To: <87jyyzrxo8.fsf@HIDDEN>
Message-ID: <jwvwm2z6q9w.fsf-monnier+emacs@HIDDEN>
References: <87jyyzrxo8.fsf@HIDDEN>
Date: Sat, 06 Dec 2025 20:35:53 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.103 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain
DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
domain
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79957
Cc: Philip Kaludercic <philipk@HIDDEN>, 79957 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
> Say you run two instances, Emacs #1 and Emacs #2, both using an ELPA
> package called, say, PackageX.
>
> From Emacs #1, upgrade PackageX v1 to PackageX v2.
> Usually you can benefit from the new version.
>
> From Emacs #2, still using PackageX v1, how to use PackageX v2 without re=
starting?
> It seems that some of the package.el infrastructure invoked in the
> upgrade on Emacs #1 would need to be called or implemented from Emacs #2
>
> Is this possible in the design of the packaging infrastructure?
AFAIK, this is "as possible as" the upgrade that's done in Emacs #1.
So, yes, it's definitely possible, but with the same caveats as apply to
the Emacs #1 where it will often work but not always 100%.
> Is this documented and I've missed it?
I don't think it's documented, no.
> Or is the recommended way for a different Emacs instance to restart? In
> which case is there some work that could be done to implement the above?
IIRC the "best" way to do that would be probably look something like
a function `package-activate-refresh` which aims to behave like
`package-activate-all` but starting from a state where some packages
have already been activated (or even loaded).
So it would:
- Collect the set N of packages that should now be activated.
- Compare that set with the current set O.
- For all packages that are both in O and in N but not with the same
version (i.e. upgrade or downgrade), use the code we used in Emacs #1
to force-reload the new files to override the old ones we had
already loaded.
- For the set that's in O but now in N, hmm... that's a tough one.
Maybe we can try `unload-feature` (tho I'm not sure if that works for
package-quickstart now that I think about it).
- For the set that's in N but not in O, that's easy, we just activate them.
Note: such a function would be useful not only for the situation you
describe but also after changing config vars like
`package-directory-list` or `package-load-list`.
Note=B2: I'm not sure how to find the version of the packages in O, tho
maybe we don't actually need that, we instead need to find the
directories (in `load-path`) corresponding to the packages in O.
Not sure how to do that either, mind you, but some heuristic might go
a long way.
Stefan
bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.Received: (at submit) by debbugs.gnu.org; 6 Dec 2025 23:35:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 06 18:35:56 2025 Received: from localhost ([127.0.0.1]:34803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vS1oi-0001HH-FC for submit <at> debbugs.gnu.org; Sat, 06 Dec 2025 18:35:56 -0500 Received: from lists.gnu.org ([2001:470:142::17]:60196) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <jb@HIDDEN>) id 1vS1og-0001Gz-3E for submit <at> debbugs.gnu.org; Sat, 06 Dec 2025 18:35:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jb@HIDDEN>) id 1vS1oZ-0007d8-2Q for bug-gnu-emacs@HIDDEN; Sat, 06 Dec 2025 18:35:47 -0500 Received: from out-183.mta1.migadu.com ([95.215.58.183]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jb@HIDDEN>) id 1vS1oW-0006ya-ST for bug-gnu-emacs@HIDDEN; Sat, 06 Dec 2025 18:35:46 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1765064141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=cOgR4eSSphWOK1DQxoo2tDW06g3MoqXKuo+N5IUQSvk=; b=muuVsO0fdSBydRPTkkATFeQpidS4AE3laqQEvODAmDNcpref8wDJhrRWGXiPWCRKm+pUXW CQk5vgnmeWP8ZLSrjWYNd11coPzeaNUwnC7x0Ql+NQk07cIhu01u4hw9JMhvk39aOzcAlt JoOl0fhvG1UIIjFZCt/icAevQ909WN6UwDjR1t7kxK5GI/QMA0PTRa9JM9ef1m5qtmOWJ1 TZYMmlPMX8PMQWvdga7xjDYrWGHako2qgltn1In0eWmhPcWpfF87CkKj6wqRV4IYhTmW8s UIf41IkP+fSAVbSVhqBGaL3892n9efvJuqimwkfq6P7+IOAsw9bgj5mNbtNyGg== From: Jeremy Bryant <jb@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 30.2; Feature request - Incorporate package upgrades started from other Emacs instances X-Debbugs-CC: Philip Kaludercic <philipk@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Date: Sat, 06 Dec 2025 23:35:35 +0000 Message-ID: <87jyyzrxo8.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.183; envelope-from=jb@HIDDEN; helo=out-183.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) Here is a specific feature request that may benefit from a bug tracking number, although it could be an emacs-devel wider discussion. High-level description of Problem: If you run multiple Emacsen it appears that package upgrades may not be reflected in other instances. Say you run two instances, Emacs #1 and Emacs #2, both using an ELPA package called, say, PackageX. From Emacs #1, upgrade PackageX v1 to PackageX v2. Usually you can benefit from the new version. From Emacs #2, still using PackageX v1, how to use PackageX v2 without restarting? It seems that some of the package.el infrastructure invoked in the upgrade on Emacs #1 would need to be called or implemented from Emacs #2 Is this possible in the design of the packaging infrastructure? Is this documented and I've missed it? Or is the recommended way for a different Emacs instance to restart? In which case is there some work that could be done to implement the above?
Jeremy Bryant <jb@HIDDEN>:philipk@HIDDEN, monnier@HIDDEN, bug-gnu-emacs@HIDDEN.
Full text available.philipk@HIDDEN, monnier@HIDDEN, bug-gnu-emacs@HIDDEN:bug#79957; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.