Subject: bug#75142: 31.0.50; package-refresh-contents is not async when using interactively.

From: Philip Kaludercic <[email-masked]>
Date: Wed, 29 Jan 2025 16:56:08 +0000

[email-masked] writes:

>> Ping! Did someone try the patch, and if so, did it give good results?
>
> It works but gives no indication of what its doing to the user, and
> doesn't notify when its done.

That is easy to fix, what do you think about:

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index be8dc3f8377..3bc63abcce9 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1847,8 +1847,11 @@ package-refresh-contents
 inform Emacs about the latest versions of all packages it offers,
 and make them available for download.
 Optional argument ASYNC specifies whether to perform the
-downloads in the background."
-  (interactive)
+downloads in the background.  This is always the case when the command
+is invoked interactively."
+  (interactive (list t))
+  (when async
+    (message "Refreshing package contents..."))
   (unless (file-exists-p package-user-dir)
     (make-directory package-user-dir t))
   (let ((default-keyring (expand-file-name "package-keyring.gpg"

> --
> tusharhero