GNU bug report logs -
#61307
30.0.50; pixel-scroll-precision-mode: window-scroll-functions?
Previous Next
Full log
Message #38 received at 61307 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: 61307 <at> debbugs.gnu.org
> Date: Tue, 14 Feb 2023 02:30:10 +0100
>
> > Because you might make scrolling much slower if you call the scroll
> > functions every pixel.
>
> Sorry that I repeat myself, but I don't understand why that would
> happen. This is what I tried:
>
> *** /tmp/ediffnuE8b2 2023-02-14 02:24:24.300444006 +0100
> --- /home/micha/software/emacs/lisp/pixel-scroll.el 2023-02-14 02:20:40.472154353 +0100
> ***************
> *** 725,731 ****
> (beginning-of-buffer
> (message (error-message-string '(beginning-of-buffer))))
> (end-of-buffer
> ! (message (error-message-string '(end-of-buffer))))))))))
> (mwheel-scroll event nil))))
>
> (defun pixel-scroll-kinetic-state (&optional window)
> --- 725,733 ----
> (beginning-of-buffer
> (message (error-message-string '(beginning-of-buffer))))
> (end-of-buffer
> ! (message (error-message-string '(end-of-buffer))))))
> ! (run-hook-with-args 'window-scroll-functions
> ! (selected-window) (window-start))))))
> (mwheel-scroll event nil))))
>
> (defun pixel-scroll-kinetic-state (&optional window)
>
> I don't see the hook called for each pixel. What do you mean?
Each time you do the smallest possible scroll, by how many pixels, or
by what fraction of the screen-line's height does Emacs scroll the
window? IOW, by how many pixels is the display scrolled for each call
to window-scroll-functions?
Precision pixel-scrolling supports many different devices (mice and
touch-pads), which can scroll at very different resolutions. The
possibility that window-scroll-functions be called too frequently
depends on what exactly do your device and your Emacs build support in
this scenario, and I don't yet have a clear idea about that, since you
didn't tell.
> A second thing I wonder about: the docstring of
> `window-scroll-functions' says:
>
> | These functions are called whenever the `window-start' marker is modified,
> | either to point into another buffer (e.g. via `set-window-buffer') or another
> | place in the same buffer.
>
> Is this correct and complete?
More or less. (I don't like how it explains this stuff by using
internal implementation detail, but I cannot think of a better
explanation that is still accurate enough.)
> Is the window-start marker modified in our scenario?
Not in the way that the "usual" scrolling commands do. This mode uses
non-nil 3rd argument to set-window-start. So the display engine
doesn't know that the window is scrolled.
This bug report was last modified 2 years and 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.