unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Thomas de Beauchene <thomas.de.beauchene@gmail.com>
Cc: 33384@debbugs.gnu.org
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	[thread overview]
Message-ID: <837ehatblz.fsf@gnu.org> (raw)
In-Reply-To: <CAK=xY6K3SDCivYiadnAvxC_mrH6-hkQK+6VnOpt+QCRoDVGMsA@mail.gmail.com> (message from Thomas de Beauchene on Sun, 18 Nov 2018 18:11:22 +0100)

> From: Thomas de Beauchene <thomas.de.beauchene@gmail.com>
> 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.





      parent reply	other threads:[~2018-11-18 19:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 15:48 bug#33384: [PATCH] Fix zone.el when window is at the bottom of the buffer deb0ch
2018-11-16  8:42 ` Eli Zaretskii
     [not found]   ` <CAK=xY6KH5Y4WQnNo3-vLx77CuGtmPnkMTTQoH4Sbe5TE2NTsLw@mail.gmail.com>
2018-11-16 14:42     ` Eli Zaretskii
     [not found]       ` <CAK=xY6+yTP8BeEQn6z4hFJYFVfVzcFhHsryHwwAzeAE10SHTKw@mail.gmail.com>
2018-11-16 19:53         ` Eli Zaretskii
     [not found]           ` <CAK=xY6K3SDCivYiadnAvxC_mrH6-hkQK+6VnOpt+QCRoDVGMsA@mail.gmail.com>
2018-11-18 19:43             ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=837ehatblz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33384@debbugs.gnu.org \
    --cc=thomas.de.beauchene@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).