unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61307@debbugs.gnu.org
Subject: bug#61307: 30.0.50; pixel-scroll-precision-mode: window-scroll-functions?
Date: Tue, 14 Feb 2023 02:30:10 +0100	[thread overview]
Message-ID: <873579jaot.fsf@web.de> (raw)
In-Reply-To: <83k00lg1ve.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 13 Feb 2023 14:56:37 +0200")

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

Eli Zaretskii <eliz@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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 61307.diff --]
[-- Type: text/x-diff, Size: 1017 bytes --]

*** /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)

[-- Attachment #3: Type: text/plain, Size: 534 bytes --]


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.

  reply	other threads:[~2023-02-14  1:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06  1:49 bug#61307: 30.0.50; pixel-scroll-precision-mode: window-scroll-functions? Michael Heerdegen
2023-02-06 12:15 ` Eli Zaretskii
2023-02-06 21:30   ` Michael Heerdegen
2023-02-12 12:15     ` Eli Zaretskii
2023-02-13  2:20       ` Michael Heerdegen
2023-02-13  3:31         ` Eli Zaretskii
2023-02-13  3:44           ` Michael Heerdegen
2023-02-13 12:56             ` Eli Zaretskii
2023-02-14  1:30               ` Michael Heerdegen [this message]
2023-02-14 13:06                 ` Eli Zaretskii
2023-02-15  4:06                   ` Michael Heerdegen
2023-02-15 13:21                     ` Eli Zaretskii
2023-02-16  4:57                       ` Michael Heerdegen
2023-02-16  8:22                         ` Eli Zaretskii
2023-02-16  8:47                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-16  8:54                           ` Michael Heerdegen
2023-02-19  5:50                           ` Michael Heerdegen
2023-02-19  6:54                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-19  7:36                               ` Michael Heerdegen
2023-02-19  8:30                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-06 14:07 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-06 15:25   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873579jaot.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=61307@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).