all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 75142@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	tusharhero@sdf.org
Subject: bug#75142: 31.0.50; package-refresh-contents is not async when using interactively.
Date: Sat, 04 Jan 2025 12:11:17 +0000	[thread overview]
Message-ID: <87cyh2ok2i.fsf@posteo.net> (raw)
In-Reply-To: <867c7aeqnj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jan 2025 13:59:12 +0200")

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

Eli Zaretskii <eliz@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@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:


[-- Attachment #2: Type: text/plain, Size: 543 bytes --]

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"

  reply	other threads:[~2025-01-04 12:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-27  9:45 bug#75142: 31.0.50; package-refresh-contents is not async when using interactively tusharhero--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 11:59 ` Eli Zaretskii
2025-01-04 12:11   ` Philip Kaludercic [this message]
2025-01-04 15:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

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

  git send-email \
    --in-reply-to=87cyh2ok2i.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=75142@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tusharhero@sdf.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.