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#33384: [PATCH] Fix zone.el when window is at the bottom of the buffer Date: Sun, 18 Nov 2018 21:43:52 +0200 Message-ID: <837ehatblz.fsf@gnu.org> References: <20181114154802.16132-1-thomas.de.beauchene@gmail.com> <83a7m976rw.fsf@gnu.org> <838t1tuls2.fsf@gnu.org> <83tvkgu7cf.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1542570126 5315 195.159.176.226 (18 Nov 2018 19:42:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Nov 2018 19:42:06 +0000 (UTC) Cc: 33384@debbugs.gnu.org To: Thomas de Beauchene Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 18 20:42:02 2018 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 1gOSxG-0001FC-EY for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Nov 2018 20:42:02 +0100 Original-Received: from localhost ([::1]:53193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOSzM-0000bU-J7 for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Nov 2018 14:44:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOSzF-0000bD-Il for bug-gnu-emacs@gnu.org; Sun, 18 Nov 2018 14:44:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOSzC-0004hN-F7 for bug-gnu-emacs@gnu.org; Sun, 18 Nov 2018 14:44:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gOSzC-0004hJ-By for bug-gnu-emacs@gnu.org; Sun, 18 Nov 2018 14:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gOSzC-0001II-5B for bug-gnu-emacs@gnu.org; Sun, 18 Nov 2018 14:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Nov 2018 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33384 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33384-submit@debbugs.gnu.org id=B33384.15425702404960 (code B ref 33384); Sun, 18 Nov 2018 19:44:02 +0000 Original-Received: (at 33384) by debbugs.gnu.org; 18 Nov 2018 19:44:00 +0000 Original-Received: from localhost ([127.0.0.1]:59359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOSz9-0001Hv-TS for submit@debbugs.gnu.org; Sun, 18 Nov 2018 14:44:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOSz8-0001Hf-Et for 33384@debbugs.gnu.org; Sun, 18 Nov 2018 14:43:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOSz0-0004dH-05 for 33384@debbugs.gnu.org; Sun, 18 Nov 2018 14:43:53 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOSyz-0004dD-TQ; Sun, 18 Nov 2018 14:43:49 -0500 Original-Received: from [176.228.60.248] (port=3067 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gOSyz-0005eo-HH; Sun, 18 Nov 2018 14:43:49 -0500 In-reply-to: (message from Thomas de Beauchene on Sun, 18 Nov 2018 18:11:22 +0100) 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:152509 Archived-At: > From: Thomas de Beauchene > Date: Sun, 18 Nov 2018 18:11:22 +0100 > > Oh, I'm surprised about that 2nd argument because when I try it with > eval-expression I get values that do not make sense, usually 1 with the example > that I provided and sometimes high values, like a hundred and some with that > same buffer (don't remember the circumstances). If you call window-end without the 2nd argument? If so, it's for the same reason, I guess: you get inaccurate values. eval-expression triggers a redisplay, which can make the recorded value inaccurate; using the 2nd argument makes sure it's accurate again. > But surprisingly when I try your fix it solves the problem. Oh man, I wanted my > name in the commit history, but I guess it is for another time ^^' You have your name in the history, albeit indirectly, because the commit mentions the bug address, and anyone who will read the bug report will see your name and your proposed solution. > How do you explain that an overlay can, in such specific circumstances, make > (window-end) return one more than it should be able to ? Overlays are likely to require an extra redisplay cycle, which might invalidate the recorded value of the window-end. > I find it a bit puzzling, especially since when ran from > `eval-expression` it returns nonsense with that argument. I feel > like there is still a bug in the behaviour of (window-end) that we > did not address here but worked around, can you confirm ? I'm not aware of any bugs in window-end when the last argument is non-nil, but if you can provide a recipe starting from "emacs -Q", I will look into it.