Subject: bug#63253: 29.0.90; with-delayed-message fails in combination with inhibit-message

From: Stefan Monnier <[email-masked]>
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.

>> (which is why I left a FIXME in my patch).
>> So I regard the new behavior as a bug, just one that is hopefully less
>> severe than the problem it intends to avoid.
> 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.

        Stefan