From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51490: Show an indicator when Emacs is busy somewhere in the Emacs window Date: Wed, 21 Sep 2022 16:05:17 +0300 Message-ID: <83bkr8vpwy.fsf@gnu.org> References: <87wnm22q7y.fsf@gnus.org> <83ee8a2pm7.fsf@gnu.org> <87fssq2orj.fsf@gnus.org> <87pmru18xg.fsf@gnus.org> <87lf2i18pv.fsf@gnus.org> <87h7d618j7.fsf@gnus.org> <87bl3e2m1y.fsf@gnus.org> <87pmrtz1y7.fsf@gnus.org> <83pmrt1bsa.fsf@gnu.org> <87y26hxm8a.fsf@gnus.org> <87k0hvviiu.fsf@gnus.org> <87a6iqr8il.fsf@gnus.org> <87r107nmq7.fsf@gnus.org> <83y1uewa55.fsf@gnu.org> <87fsgl7zri.fsf@gnus.org> <83illhueuo.fsf@gnu.org> <87wn9x543a.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7350"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan@marxist.se, 51490@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 21 15:07:18 2022 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 1oazRe-0001gy-K8 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Sep 2022 15:07:18 +0200 Original-Received: from localhost ([::1]:41906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oazRc-0005x9-Bt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Sep 2022 09:07:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oazQR-0005vy-6H for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 09:06:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oazQQ-0001ER-RH for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 09:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oazQQ-00077L-H0 for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 09:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 13:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51490 X-GNU-PR-Package: emacs Original-Received: via spool by 51490-submit@debbugs.gnu.org id=B51490.166376555027338 (code B ref 51490); Wed, 21 Sep 2022 13:06:02 +0000 Original-Received: (at 51490) by debbugs.gnu.org; 21 Sep 2022 13:05:50 +0000 Original-Received: from localhost ([127.0.0.1]:32914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazQD-00076s-I6 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 09:05:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazQB-00076e-6G for 51490@debbugs.gnu.org; Wed, 21 Sep 2022 09:05:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oazQ4-00019I-H2; Wed, 21 Sep 2022 09:05:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZP9fdMvMWVyzHtgLCdY4h5m9lZr5V7fJ7u2uJfET14I=; b=eyWLsBd09Vaj 3tJzQLMqyUMSGGkbwsgN3CR4lR1ESkLzV/HsZ169etxf1c7UC7m+hOhylC/vG5BoPYMgCPQSsVgAz dvCjVE5Qk2pLjAzSd1v+nWbwHwkq8Ddcp53C37DrYsP72yoTtfSlZ+egcX0UiNIRYNPh7SVs/PAXf XA2dCR3qpGVZj9JVLiqei5tEdwJIkAKJln69h0RFVz6Qpn5MZb0Eb7//yOmSKMAZ+m86d8xDeHY/k V4BQhD4YYQ8IY8tsye3KYYDlVWok7GfD17y8/OMK+71Pk39/iJHqV/aEITWfwbYltn7jv6axm+Yw5 Q95LyrP7ZRBD2aj6I4rOGA==; Original-Received: from [87.69.77.57] (port=4977 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oazPZ-00052V-4n; Wed, 21 Sep 2022 09:05:32 -0400 In-Reply-To: <87wn9x543a.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 21 Sep 2022 14:01:13 +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" Xref: news.gmane.io gmane.emacs.bugs:243334 Archived-At: > From: Lars Ingebrigtsen > Cc: stefan@marxist.se, 51490@debbugs.gnu.org > Date: Wed, 21 Sep 2022 14:01:13 +0200 > > Eli Zaretskii writes: > > > Mode line is drawn in C, not in Lisp. > > > > And if the problem is that we cannot run the display code, either, > > then how would it help to poke the glyph? It won't be shown on the > > glass, because redisplay cannot run. Right? Or what am I missing? > > Redisplay can run, but we can't run any Lisp code, and the normal > formatting of a mode line does (potentially) run lots of Lisp code, > doesn't it? That's true, but if Lisp cannot run, neither can redisplay. They both access the internal Emacs state: buffers, variables, etc. Even to replace a single glyph, you'd need to access faces, right? Also, poking a single glyph on a GUI frame is unsafe, because no one can be sure the new glyph will have the same metrics as the old one. So I think if we want some kind of feature that displays progress indicator while Emacs is busy, we'd need to develop it. hourglass-cursor just raises a flag and does it only once, so it can run from an atimer. Anything more complex will probably need another Lisp thread, and calls to synchronization functions (sit-for, thread-yield, etc.) from the main thread. Or something. Or maybe we can run some async subprocess which will display some animation?