Next: Follow Mode, Previous: Auto Scrolling, Up: Display
Horizontal scrolling means shifting all the lines sideways
within a window, so that some of the text near the left margin is not
displayed. When the text in a window is scrolled horizontally, text
lines are truncated rather than continued (see Line Truncation).
If a window shows truncated lines, Emacs performs automatic horizontal
scrolling whenever point moves off the left or right edge of the
screen. To disable automatic horizontal scrolling, set the variable
auto-hscroll-mode to nil.
The variable hscroll-margin controls how close point can get
to the window's edges before automatic scrolling occurs. It
is measured in columns. If the value is 5, then moving point within 5
columns of an edge causes horizontal scrolling away from that edge.
The variable hscroll-step determines how many columns to
scroll the window when point gets too close to the edge. Zero, the
default value, means to center point horizontally within the window.
A positive integer value specifies the number of columns to scroll by.
A floating-point number specifies the fraction of the window's width
to scroll by.
You can also perform explicit horizontal scrolling with the following commands:
scroll-left).
scroll-right).
C-x < (scroll-left) scrolls the selected window to the
left by the full width of the window, less two columns. (In other
words, the text in the window moves left relative to the window.)
With a numeric argument n, it scrolls by n columns.
C-x > (scroll-right) scrolls similarly to the right.
The window cannot be scrolled any farther to the right once it is
displayed normally, with each line starting at the window's left
margin; attempting to do so has no effect. This means that you don't
have to calculate the argument precisely for C-x >; any
sufficiently large argument will restore the normal display.
If you use those commands to scroll a window horizontally, that sets
a lower bound for automatic horizontal scrolling. Automatic scrolling
will continue to scroll the window, but never farther to the right
than the amount you previously set by scroll-left.