unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gregory Heytings <gregory@heytings.org>
Cc: 60015@debbugs.gnu.org, juri@linkov.net
Subject: bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer
Date: Thu, 15 Dec 2022 19:03:30 +0200	[thread overview]
Message-ID: <83v8mck3a5.fsf@gnu.org> (raw)
In-Reply-To: <da0c324f2bb413632bba@heytings.org> (message from Gregory Heytings on Thu, 15 Dec 2022 16:44:29 +0000)

> Date: Thu, 15 Dec 2022 16:44:29 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: Eli Zaretskii <eliz@gnu.org>, 60015@debbugs.gnu.org
> 
> Is this not something that can be solved in set-minibuffer-message, like 
> this:
> 
> diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
> index 6e42296e7ba..c10a6401180 100644
> --- a/lisp/minibuffer.el
> +++ b/lisp/minibuffer.el
> @@ -817,6 +817,11 @@ set-minibuffer-message
>                             ;; Make sure we can put-text-property.
>                             (copy-sequence message)
>                           (concat " [" message "]")))
> +        (let ((window-lines (window-height minibuf-window))
> +              (message-lines (length (split-string message "\n"))))
> +          (when (> message-lines window-lines)
> +            (with-selected-window minibuf-window
> +              (enlarge-window (- message-lines window-lines)))))
>           (unless (or (null minibuffer-message-properties)
>                       ;; Don't overwrite the face properties the caller has set
>                       (text-properties-at 0 message))

This won't catch the case of a single very long line (which wraps to
produce several screen lines).

Also, unconditionally enlarging the mini-window is not a good idea
because it might already be tall enough.  Try the above in the recipe
posted by Juri, but then type "C-c C-c" several times -- doesn't it
keep enlarging the mini-window with each "C-c C-c"?





  reply	other threads:[~2022-12-15 17:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 18:03 bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer Juri Linkov
2022-12-12 18:19 ` 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 [this message]
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=83v8mck3a5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60015@debbugs.gnu.org \
    --cc=gregory@heytings.org \
    --cc=juri@linkov.net \
    /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).