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#63253: 29.0.90; with-delayed-message fails in combination with inhibit-message Date: Thu, 11 May 2023 18:55:41 +0300 Message-ID: <83zg6a50ci.fsf@gnu.org> References: <87r0rxdwc8.fsf@daniel-mendler.de> <837ctidgab.fsf@gnu.org> <831qjqdcz9.fsf@gnu.org> <838rdwa12j.fsf@gnu.org> <83r0ro6v90.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2710"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mail@daniel-mendler.de, larsi@gnus.org, 63253@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 11 17:55:20 2023 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 1px8dU-0000XD-Eh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 May 2023 17:55:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1px8dE-0006LM-Lb; Thu, 11 May 2023 11:55:04 -0400 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 1px8dD-0006LB-EK for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 11:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1px8dC-000592-LZ for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 11:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1px8dC-00055t-2M for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 11:55: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: Thu, 11 May 2023 15:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63253 X-GNU-PR-Package: emacs Original-Received: via spool by 63253-submit@debbugs.gnu.org id=B63253.168382048219447 (code B ref 63253); Thu, 11 May 2023 15:55:02 +0000 Original-Received: (at 63253) by debbugs.gnu.org; 11 May 2023 15:54:42 +0000 Original-Received: from localhost ([127.0.0.1]:53192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px8cr-00053Y-Cj for submit@debbugs.gnu.org; Thu, 11 May 2023 11:54:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px8cp-00052j-Bm for 63253@debbugs.gnu.org; Thu, 11 May 2023 11:54:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px8cj-0004zA-Cz; Thu, 11 May 2023 11:54:33 -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=jg+9B+IabRZHOoL2W08vpEabn1C0LGC+Yla//PMQQ5s=; b=VNeVkMpwZziI ObDoOQzwP6c0JsMdN2cZDBQOZEkKddBPVJ3WEPs1SXcHbhalXr+zsqTiSdThK1+SJL2MIGKKR/N2T TIE0jy/zRMNRWVe1pC94by4r2TRa4ilVwQRDUl6sgSnmexkvdK/3fbgLkl7yImnK1foqVYlihne9z ZLIkqh1zaaZgPQ5NgGN223O8eSOuKovLPdU5A/mhIenpVbgZxt0obkuNF7Ngyq5XOUSlcjUUoBri2 zXwM1XsmGi1YhkMdaZL2YApILZeTDZoC6eE8AoPJtCmIrJhJx4CfARiRwg7NY3lht1+aOekEQ2UW+ 48oiFCbqy5JPPwBuWZbmCg==; Original-Received: from [87.69.77.57] (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 1px8ci-0005k0-T1; Thu, 11 May 2023 11:54:33 -0400 In-Reply-To: (message from Stefan Monnier on Thu, 11 May 2023 11:00:28 -0400) 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:261580 Archived-At: > From: Stefan Monnier > Cc: larsi@gnus.org, mail@daniel-mendler.de, 63253@debbugs.gnu.org > Date: Thu, 11 May 2023 11:00:28 -0400 > > >> Hmm... I think "customizing `set-message-function` for delayed messages" > >> is actually desirable > > > > Why? we use that for a single facility, which has a well-defined > > purpose: show an echo-area message if BODY takes longer than some > > time. Why do we have to allow customization of the message displayed > > by this facility? > > We still want that message to be moved to the end of the minibuffer > when that minibuffer is active, and users may still want to be able > to silence some of those messages. It's highly unlikely that maybe_quit will be called when we are in the minibuffer in recursive-edit, because maybe_quit is called from potentially prolonged processing. As for silencing, I see no reason why these messages should be silenced, since a Lisp program that calls with-delayed-message explicitly wants the message to appear, so as to provide important feedback about some long processing. > > How you envision that FIXME to be fixed, if atimers cannot safely run > > any Lisp? > > Apparently, we do run ELisp code from `maybe_quit` via the GUI's event > handling (according to Po Lu, not just under macOS but also under X11), > so maybe we should strive to make it "safe" to run ELisp from `maybe_quit` > (and hence atimers). > > It's inherently dangerous since it amounts to preemptive concurrency, so > by "safe" I mean that we should strive to make it safe with some > side-conditions about the risks of concurrency bugs. AFAIU, the danger is because some places that call maybe_quit are stateful. So to make that safe, we'd need to save and restore the state around the call, something that could be expensive if at all possible. And having to do that is a misfeature in itself: we just got rid of doing so due to problems with ralloc and stuff, so why would we want to get into another such trouble?