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: Mon, 08 May 2023 19:06:34 +0300 Message-ID: <831qjqdcz9.fsf@gnu.org> References: <87r0rxdwc8.fsf@daniel-mendler.de> <837ctidgab.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25361"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mail@daniel-mendler.de, 63253@debbugs.gnu.org To: Stefan Monnier , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 08 18:06:18 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 1pw3NR-0006Ms-LF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 May 2023 18:06:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pw3NE-0001Hx-0W; Mon, 08 May 2023 12:06: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 1pw3NC-0001Hc-Sy for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 12:06: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 1pw3NC-0006Yy-Jg for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 12:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pw3NB-0004Pl-Oa for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 12:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 May 2023 16:06:01 +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.168356194516943 (code B ref 63253); Mon, 08 May 2023 16:06:01 +0000 Original-Received: (at 63253) by debbugs.gnu.org; 8 May 2023 16:05:45 +0000 Original-Received: from localhost ([127.0.0.1]:41392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw3Mu-0004PC-Ik for submit@debbugs.gnu.org; Mon, 08 May 2023 12:05:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw3Ms-0004Ox-9U for 63253@debbugs.gnu.org; Mon, 08 May 2023 12:05:43 -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 1pw3Mk-0006Rl-Dl; Mon, 08 May 2023 12:05:34 -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=t7z1OXxj+QTcH7PhXNQ3ETdudSxhGsZCg6T/XzTxN2s=; b=qu2j+mYktBoH wqpPlyhJsRnZvja8/if+ZQ0myMQbAH6oG72NVm3f5p2YXvX4CIRVmB4ybKQL0X2uQJFFUMYnQTpJt 5Ru3m+4qQ4r8vIng4fHzmjTa7GbxXy2wyJSYUtijlDKS7ZvJKRgROBEEyNqVqYev1uKGcsjJmtRpQ PbneDFPqNxYoesc+Jo4STI7O17igK8QRman/fFmUrGPN/LMww94RuyLILloR5bG9YtFaWOIiG/Q+h tvbNKxTxeiJTJb0eb97AUJkz5SLS0DyGt8HVL4xmu8cLb2haKqAo755u8u34nXm5dk+Jw5uD2KQVz 6pJWDy1fPHLZ7MEdfLi+AA==; 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 1pw3Mj-0004aR-TY; Mon, 08 May 2023 12:05:34 -0400 In-Reply-To: (message from Stefan Monnier on Mon, 08 May 2023 11:13:37 -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:261343 Archived-At: > From: Stefan Monnier > Cc: mail@daniel-mendler.de, 63253@debbugs.gnu.org > Date: Mon, 08 May 2023 11:13:37 -0400 > > >> So `set-message-function` is "dangerous" because it runs ELisp code from > >> `message3` => `message3_nolog` => `set_message`. > > > > So I guess we need to have run_timers bind some variable, and then in > > set_message, if that variable is non-nil, we should avoid calling > > functions from set-message-function? > > That's probably the best short-term workaround, yes. > > The quick hack below seems to avoid the problem for me (at the cost of > ignoring `inhibit-message` for the `with-delayed-message`s). Thanks, I think you should install this on the emacs-29 branch. And I think a similar change is needed in clear_message, so it doesn't call clear-message-function. But what does this mean for with-delayed-message and funcall-with-delayed-message? These were introduced in Emacs 29, but if we say that atimers cannot be used to safely run arbitrary Lisp, then we should somehow make them safer, perhaps by having in with_delayed_message_display a subset of code message3, without the calls to Lisp. WDYT?