is for commands to move text up and down and sideways in a window. Scrolling forward moves the buffer text upwards and scrolling backward moves downwards. Horizontal scrolling moves the buffer text left or right. Emacs provides many functions, key bindings, and programming facilities for scrolling.
Questions tagged [scrolling]
125 questions
10
votes
2 answers
Different scroll margins at top and bottom of window?
Q: is there a way to set different scroll margins at the top and bottom of a window?
The variable scroll-margin (defined in the C source code) sets how many lines of text that Emacs displays, at a minimum, at the top and bottom of a window:
Number…

Dan
- 32,980
- 7
- 102
- 169
7
votes
2 answers
Smooth scrolling by pixel-lines
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…

Calaf
- 483
- 3
- 16
6
votes
1 answer
emulation of scroll-off?
Vim has an option called scrolloff (e.g. set scrolloff=7) which automatically scrolls down or up to keep the cursor/point from getting within a certain distance of the top or bottom of the window.
Is there a way to emulate this behavior in vanilla…

Greg Nisbet
- 877
- 5
- 19
5
votes
0 answers
Why doesn't `scroll-margin` work? [Solved]
scroll-margin is 1 but Emacs still sometimes allows the cursor to stay at the 1st line of a window.
Follow these steps to reproduce it (or see the GIF below):
emacs -Q
In buffer *scratch*, C-x C-e:
(progn
(custom-set-variables
…

shynur
- 5,253
- 1
- 4
- 25
5
votes
1 answer
How do I make a buffer automatically scroll to its end?
I have a buffer in which the pressed keys echo, and I want the cursor in it always be at the very end. How can I accomplish this?

HappyFace
- 830
- 5
- 19
5
votes
1 answer
How to recreate iA Writer-style typewriter scrolling in Emacs?
The popular Mac editor iA Writer (https://ia.net/writer/mac/) has many nifty features that I rather like. So far, I've been able to recreate the look and feel for the most part -- except for the typewriter-style scrolling that keeps the current line…

Hannu Rajaniemi
- 53
- 3
4
votes
2 answers
Is there a way to increase speed of scrolling when holding down C-n/C-p/C-f/C-b?
Title is basically the question. If I hold down C-n, C-p, etc., for a second or two, the speed at which it scrolls is too slow for my liking. Is there a way to make it scroll faster if I hold one of the combinations?

user4601931
- 161
- 6
3
votes
1 answer
Can page-down clamp the last line to the bottom of the window?
When using page-down (internally scroll-up-command), sometimes the window ends up in a state where end end-of-file is at the top of the screen.
Is there a way to page-down, clamping window position so it doesn't end up scrolling past the document…

ideasman42
- 8,786
- 1
- 32
- 114
3
votes
0 answers
Scrolling in tmux in emacs
I'm using emacs to run ansi-term with an ssh'ed tmux inside. I can scroll using my prefix C-b + [ as per this thread, but I would like to be able to scroll with the mouse immediately.
This seems to work if I'm doing it in a terminal outside of…

Hatshepsut
- 565
- 3
- 15
2
votes
1 answer
How to perform interactive auto-scroll?
Is it possible to activate a blocking 'scroll' mode that uses the vertical position of the cursor and a timer?
This is handy because you can move the cursor to a certain Y-delta to maintain a fixed scroll speed (In Firefox it's enabled by the "Use…

ideasman42
- 8,786
- 1
- 32
- 114
2
votes
0 answers
"Negative" scrolling, or: actually recentering first line
Usually, there's some extra "virtual" space shown at the bottom of a buffer, which makes the visual appearance of a file longer than it actually is. This is quite convenient, e.g., if you're trying to recenter (C-l) the last line: you will end up…

phipsgabler
- 195
- 1
- 6
2
votes
1 answer
on Mac, scroll-down or scroll-up don't move point to very top/bottom
I'm fairly new to the Mac, and I've started using Emacs. I've noticed that the scroll-down command, bound to Meta-v, works okay to scroll the visible portion of the buffer, except that it doesn't move point to the very top of the buffer, the…

composerMike
- 173
- 5
1
vote
2 answers
How to show more of the buffer in the current window?
Sometimes I have the current buffer in the current window displayed sub-optimally: there is a lot of
buffer not shown, and there is a lot of empty space at the bottom below the EOB.
E.g.:
the buffer is 100 lines
the window is 10 lines
the point is…

sds
- 6,104
- 22
- 39
1
vote
0 answers
Emacs 27 scrolling issue
In Emacs 27, in -nw mode at least which is what I use, I've found an issue with scrolling.
If you open emacs to see two files at once: emacs -nw -q file1 file2, and then scroll down the left window with your keyboard (the selected window by…

ABu
- 280
- 1
- 7
1
vote
2 answers
How to prevent scroll up doing nothing when the value is too big?
When calling (scroll-up N) with a large value that would exceed the buffer length - nothing happens.
For example:
(global-set-key (kbd "") (lambda () (interactive) (scroll-up 10000)))
Prints End of buffer but doesn't scroll.
Is there a way to…

ideasman42
- 8,786
- 1
- 32
- 114