From: Juri Linkov <juri@linkov.net>
To: 60015@debbugs.gnu.org
Subject: bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer
Date: Mon, 12 Dec 2022 20:03:41 +0200 [thread overview]
Message-ID: <86y1rco5xe.fsf@mail.linkov.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: set-multi-message.patch --]
[-- Type: text/x-diff, Size: 1121 bytes --]
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.
next reply other threads:[~2022-12-12 18:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 18:03 Juri Linkov [this message]
2022-12-12 18:19 ` bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer Eli Zaretskii
2022-12-12 18:37 ` Juri Linkov
2022-12-12 19:20 ` Eli Zaretskii
2022-12-13 17:20 ` Juri Linkov
2022-12-13 17:44 ` Eli Zaretskii
2022-12-13 17:56 ` Juri Linkov
2022-12-15 7:44 ` Juri Linkov
2022-12-15 10:18 ` martin rudalics
2022-12-15 13:36 ` Eli Zaretskii
2022-12-15 14:30 ` Eli Zaretskii
2022-12-15 15:07 ` martin rudalics
2022-12-15 15:12 ` martin rudalics
2022-12-15 15:30 ` Eli Zaretskii
2022-12-15 17:35 ` Juri Linkov
2022-12-17 17:39 ` Juri Linkov
2022-12-17 18:45 ` Eli Zaretskii
2022-12-15 16:44 ` Gregory Heytings
2022-12-15 17:03 ` Eli Zaretskii
2022-12-15 17:37 ` Juri Linkov
2022-12-15 21:52 ` Gregory Heytings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y1rco5xe.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=60015@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).