GNU bug report logs - #18618
25.0.50; `window-end win t` produces erroenous result with `window-scroll-functions` hook.

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 18618 <at> debbugs.gnu.org
Subject: bug#18618: 25.0.50; `window-end win t` produces erroenous result with `window-scroll-functions` hook.
Date: Sat, 29 May 2021 05:37:18 +0200
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 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.