[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40774: Error messages shouldn't be hidden when the user is idle
From: |
Lars Ingebrigtsen |
Subject: |
bug#40774: Error messages shouldn't be hidden when the user is idle |
Date: |
Thu, 20 Aug 2020 15:41:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
> I see now what you mean. This can be easily implemented with the
> following patch. So you can set `clear-message-function' to a function
> that returns a non-nil, and the echo area won't be cleared.
>
> Such predicate function could contain a complex logic, but for testing
> you could use just:
>
> (setq clear-message-function (lambda () t))
[...]
> - safe_call (1, Vclear_message_function);
> + preserve = safe_call (1, Vclear_message_function);
> unbind_to (count, Qnil);
> }
> +
> + if (NILP (preserve))
> + {
> + echo_area_buffer[0] = Qnil;
> + message_cleared_p = true;
> + }
It an interesting idea, but I don't think this would be a
backwards-compatible implementation. Today, the return value of
clear-message-function isn't used, so we have to assume that users of
that variable returns... whatever. Giving it semantics now would lead
to the message area being preserved unexpectedly.
Or not, if somebody has used that function to semi-clear the echo area,
and then return nil?
So this would have to be implemented in a different way, unfortunately,
I think.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#40774: Error messages shouldn't be hidden when the user is idle,
Lars Ingebrigtsen <=