From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#56614: two problems with `package--reload-previously-loaded' Date: Mon, 19 Dec 2022 10:07:56 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000645d5d05f02aa8ea" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3268"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56614@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 19 10:09:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p7C92-0000co-8X for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Dec 2022 10:09:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7C8t-0002iW-JE; Mon, 19 Dec 2022 04:09:03 -0500 Original-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 ) id 1p7C8s-0002ft-DU for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2022 04:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7C8s-000387-4l for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2022 04:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7C8r-0002fJ-RI for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2022 04:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Dec 2022 09:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56614 X-GNU-PR-Package: emacs Original-Received: via spool by 56614-submit@debbugs.gnu.org id=B56614.167144089610224 (code B ref 56614); Mon, 19 Dec 2022 09:09:01 +0000 Original-Received: (at 56614) by debbugs.gnu.org; 19 Dec 2022 09:08:16 +0000 Original-Received: from localhost ([127.0.0.1]:38110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7C88-0002eq-9x for submit@debbugs.gnu.org; Mon, 19 Dec 2022 04:08:16 -0500 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:39570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7C86-0002ef-3l for 56614@debbugs.gnu.org; Mon, 19 Dec 2022 04:08:14 -0500 Original-Received: by mail-ej1-f49.google.com with SMTP id gh17so19889960ejb.6 for <56614@debbugs.gnu.org>; Mon, 19 Dec 2022 01:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vqo/m0BkAD18aA15FLps9fAmanbuHgm8QI28iczLT+g=; b=GRcQ2cau9LAxbfY8cU/9QTBMfz5YA2MFUC7eV21j/8eixYkJzZrpmsEVaOetVmuqxl 5c+IbQB9Zcw8h6XUJ3oCC0RTmmJh5aU+jhZ22kdXgBka4FYB4mjYnv5bkGZK+o47U7ZQ r6wjslxEGZeOiIweWBj0dURRGpy6XdWPtXzy7f3pieSyFgfClE2J4GgNcotY193xY0yB 5WGWEAL/9Dovf03/ZAYHqTYbSZMftZ+0He2If629nRVlcdx4fxHABKMZOl0UO9waARd3 TGxADvS5eNGU94Vl+Ag02RfyvSMCGIyxx/m+8GvB3+X/RUStnZ39n+kq6cP/oAQ0idh9 A/XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vqo/m0BkAD18aA15FLps9fAmanbuHgm8QI28iczLT+g=; b=yrH90H9bfcAG78pwPUmop6Lo00EWRZGQFApeae2bVaq1mn0ZmNeJXFBDoiA7oI/pBE /zLhrQueERosnZfkbmCelnK7gaq4x6zCxNlqBiDqnr3KxBlM+fP0NfA1njrSZjULHvJW 1DnA6QOLS4o+NwshNxkVIjdguWD4cUGnKd8GZDhC6+i6KdvvI+PQV5OP8Cjlq0fMD6c8 kBL5L1cauEx+owCG+hHT4G6IP1Ep6cejaIJJKC26bQ/Iq3SPr0XnJAzglbED2wRwxar3 HYcw9xikFHjYJFq/wHgwyBzVxpROGpqnzAHFrv2730WZP/hw/2fZzurb9+SKGWgwrxOM EfMA== X-Gm-Message-State: ANoB5pn51RUrYNuZxphH9AgKcAYTS1Z402UKYVldBCvmy4crsRc5GlQh JfCEo6b1tLrIRhuSxbQGj4O2xS7HLQfb9tXeFw== X-Google-Smtp-Source: AA0mqf4q9h8jSwEf+t54g/SM7YnevPOYSuND5eRvbTf0pCHRjMskz/bwEGawirI5f3vUWoViFMtNsOeaxiNGkIszr/o= X-Received: by 2002:a17:906:3b0a:b0:7c1:449b:dabb with SMTP id g10-20020a1709063b0a00b007c1449bdabbmr2168834ejf.732.1671440887994; Mon, 19 Dec 2022 01:08:07 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251406 Archived-At: --000000000000645d5d05f02aa8ea Content-Type: text/plain; charset="UTF-8" Have you tried? Save this as `package-reload.el' and run `emacs --batch -l package-reload.el': (defadvice load (before debug) (message "(RE)LOADING %s" file)) (defadvice package--reload-previously-loaded (around debug activate) (ad-activate 'load) ad-do-it (ad-deactivate 'load)) ;(require 'org) (let ((temp (make-temp-file "packages" t))) (setf package-user-dir temp)) (require 'package) (package-initialize) (package-refresh-contents) (package-install (cadr (assq 'org package-archive-contents))) I get messages like "(RE)LOADING /tmp/packagesDLaBkh/org-9.6/org-macs". Doesn't matter if I uncomment that line with "(require 'org)" or not. Paul On Mon, 19 Dec 2022 at 00:48, Stefan Monnier wrote: > > Add e.g. `(message "RELOAD %S" (car c))' before the `(load ...)' form in > > the function, reevaluate it and reinstall any package, e.g.: > > When you re-install, the new files's names will be the same as the > previously loaded ones, so it's the corner case where it happens to work. > > But if you start Emacs, load its builtin Org, and then install GNU > ELPA's Org, I doesn't seem to reload anything. > > > Stefan > > --000000000000645d5d05f02aa8ea Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Have you tried?

Save this as `package-r= eload.el' and run `emacs --batch -l package-reload.el':
(defadvice load (before debug)
=C2=A0 (message "(RE)LOA= DING %s" file))
(defadvice package--reload-previously-loaded (aroun= d debug activate)
=C2=A0 (ad-activate 'load)
=C2=A0 ad-do-it
= =C2=A0 (ad-deactivate 'load))
;(require 'org)
(let ((temp (ma= ke-temp-file "packages" t)))
=C2=A0 (setf package-user-dir tem= p))
(require 'package)
(package-initialize)
(package-refresh-c= ontents)
(package-install (cadr (assq 'org package-archive-contents)= ))

I get messages like "(RE)LOADING /tmp/= packagesDLaBkh/org-9.6/org-macs". Doesn't matter if I uncomment th= at line with "(require 'org)" or not.

Paul



On Mon, 19 Dec 2022 at 00:48, Stefan Monnier <monnier@iro.umontreal.ca> wrot= e:
> Add e.g.= `(message "RELOAD %S" (car c))' before the `(load ...)' = form in
> the function, reevaluate it and reinstall any package, e.g.:

When you re-install, the new files's names will be the same as the
previously loaded ones, so it's the corner case where it happens to wor= k.

But if you start Emacs, load its builtin Org, and then install GNU
ELPA's Org, I doesn't seem to reload anything.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--000000000000645d5d05f02aa8ea--