[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intelligent stacking of messages in the echo area
From: |
Juri Linkov |
Subject: |
Re: Intelligent stacking of messages in the echo area |
Date: |
Wed, 25 Dec 2019 02:15:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> I was testing the code for a while.
> There seem to be one irritating (for me) problem with the way
> set-message-function is implemented.
> When I run a command changing current buffer and emitting multiple
> messages, emacs frame is redrawn every time a new message comes out.
> Specifically, I was running org-capture, which changes windows
> configuration, switches to different buffer, and emits multiple messages
> while running. Normally, it runs very fast (the capture template I used
> does not require any user input), but with multi-message, I can see the
> frame being redrawn on every new message popping up. Since window
> configuration is different, full redraw is forced and the whole
> org-capture runs a lot slower.
Maybe this is because multi-line messages resize the echo-area window
every time a new message line is added (when resize-mini-windows is non-nil),
so height changes of the echo-area window invoke
window-configuration-change-hook.
It seems the same problem existed for a long time, but had no noticeable effect
because multi-line messages were rare.
Now for the multi-message feature where multi-line messages are
not an exception but a rule, one way to mitigate it is to use
a message separator other than a newline, e.g.
(setq multi-message-separator (propertize ";" 'face 'minibuffer-prompt))
In a wide frame, one echo-area line can accommodate several short messages
without resizing the echo-area window.