GNU bug report logs -
#75142
31.0.50; package-refresh-contents is not async when using interactively.
Previous Next
Reported by: tusharhero <at> sdf.org
Date: Fri, 27 Dec 2024 15:11:02 UTC
Severity: wishlist
Found in version 31.0.50
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Fri, 27 Dec 2024 15:15:38 +0530
>> From: tusharhero--- via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>>
>> When running `M-x package-refresh-contents RET', my Emacs session
>> freezes for a long time. But it is possible to run this async, we need
>> to give it an argument. I think when the function should be async, I
>> understand that when using this in emacs lisp program, that maybe not be
>> desirable. So maybe you can have a separate functions for emacs lisp
>> programs, or have different behavior for interactive use.
>
> Philip and Stefan, any comments?
We could also run it async given a prefix argument. Perhaps it might
even be ok it just allow it to run async whenever it is invoked
interactively? It doesn't take much to change it, if you want to try it
out:
[Message part 2 (text/plain, inline)]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index b4a33db1a77..b3c0e7bccfa 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1848,7 +1848,7 @@ package-refresh-contents
and make them available for download.
Optional argument ASYNC specifies whether to perform the
downloads in the background."
- (interactive)
+ (interactive (list t))
(unless (file-exists-p package-user-dir)
(make-directory package-user-dir t))
(let ((default-keyring (expand-file-name "package-keyring.gpg"
This bug report was last modified 152 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.