GNU bug report logs - #75142
31.0.50; package-refresh-contents is not async when using interactively.

Previous Next

Package: emacs;

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: tusharhero <at> sdf.org, Philip Kaludercic <philipk <at> posteo.net>
Cc: 75142 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#75142: 31.0.50; package-refresh-contents is not async when using interactively.
Date: Sat, 18 Jan 2025 11:21:46 +0200
Ping! Did someone try the patch, and if so, did it give good results?

> From: Philip Kaludercic <philipk <at> posteo.net>
> Cc: tusharhero <at> sdf.org,  Stefan Monnier <monnier <at> iro.umontreal.ca>,
>   75142 <at> debbugs.gnu.org
> Date: Sat, 04 Jan 2025 12:11:17 +0000
> 
> 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:
> 
> 
> 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.