From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: ynyaaa@gmail.com Newsgroups: gmane.emacs.bugs 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 Message-ID: <86fthfu3qe.fsf@gmail.com> References: <86v9qfo39u.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="87926"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38645@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 20 03:33:21 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ii86Q-000Mi9-LQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2019 03:33:18 +0100 Original-Received: from localhost ([::1]:49994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ii86O-0001k9-RU for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Dec 2019 21:33:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45908) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ii86B-0001jo-O1 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 21:33:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ii86A-0000Am-9w for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 21:33:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39817) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ii869-000097-T0 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 21:33:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ii869-0003VW-M6 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 21:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ynyaaa@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2019 02:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38645 X-GNU-PR-Package: emacs Original-Received: via spool by 38645-submit@debbugs.gnu.org id=B38645.157680914313433 (code B ref 38645); Fri, 20 Dec 2019 02:33:01 +0000 Original-Received: (at 38645) by debbugs.gnu.org; 20 Dec 2019 02:32:23 +0000 Original-Received: from localhost ([127.0.0.1]:45789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii85X-0003Ub-3C for submit@debbugs.gnu.org; Thu, 19 Dec 2019 21:32:23 -0500 Original-Received: from mail-pg1-f170.google.com ([209.85.215.170]:40708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii85U-0003UL-OY for 38645@debbugs.gnu.org; Thu, 19 Dec 2019 21:32:21 -0500 Original-Received: by mail-pg1-f170.google.com with SMTP id k25so4155924pgt.7 for <38645@debbugs.gnu.org>; Thu, 19 Dec 2019 18:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version; bh=Rq4kOcfMdolTXaj8uZ2EI9IJajtedKe9lvy18JmLKZk=; b=ZK3fRT08o3JHEgwHIz0pTwlNouH4/d4PuYztyoeb8N6+LA5cRDz5LdSaDkbpaTxHRB Sy7K2LgQOAmunVFgNU6gJzpk67DeL3O/sVpe5V3zczr96daiPDyZPx44bcw+pORYC5xf sw5lNV6NkC9R4uoicNSDDBYTeFaU9emwKPv3Lb7XlS3nxxqMd2v5ogCkStcEUodC+neg G9V+FcY/1Cj+/TCzdusg+hV0UZBhxXmwFo9qEzJI5/yK9gCpLUjxDfF9NPaBcsiVbud6 wmX4sURjxDx2kvhGKBpqqE07NeQ5r9VkSwnJzzaUVL4MEtvIoTgy0v6+t/p1aPf6FhuQ 4ZcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=Rq4kOcfMdolTXaj8uZ2EI9IJajtedKe9lvy18JmLKZk=; b=D2imO3g/Ide4tduvD/wz8rZDXsArM8UaU+Rorex5Sin6e8ngHf5SUnPyGb1ZalkdmF 79n/R13AOtgNQJcrKvqu4hKFqNroN8Z22Ef02KMSO9i9FfmzM9PcLax+Ns4w8YPEVBfj bJWzecHjObZzOeWVNkkTAf4LeSyGvA8bF8ImYPcS9VS3GA7u6I8A7aGWWLxdyszClwFV YGa6Aaz4kcdsYIXVRQwtlkktfpyXLjDVDGD1DIHoaaBCAQy3PX0amhdg9mGmT61A4zgT DBgJp8uBRlRtoGgQU3EUDElfOMUNk2ONftRbQ/vdP7CZFZ1R/GYWusNjNRnLjgHtIRLr BbFQ== X-Gm-Message-State: APjAAAWA8nDm9knbPNHxXwqTP7hdwFKe3eqDQfZIw8UhEscdS2brYJ8O osax+Pclc28938HKvEvykkuGFk9t X-Google-Smtp-Source: APXvYqy15hXGCKk6VTtJ5nNbRLAHK6Jkvj4E0tuFdj2igTbieS42vxyscseDlL01RaDJFxHuahd9iQ== X-Received: by 2002:a63:b4d:: with SMTP id a13mr12067097pgl.388.1576809134496; Thu, 19 Dec 2019 18:32:14 -0800 (PST) Original-Received: from HP (east42-p111.eaccess.hi-ho.ne.jp. [219.121.173.112]) by smtp.gmail.com with ESMTPSA id j21sm9550801pfe.175.2019.12.19.18.32.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Dec 2019 18:32:13 -0800 (PST) In-Reply-To: <83sglh3897.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Dec 2019 18:31:48 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173566 Archived-At: Eli Zaretskii 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