unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 56614@debbugs.gnu.org
Subject: bug#56614: two problems with `package--reload-previously-loaded'
Date: Mon, 19 Dec 2022 10:07:56 +0100	[thread overview]
Message-ID: <CAG7Bpapfp7ViCQfSNOSjqhbuimDt7yoALCe-GYtOiRc2DaPevQ@mail.gmail.com> (raw)
In-Reply-To: <jwvtu1sw9z7.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

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 <monnier@iro.umontreal.ca>
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
>
>

[-- Attachment #2: Type: text/html, Size: 1777 bytes --]

      reply	other threads:[~2022-12-19  9:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-17 12:42 bug#56614: two problems with `package--reload-previously-loaded' Paul Pogonyshev
2022-07-23  8:30 ` Lars Ingebrigtsen
2022-07-24  9:02   ` Paul Pogonyshev
2022-07-24  9:06     ` Lars Ingebrigtsen
     [not found] ` <jwv5ye8xxit.fsf-monnier+emacs@gnu.org>
     [not found]   ` <CAG7Bparvk4=u992jdmgNqnsjYajDnjupDhhsHRksW38SERcuLA@mail.gmail.com>
2022-12-18 23:48     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19  9:07       ` Paul Pogonyshev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG7Bpapfp7ViCQfSNOSjqhbuimDt7yoALCe-GYtOiRc2DaPevQ@mail.gmail.com \
    --to=pogonyshev@gmail.com \
    --cc=56614@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).