From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#75142: 31.0.50; package-refresh-contents is not async when using interactively. Date: Sat, 04 Jan 2025 12:11:17 +0000 Message-ID: <87cyh2ok2i.fsf@posteo.net> References: <58238e831c03d6a78f50012711eff12c.squirrel@mx.sdf.org> <867c7aeqnj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9686"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75142@debbugs.gnu.org, Stefan Monnier , tusharhero@sdf.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 13:12:27 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tU30z-0002P3-L9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 13:12:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU30n-0005td-0U; Sat, 04 Jan 2025 07:12:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tU30f-0005tA-6D for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 07:12:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tU30c-0007FZ-VS for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 07:12:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=8fPNM9zUX00jSMe7fhpap/pRJjxvNlUtsE1hJNfV8gU=; b=cm8gN5K9YWEF1RT01LIUr/c5+jdrRM3gdWhFiReIDllw63qVG98Pw9P3RXTL3fvTTvHYf2NtM26DGo6nkrmpriG4op7ZvVicyj8QiWN3mv/B4DoZ4EPVAvaKZFGUjTG1IJIdYlZmhZCzZxGE/FeplVJupxPYtzbYh4hmzbwrqYLJUfhYdZ6yZnwqX2ykH647CwxWoiNGdp//F49/DKd+gnvuE8eK3hHu4R8xqSvyQMRt76cEe14pd1MFcDSutpe7CHWDNkED3EhH4bc0LMvuGcoT+z7RqBwTIMnkm7iyJejh3Y0Ir9E2yu9kqYS52yR0AAPVo98UqUnN8gAyPj0qfA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tU30c-0004X5-DJ for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 07:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 12:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75142 X-GNU-PR-Package: emacs Original-Received: via spool by 75142-submit@debbugs.gnu.org id=B75142.173599268917376 (code B ref 75142); Sat, 04 Jan 2025 12:12:02 +0000 Original-Received: (at 75142) by debbugs.gnu.org; 4 Jan 2025 12:11:29 +0000 Original-Received: from localhost ([127.0.0.1]:53754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU304-0004WC-Dv for submit@debbugs.gnu.org; Sat, 04 Jan 2025 07:11:28 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:41503) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tU302-0004Vx-6D for 75142@debbugs.gnu.org; Sat, 04 Jan 2025 07:11:27 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DB6C7240027 for <75142@debbugs.gnu.org>; Sat, 4 Jan 2025 13:11:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735992679; bh=r63pFuQMGT0aA1Elg4zGiCa9uZbt1xWmxb1VO/Njrno=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=ldtBaQDf350YdLB4ve6BlLXDNIgbL8riTnp51fJzEFNf2WAjK27GSZZKnKAjHA5ye fG00oL8tCbYhWOqkDiRlzYvSvwcwzvpxdB7Ntt0uDR4BwFOlmcLIRZ82X57/RqtAOq /tQIWg0vShKzi1Tk9yKsA721mdZ6hYP+YJb9fmLPAZgSZaXpNLZjtIHgpPD1qonLW+ Ye6txNyt2cfRYBZ+lRANdOsDtJIoMR0rGZcy22n/LTSbEn9rVi2V5m5n2bwMyyLA2u GQpkGfq+w/GHcIx9ySn4iOh2vE8IWG4JIIEuUtRHqXGYjN6hUPR2e8Uy5AKUBnNbr3 VyWFCTpQ38UGQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YQK6Z2dCwz9rxF; Sat, 4 Jan 2025 13:11:18 +0100 (CET) In-Reply-To: <867c7aeqnj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jan 2025 13:59:12 +0200") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298384 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii 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" >> >> >> 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: --=-=-= Content-Type: text/plain Content-Disposition: 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" --=-=-=--