From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24293: 25.1; Display bug: icomplete prompt not visible with icomplete-separator "\n" Date: Tue, 23 Aug 2016 19:18:48 +0300 Message-ID: <83d1kzfogn.fsf@gnu.org> References: <87r39fxzg3.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1471969163 25327 195.159.176.226 (23 Aug 2016 16:19:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Aug 2016 16:19:23 +0000 (UTC) Cc: 24293@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 23 18:19:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcEPy-0005uh-8u for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Aug 2016 18:19:14 +0200 Original-Received: from localhost ([::1]:47363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcEPv-0002ZX-IQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Aug 2016 12:19:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcEPq-0002ZI-8A for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 12:19:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcEPl-0003gS-Sv for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 12:19:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcEPl-0003gM-Pa for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 12:19:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bcEPl-00051u-JP for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 12:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Aug 2016 16:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24293 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24293-submit@debbugs.gnu.org id=B24293.147196912519313 (code B ref 24293); Tue, 23 Aug 2016 16:19:01 +0000 Original-Received: (at 24293) by debbugs.gnu.org; 23 Aug 2016 16:18:45 +0000 Original-Received: from localhost ([127.0.0.1]:38087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcEPV-00051P-9v for submit@debbugs.gnu.org; Tue, 23 Aug 2016 12:18:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcEPT-00051B-IA for 24293@debbugs.gnu.org; Tue, 23 Aug 2016 12:18:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcEPK-0003cF-UB for 24293@debbugs.gnu.org; Tue, 23 Aug 2016 12:18:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcEPK-0003bz-Qw; Tue, 23 Aug 2016 12:18:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4789 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bcEPJ-0006RI-2f; Tue, 23 Aug 2016 12:18:33 -0400 In-reply-to: <87r39fxzg3.fsf@web.de> (message from Michael Heerdegen on Tue, 23 Aug 2016 17:44:12 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:122552 Archived-At: > From: Michael Heerdegen > Cc: Eli Zaretskii > Date: Tue, 23 Aug 2016 17:44:12 +0200 > > In emacs -Q, eval > > (setq icomplete-separator "\n") > > and do > > M-x icomplete-mode > > Then, e.g. > > M-x m > > The icomplete minibuffer prompt is invisible (bug). > > But you see that it's "there" when you hit . And changing the > value of `resize-mini-windows' to nil makes the issue disappear - so I > think this is caused by a problem in the display code. Surprisingly, stepping through the code with a debugger reveals that this is not a bug, but (almost) deliberate behavior. Set max-mini-window-height to 0.9, and you will see the entire prompt. The default value of that variable is 0.25, so Emacs doesn't resize mini-windows to more than 1/4th of the height of the frame's root window. And the height required to show the prompt is much larger in this case. So the mini-window is only resized to 9 lines, and Emacs then attempts to show the last part of the minibuffer text that fits in the mini-window. You can see this in action if you evaluate this: (message "1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n1\n") What happens next is that the after-string causes the display to start at the beginning of the string, because Emacs cannot start the window's display in the middle of an overlay string. So what is actually shown is not the end, but the middle of the overlay string. Not sure what, if anything, to do with this. IMO, in this situation showing anything at all will not serve the user well enough, so I tend to do nothing and argue that displaying minibuffer text that requires so many lines cannot possibly work well anyway, and when the text ends with a multi-line overlay string, we hit a limitation of the display engine. Thanks.