With GNU Emacs 26.1 installing either smooth scroll while adding
(require 'smooth-scroll)
(smooth-scroll-mode t)
to my .emacs
, or smooth scrolling with
(require 'smooth-scrolling)
(smooth-scrolling-mode 1)
does turn on the smooth scrolling mode just fine, but two-finger vertical swipes on the trackpad do not deliver the purported smooth scrolling.
Switching to Yamamoto Mitsuharu's Emacs is a bit too much for just this one nice feature. I'd rather stick to a package.
Did you manage to get either of these two packages to smooth scroll with 26.1 or a recent version of Emacs?
By "smooth scroll" here I mean that one would get the scrolling obtained with, say, Safari (with files whose length exceeds that of the window/frame).
Update
The discussions online
- Set scroll-amount for mouse wheel in .emacs
- Can scrolling be smoother than single line in emacs/org-mode?
- How do we achieve real smooth scrolling?
- pixel-scroll-mode is slow
- SmoothScrolling
- emacs OS X smooth scroll
are inherently confused. Missing in the middle of the questions/conversations is a definition of "line" in the expression "smooth scrolling by line". One solution is to qualify that term by replacing it with either "character-line" or "pixel-line". The present question is about the latter.
(setq scroll-conservatively 101)
and set the mouse / trackpad wheel scroll (within Emacs) to just one line at a time and try that. Forget about the other settings in the interim until you have fully explored that option, then play with other settings to your heart's content. You can typeC-h v
..pixel-scroll-mode
, though I don't know off-hand what events it responds to. It doesn't pixel scroll for page up or page down, for instance.smooth-scrolling-mode
does subtly change the page up/page down behavior though, so perhaps you just need to be more precise about describing what you want?pixel-scroll-mode
is what I was looking for. Please add it as an answer, possibly while also telling everyone what the smooth-scrolling mode does (now that I see what they mean there by "line", I'm puzzled that this requires a package, since it's easy to set the variables without an extra package). A comment to readers who drop in here about the usability ofpixel-scroll-mode
: it's not quite as nice as one would want. The distraction of the final slowdown to stop at a character-line boundary just about ruins it--almost nullifying any niceness of the smooth-scrolling. (cont.)