GNU bug report logs -
#60015
29.0.60; multi-line messages truncated in non-selected minibuffer
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Mon, 12 Dec 2022 18:08:02 UTC
Severity: normal
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
0. emacs -Q
1. (run-with-timer 5 5 'message "abc\ndef")
2. then activate the minibuffer and switch back to the original buffer
3. after some time observe that only the first line of the multi-line message
is displayed in the minibuffer
I don't know where this problem comes from, but it's impossible to use
edebug to debug minibuffer-related bugs while the minibuffer is active,
because only an old message is displayed, not the most recent,
when using set-multi-message to collect messages. So here is
at least the fix for set-multi-message:
[set-multi-message.patch (text/x-diff, inline)]
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index cfdf2b43f42..36553eca1ad 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -914,6 +914,11 @@ set-multi-message
"Return recent messages as one string to display in the echo area.
Note that this feature works best only when `resize-mini-windows'
is at its default value `grow-only'."
+ (if (and (active-minibuffer-window) (not (minibufferp)))
+ ;; Multi-line messages are limited to one line only
+ ;; when the minibuffer window is active and not selected.
+ ;; So don't return a multi-line string in this case:
+ message
(let ((last-message (car multi-message-list)))
(unless (and last-message (equal message (aref last-message 1)))
(when last-message
@@ -931,7 +936,7 @@ set-multi-message
(setf (nthcdr multi-message-max multi-message-list) nil)))
(mapconcat (lambda (m) (aref m 1))
(reverse multi-message-list)
- multi-message-separator)))
+ multi-message-separator))))
(defun clear-minibuffer-message ()
"Clear minibuffer message.
This bug report was last modified 2 years and 151 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.