bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Juri Linkov
Subject: bug#40774: Error messages shouldn't be hidden when the user is idle
Date: Mon, 13 Dec 2021 20:50:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> >> > Btw, what does the change of the order between the call of
>> >> > clear-message-function and setting echo_area_buffer[0] to nil mean,
>> >> > compatibility-wise? won't it also produce different results, even if
>> >> > the return value is nil?
>> >>
>> >> When the return value is nil, it will still clear the echo area.
>> >
>> > That wasn't what I asked.  I asked whether the change in the order
>> > could matter.  Specifically, we now set echo_area_buffer[0] to nil
>> > after we run clear-message-function, not before.  Can that affect
>> > some customization of clear-message-function?
>>
>> Actually, it should not affect customizations because such customizations
>> should not touch the echo-area.  It's the task of clear_message
>> to handle the echo-area.
>
> Isn't there some Lisp-visible effect of that, like that the echo-area
> will appear empty after the assignment?  If so, then the
> clear-message-function was previously running with the echo-area
> buffer nil, but now it won't.

clear-message-function is not intended to do anything with the echo-area.
Its purpose is to notify a subscriber that the message is going to be cleared,
so the subscriber can e.g. clear the message from the minibuffer, etc.
When the subscriber needs to affect the echo-area, it's the purpose
of the proposed return value not to clear the echo-area when the subscriber
asks so via the return value.

>> >> > IOW, shouldn't we provide some completely different optional feature
>> >> > for this use case?  Like a special buffer that pops up or a special
>> >> > frame?  Echo-area is not suited for showing large chunks of text, and
>> >> > my gut feeling is that we will bump into problems on this path.  E.g.,
>> >> > what happens when there are enough accumulated messages that they can
>> >> > no longer be shown with the maximum allowed height of the mini-window?
>> >>
>> >> This is exactly what functions bound to clear-message-function intended 
>> >> to do.
>> >
>> > ??? This function is about _clearing_ the echo-area, whereas I was
>> > talking about the _display_ in the echo-area.  I'm saying that I'm not
>> > sure echo-area display is suited for the jobs that this bug wants it
>> > to do.  As an example, I asked what would happen when the echo-area
>> > can no longer be resized to accommodate all the messages that were not
>> > cleared.
>>
>> clear-message-function can handle not only echo-area but also e.g.
>> the minibuffer messages.  In case of the returned value, by using
>> 'dont-clear-message' it can sometimes tell the function clear_message
>> to not clear the echo-area, so there are no resizing problems.
>> It doesn't add more lines to the existing echo-area.
>
> I gave an example of how using this for that purpose could be a
> problem, and you responded only to that example.  But the problem that
> bothers me is much more general, and you are silent about that larger
> problem.
>
> I'm asking once again: aren't we trying to use echo-area messages or
> minibuffer messages displayed in the mini-window for a job that they
> weren't intended to do: showing large amounts of messages at the same
> time?

Sorry, I still don't understand what do you mean.  What large amounts
of messages?  At what the same time?  This is completely unclear.
Maybe if you give an example, this could help to understand.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]