From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#38966: 27.0.60; Assertion failure in set_cursor_from_row Date: Mon, 6 Jan 2020 20:06:21 +0100 Message-ID: <12ea3c04-249a-96da-8c88-52dcb5ca8b66@gmx.at> References: <497636f5-1728-1e7e-b826-8310e2a6fe13@gmx.at> <83lfqkecc6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------21C8625A8A7B55E7B3D33EB7" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="133781"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38966@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 06 20:12:56 2020 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 1ioXo4-000YZO-QG for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2020 20:12:52 +0100 Original-Received: from localhost ([::1]:58572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioXo3-0006z2-42 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2020 14:12:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60282) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioXiS-0006jy-0m for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 14:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioXiQ-0006mr-KB for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 14:07:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ioXiQ-0006mY-Gb for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 14:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ioXiQ-0005DK-CC for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 14:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jan 2020 19:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38966 X-GNU-PR-Package: emacs Original-Received: via spool by 38966-submit@debbugs.gnu.org id=B38966.157833759120005 (code B ref 38966); Mon, 06 Jan 2020 19:07:02 +0000 Original-Received: (at 38966) by debbugs.gnu.org; 6 Jan 2020 19:06:31 +0000 Original-Received: from localhost ([127.0.0.1]:46819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioXhu-0005Cb-M3 for submit@debbugs.gnu.org; Mon, 06 Jan 2020 14:06:30 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:46147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioXht-0005CO-6l for 38966@debbugs.gnu.org; Mon, 06 Jan 2020 14:06:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578337582; bh=8g731mT0QH+EyixjFKWbjHElOtUXEfLNnwy+P3AfjTw=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=AvCb3zc3XM+2pIuGJaoVbe+Kma8ls4DgzvtNxD2lOEXCZV+jA0LDfei2FqkfYq6jU wwFaqAFEPacgbCqlbFAcj14QNsJQyHAx9hnPThZLnywq06sKtsgmo8stUn0H3PWRcv ONYS2SFNUOyhO3pjfn9OBzonH0RAOfuFYDdeYYvE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.79]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mjj87-1jXp0H2Gxn-00lEDM; Mon, 06 Jan 2020 20:06:22 +0100 In-Reply-To: <83lfqkecc6.fsf@gnu.org> Content-Language: de-AT X-Provags-ID: V03:K1:L325HHkKhCcIFLnbsxaGiVHlbjFy166vdMw12RK3fZ0HMt2wklS jBxVNec9G2IzLsT0/dhJuQsSkyFGxwMXyA/J8siXGCVVaCqnE1GgxWoo5AdYuZuLd3AkI4G 35WajQ1MLmqzdj/GDMCdB1Ei6v58ppxC2nCK4KAfv5rsNsD2gViM3QCQCrMVjReyyuyBUoX P+ljhStheLVVHlbSXDtHA== X-UI-Out-Filterresults: notjunk:1;V03:K0:xUOpNmL+Ntc=:7sMuA2/4/3Os0L/wD8L7ej syujldc5bP0tbXe3//Jl0/ud5H9q0CbvQ4KpXSkLSX2clSs5kuvkNs2w1dyRH9TE6UEiiseTV hfp7HRyC1YqtlMIviAE2fM+jm0NC0QameAXxrqB6tw5UwLzPO8ydH/od809cq86A+1oNft9n+ 4VlX/GHQDTDEkoQnUwO8LoLdwkRW8KYCJH0Xqy6EcXd1XALQQOCYu0uANTcNgKvU22CZZDfG+ LZwOEw7YVfBrbbLNFrhKl/2/GhESpSnkM3y5yjB58vO0aIkj029dBpTWS0p4XmgX7Q5Gq875Q Xuiw5gjk7nVfZvp5C7l4bSioVoBS1OnZkcYIpF0BkKO2MgKN/eCJGatototBswdlfEg2xfPkx NQ/jsntBRv7C5BEGl+fi4vXAZtlqnp5+FjU7GV6JRbt/HaV3kGfKB1hBPIdMJt+g04LdaO1P9 RzOUvNM0qYeqofbxrxc2mIMbkdklWLmxonthPcA76JyaPfRsZ7dvDFXg8M4/mWrEmTtv0UZ18 sXuu+fr/Ww89UOVO5jc/XuLd+1IIWGSqcIierqu0h3c4EHGBhEyhdYO+zJv/V5ET7YrSfFiQk cW+H6OWMDo62E7wBHzsSYpdncoLJmbLnbnTsRfUnt2+7PFSX3y2Q7HaJP0jv458nHV3r3Gq3k DVsayqvYlcbjCDVB39u8R9DOEQBO1Ps58MdPmURbZDsET67Sz5+7lsU2DEGIyCPxTdqFyQmCe S8a8EgmMnzfc1PA/YaRbhEntqRXnBiorjPB5feA6XXPug7QMsEvUNZM/+LEmClb6UKyfLvKE 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:174261 Archived-At: This is a multi-part message in MIME format. --------------21C8625A8A7B55E7B3D33EB7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > I don't expect to have a window that has no lines showing text. I > believe we don't allow creation/resizing of windows to such a small > size? If that's not guaranteed, I'm okay with adding an assertion > somewhere, but that would be a separate problem: we never expected > such a calamity even before tab-lines were added. We did. Try with emacs 26 loading my old test-popup-2.el (attached once more). Type C-x 2 and make the lower window as low as you can. Now hit F2. The lower window shows no text. So we did allow windows showing no text before and I see no reason why we should call that a calamity. Rather, we should eliminate all assertions that forbid zero size windows and simply not draw a cursor when a window's body shrinks to zero pixels. All applications I know of tolerate such zero size "windows". I plan a slight modification that would allow the minibuffer window to shrink to zero lines whenever it's not used. OTOH, zero size "normal" windows would allow to show the minibuffer window in a frame that can acommodate only one or two lines. > If we don't call set_cursor_from_row, we will not have a cursor > displayed where it should be, which is a display bug in and of itself. Isn't that statement overly conservative? Sooner or later, Emacs will at least have to allow a mode where the region is not destroyed when a window is scrolled, allowing the cursor to disappear from the visible part of its buffer. We should keep Emacs distinctive. But being distinctive doesn't necessarily mean to be restrictive. >> BTW: I would also recommend to rename mode_line_p to something like >> say "no_text_line_p". Presently, people like me not used to hack the >> display code, might consider mode_line_p verbatim and not apply its >> semantics to header or tab lines. > > Sorry, but that ship sailed a long time ago. You will have to make do > with the comments in dispextern.h, which document this weirdness. Which comment? In either case, rest assured that ordinary people will have considerable troubles understanding code like the proposed if (row->tab_line_p) ++row; if (row->mode_line_p) ++row; Notwithstanding my concerns, the patch fixes the bug here. Many thanks, martin --------------21C8625A8A7B55E7B3D33EB7 Content-Type: text/plain; charset=UTF-8; name="test-popup-2.el" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test-popup-2.el" KHNldC1mcmFtZS1wb3NpdGlvbiBuaWwgMCAwKQ0KKHN3aXRjaC10by1idWZmZXIgKGZpbmQt ZmlsZS1ub3NlbGVjdCAiYzovdGVtcC90ZXN0LXBvcHVwLmVsIikpDQooc2V0cSB3aW5kb3ct cmVzaXplLXBpeGVsd2lzZSB0KQ0KKHNldHEgd2luZG93LW1pbi1oZWlnaHQgMCkNCihzZXQt d2luZG93LXNjcm9sbC1iYXJzIChtaW5pYnVmZmVyLXdpbmRvdykgMCBuaWwgMCBuaWwpDQoo ZGVmdmFyIG9sZC1tb2RlLWxpbmUtZm9ybWF0IG1vZGUtbGluZS1mb3JtYXQpDQoNCihkZWZ1 biBmb28tbWVzc2FnZSAoJm9wdGlvbmFsIG5ld2xpbmUpDQogIChtZXNzYWdlDQogICAoY29u Y2F0IChpZiBuZXdsaW5lICJcbiIgIiIpDQoJICAgInRvdGFsOiAlcywgYm9keTogJXMsIG1v ZGU6ICVzIikNCiAgICh3aW5kb3ctcGl4ZWwtaGVpZ2h0KSAod2luZG93LWJvZHktaGVpZ2h0 IG5pbCB0KQ0KICAgKHdpbmR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