all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ynyaaa@gmail.com
To: Eli Zaretskii <eliz@gnu.org>
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: Fri, 20 Dec 2019 11:16:31 +0900	[thread overview]
Message-ID: <86fthfu3qe.fsf@gmail.com> (raw)
In-Reply-To: <83sglh3897.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Dec 2019 18:31:48 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> 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.

With (setq resize-mini-windows t), the key sequence below shows message
in one-line window. Then input motion commands and the minibuffer is
redisplayed in one-line window. Eval: prompt is hidden.

M-:
C-q C-j
?a
C-x C-e





  reply	other threads:[~2019-12-20  2:16 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
2019-12-20  2:16         ` ynyaaa [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fthfu3qe.fsf@gmail.com \
    --to=ynyaaa@gmail.com \
    --cc=38645@debbugs.gnu.org \
    --cc=eliz@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.