From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75142: 31.0.50; package-refresh-contents is not async when using interactively. Date: Sat, 04 Jan 2025 10:46:05 -0500 Message-ID: References: <58238e831c03d6a78f50012711eff12c.squirrel@mx.sdf.org> <867c7aeqnj.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18069"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 75142@debbugs.gnu.org, Philip Kaludercic , 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 16:47:17 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 1tU6Mv-0004XK-16 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 16:47:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU6Mi-0006d4-ME; Sat, 04 Jan 2025 10:47:04 -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 1tU6Mg-0006cu-QP for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 10:47:03 -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 1tU6Mg-00020M-I8 for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 10:47:02 -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=jxRV98ycox1Dvu65yrt7omGShVQmlSL7sDzbgSjRpd8=; b=n3N1l0+3ylrqw5UzOMJ6XHzM4QWWDZKad0xcH5vxIj+i2DdQnwZwi1vh26MM9MSAPIPKbOJQhQhJ03nQJoIMQ1vQg/L5O7EvP94lGahdYoN6jBpbXYg/8tpVdD2UO8tItgBzjWS80F7jKvAvgQsWR3kIUn7KvnNG/wA0cjLY71Y6goe2LtjJ0kFoOUDuNj9rV0nuGagbELET6mYhrcqi40r+1OSsbZfsx98vCe2cytPP173aNOAhdt68II4UPMlFAJ6trP+z73wmB4PadKzL9Sn3cBRrLRtc+fK0llELexyaQ16wb/dXvthBRM/uWurkX/wK5w/lxbeV7qn+/e90Ew==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tU6Mg-000773-3E for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 10:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 15:47: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.173600558727288 (code B ref 75142); Sat, 04 Jan 2025 15:47:02 +0000 Original-Received: (at 75142) by debbugs.gnu.org; 4 Jan 2025 15:46:27 +0000 Original-Received: from localhost ([127.0.0.1]:56752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU6M6-000761-IQ for submit@debbugs.gnu.org; Sat, 04 Jan 2025 10:46:27 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64168) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tU6M2-00075k-4f for 75142@debbugs.gnu.org; Sat, 04 Jan 2025 10:46:24 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D9521807F5; Sat, 4 Jan 2025 10:46:15 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1736005566; bh=MW4gGYGlDjq9h7Qtjsxwy/fAEYj8SYWouXYIUSdm2p8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YZtkb/f8jU/Z3WZvVV74PUAMqb6G//wZAP2saGp2Ee+eZ/p2c7kis/jgx/r8xZyXE etnEMzbqpV+oT59XUG6e8KNoqXoiY8vy5zptmnQV4mT6knpnYuXCmp74F4lGroq0Wv OMX+fc2qgqg+rTh/Y7XqHyOT0S+xQJLOb9KGL10TMTh7MpvIJ/Hk3VpCN6/rozbipM 3E1w4ZPn6AjC5BUeoN3oHwl/z19/c1fvIfuX9NYqKeTEZXFYZg3iZlSFWNg9VJP5Jr C9KziFF+DdwiYktMsQHr0zsm7X/hSuT1hCuxw5mQlkrZjFKJv3MtRyeERKnvGNK6Mo P2FcmDbfOyu1g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87DDF806BF; Sat, 4 Jan 2025 10:46:06 -0500 (EST) Original-Received: from alfajor (104-195-236-84.cpe.teksavvy.com [104.195.236.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 371671204BA; Sat, 4 Jan 2025 10:46:06 -0500 (EST) In-Reply-To: <867c7aeqnj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jan 2025 13:59:12 +0200") 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:298423 Archived-At: >> 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? I guess it would make sense to run it asynchronously when called interactively, but in that case we should emit messages that clarify what going on, e.g. a first (synchronous) "Refreshing in the background..." followed by "Refreshing packages completed" at the end. Stefan