Subject: bug#68196: 30.0.50; pixel-scroll-precision-mode won't scroll with scroll-margin 2 using macbook trackpad

From: Yuan Fu <[email-masked]>
Date: Mon, 1 Jan 2024 19:12:35 -0800

> On Jan 1, 2024, at 3:05 PM, Stefan Kangas <[email-masked]> wrote:
> 
> Scrolling slowly with the trackpad in `pixel-scroll-precision-mode'
> doesn't work as expected on my recent Macbook Pro with the below
> settings.
> 
> Recipe to reproduce:
> 
> 1. Evaluate this form in emacs -Q:
> 
>    (progn (setq scroll-step 0)
>           (setq scroll-conservatively 500)
>           (setq scroll-margin 2)
>           (pixel-scroll-precision-mode))
> 
> 2. Go to some sufficiently long buffer, scroll down a bit and move point
>   to the top of the window: C-h i C-v
> 
> 3. Scroll down slowly using the trackpad.
> 
> The window does not scroll down, instead it just bounces back and forth
> at the top.
> 
> Note that if I scroll fast enough, the window does scroll down as
> expected.

I think precision scroll requires you to set scroll-margin to 0. I don’t remember where I learnt that fact, CCing Lu since he must know.

Yuan