GNU bug report logs -
#61307
30.0.50; pixel-scroll-precision-mode: window-scroll-functions?
Previous Next
Full log
Message #35 received at 61307 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
> > Don't all other scroll commands scroll after every single command
> > invocation? Why is this one different?
>
> 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:
[61307.diff (text/x-diff, inline)]
*** /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)
[Message part 3 (text/plain, inline)]
I don't see the hook called for each pixel. What do you mean?
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? Is the window-start marker modified in
our scenario? If it is, why do we have to call the hook explicitly? If
it is not, should we update that marker?
TIA,
Michael.
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.