On Thu, 29 Apr 2021 at 12:07, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>   `(defadvice ,f (after emacspeak pre act comp)
>      (message "scroll advice: start = %d end = %d diff = %d"
>               (window-start)
>               (window-end)
>               (- (window-end) (window-start))))))

I think this may return outdated values for `window-end` because it is
run before the window end position has been recomputed by redisplay.
If that's not what you want, then you need to pass non-nil value for the
`update` argument.


Thanks Stefan, you nailed it. That was exactly the problem. I should have spotted it when I checked the docs for window-end. 

regards,

Tim

--
Tim Cross