From: Eli Zaretskii <eliz@gnu.org>
To: ynyaaa@gmail.com
Cc: 38645@debbugs.gnu.org
Subject: bug#38645: 26.3; minibuffer input is called with multi-line window when multi-line message is shown
Date: Wed, 18 Dec 2019 18:31:48 +0200 [thread overview]
Message-ID: <83sglh3897.fsf@gnu.org> (raw)
In-Reply-To: <86r211sy6b.fsf@gmail.com> (ynyaaa@gmail.com)
> From: ynyaaa@gmail.com
> Cc: bug-gnu-emacs@gnu.org, 38645@debbugs.gnu.org
> Date: Wed, 18 Dec 2019 19:52:44 +0900
>
> Evaluate the form below and type 3 2 1, minibuffer window shrinks each
> time. This behavior is inconsistent with read-string.
> To check echo area contents just before read-string, type 3 4
> and the tmp variable value is nil, which indicates that the echo area
> has been cleared without shrinking the minibuffer window.
>
> (let ((buf (generate-new-buffer "tmp"))
> (map (make-sparse-keymap)))
> (switch-to-buffer buf)
> (define-key map "1" (lambda () (interactive) (message "1")))
> (define-key map "2" (lambda () (interactive) (message "a\nb")))
> (define-key map "3" (lambda () (interactive) (message "A\nB\nC")))
> (define-key map "4" (lambda () (interactive)
> (let ((tmp (current-message)))
> (read-string "input: ")
> (message "tmp: %s" tmp))))
> (use-local-map map))
>
>
> By the way, read-string with empty PROMPT make the minibuffer window
> shrink.
>
> (progn
> (message "1\n2")
> (read-string ""))
>
> Also it make the window shrink when all the minibuffer content is
> deleted, even though read-string is not finished.
>
> M-: (read-string "") RET
> C-q C-j
> C-q C-j
> DEL
> DEL
I still fail to see the problem in these use cases. Is the problem
that from your POV the behavior wrt shrinking the mini-window happens
sometimes, but not always? If so, this is not a bug: by default Emacs
does not try too hard to do so, although when a command finishes and
Emacs runs a full redisplay cycle, it usually does shrink it. If you
set resize-mini-windows to t, it tries harder, and will shrink in many
cases even in the middle of a running command.
Also please keep in mind that the mini-window shows not only the echo
area, but also the minibuffer (when it's active), so the fact that the
echo-area message has been cleared does not yet mean the mini-window
can be shrunk -- if the minibuffer is active, it usually won't be.
At this point please tell if you have real-life use cases where this
behavior causes real problems, like concealing some part of the
echo-area message, and if so, please describe those real-life use
cases. If this is just about consistency, I tend not to touch this
area of the display engine, as it is somewhat delicate and easy to
break.
Thanks.
next prev parent reply other threads:[~2019-12-18 16:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 6:49 bug#38645: 26.3; minibuffer input is called with multi-line window when multi-line message is shown ynyaaa
2019-12-17 7:41 ` Eli Zaretskii
2019-12-17 11:55 ` ynyaaa
2019-12-17 12:07 ` Eli Zaretskii
2019-12-18 10:52 ` ynyaaa
2019-12-18 16:31 ` Eli Zaretskii [this message]
2019-12-20 2:16 ` ynyaaa
2019-12-26 20:49 ` Eli Zaretskii
2019-12-27 9:12 ` martin rudalics
2019-12-27 9:21 ` Eli Zaretskii
2019-12-27 9:46 ` martin rudalics
2019-12-27 10:29 ` Eli Zaretskii
2019-12-29 14:15 ` Eli Zaretskii
2019-12-29 18:33 ` martin rudalics
2019-12-29 18:50 ` Eli Zaretskii
2019-12-29 19:30 ` martin rudalics
2019-12-30 16:07 ` Eli Zaretskii
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=83sglh3897.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=38645@debbugs.gnu.org \
--cc=ynyaaa@gmail.com \
/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).