GNU bug report logs -
#18618
25.0.50; `window-end win t` produces erroenous result with `window-scroll-functions` hook.
Previous Next
Reported by: Keith David Bershatsky <esq <at> lawlist.com>
Date: Fri, 3 Oct 2014 01:08:02 UTC
Severity: normal
Tags: notabug
Found in version 25.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 18618 <at> debbugs.gnu.org (full text, mbox):
Keith David Bershatsky <esq <at> lawlist.com> writes:
> Steps to reproduce the issue.
>
> 1. Create a function that reports (e.g., a message) the value of `(window-end win t)` and attach that function to the `window-scroll-functions` hook.
>
> 2. Open a long file in either fundamental-mode or text-mode.
>
> 3. M-x end-of-buffer
>
> 4. M-x beginning-of-buffer
>
> The result of step 4 reports an erroneous window-end value that is at
> the very end of the buffer, instead of the correct window-end (i.e.,
> which is much closer to the beginning of the buffer).
(I'm going through old bug reports that unfortunately got no response at
the time.)
This problem is still present in Emacs 28. Here's an easier test case:
(defun foo (win _)
(message "End: %s" (window-end win t))
nil)
(push 'foo window-scroll-functions)
This reports the same number in both 3) and 4) when transient-mark-mode
is switched on, but not when it's off. It's also correct if that mode
is on, and the region is active.
I haven't tried to debug further -- perhaps it's immediately obvious to
somebody what could be causing this glitch?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 362 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.