turning off `mouse-wheel-progressive-speed' breaks scrolling

7 views
Skip to first unread message

Nathaniel Cunningham

unread,
Jul 31, 2019, 1:02:34 PM7/31/19
to aquamac...@googlegroups.com
While cleaning up my Preferences.el, I discovered just now (in nightly build from July 25, on OS 10.12) that setting
(setq mouse-wheel-progressive-speed nil)
makes mouse wheel scrolling stop working altogether, with no errors. (By default, it is set to t.) I confirmed this bug in a new session without customizations.

Investigating with describe-key still shows `mwheel-scroll' properly bound to mousewheel scroll events; but mwheel-scroll no longer does anything!

Turning mouse-wheel-progressive-speed back on makes things work fine again.

Nathaniel

Nathaniel Cunningham

unread,
Jul 31, 2019, 1:06:08 PM7/31/19
to aquamac...@googlegroups.com
Same behavior in the lastest nightly (July 31).
-- Nathaniel

David Reitter

unread,
Jul 31, 2019, 5:22:59 PM7/31/19
to aquamac...@googlegroups.com
Interesting. Did you find out anything else … about where the bug might be?
> --
> You received this message because you are subscribed to the Google Groups "aquamacs-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to aquamacs-deve...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/aquamacs-devel/CAAGwS86%2BC6ak%3Dra2myGWbbTRJhqrMJPAE9ChamjyzOZob0Teyg%40mail.gmail.com.

Nathaniel Cunningham

unread,
Jul 31, 2019, 6:09:02 PM7/31/19
to aquamac...@googlegroups.com
I'll look into it tonight or tomorrow.

Nathaniel Cunningham

unread,
Aug 1, 2019, 1:10:23 AM8/1/19
to aquamac...@googlegroups.com
I located the bug, in the recent introduction of `mouse-wheel-progressive-decelerator' into aquamacs.el.
There are two issues:
1) The requested scroll amount is divided by the `-progressive-decelerator' value, even when progressive scrolling is turned off.
2) Integer division results in zero scroll size requested,
  a) always, when progressive scrolling is off; and
  b) for the first few scrolls with progressive scrolling on.

The combination of (1) and (2a) is the reason that turning off progressive scrolling makes scrolling unresponsive.

I have submitted a patch and pull request that:
A) changes `mouse-wheel-progressive-decelerator' to a float value so division gives floating-point (untruncated!) result;
B) applies `ceiling' to the (float) result from division, because the `scroll-up' and `scroll-down' functions that are subsequently called will (apparently) only scroll a single line if given a float argument, regardless of value. And zero is never a reasonable amount to scroll, so we don't want to round down.
C) only divides scroll amount by `-progressive-decelerator' value when progressive scrolling is on.

Nathaniel

David Reitter

unread,
Aug 1, 2019, 1:29:44 AM8/1/19
to aquamacs-devel
Reply all
Reply to author
Forward
0 new messages