aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-01-31 18:39:00 +0000
committerRichard M. Stallman2006-01-31 18:39:00 +0000
commitdc917bd9a9962a2e3dec402dd128e3640cd59812 (patch)
tree3facd027d4eacbf4f4b864d9ef43f91ea359c34f
parent54952612bb664d051e80143bc97daf698f4fce7e (diff)
downloademacs-dc917bd9a9962a2e3dec402dd128e3640cd59812.tar.gz
emacs-dc917bd9a9962a2e3dec402dd128e3640cd59812.zip
(Scrolling, Horizontal Scrolling, Follow Mode): Nodes moved to top.
-rw-r--r--man/display.texi478
1 files changed, 239 insertions, 239 deletions
diff --git a/man/display.texi b/man/display.texi
index 9fee37afdc1..37edc372fa0 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -27,6 +27,245 @@ display it.
27* Display Custom:: Information on variables for customizing display. 27* Display Custom:: Information on variables for customizing display.
28@end menu 28@end menu
29 29
30@node Scrolling
31@section Scrolling
32
33 If a buffer contains text that is too large to fit entirely within a
34window that is displaying the buffer, Emacs shows a contiguous portion of
35the text. The portion shown always contains point.
36
37@cindex scrolling
38 @dfn{Scrolling} means moving text up or down in the window so that
39different parts of the text are visible. Scrolling ``forward'' or
40``up'' means that text moves up, and new text appears at the bottom.
41Scrolling ``backward'' or ``down'' moves text down, and new text
42appears at the top.
43
44 Scrolling happens automatically if you move point past the bottom or
45top of the window. You can also scroll explicitly with the commands
46in this section.
47
48@table @kbd
49@item C-l
50Clear screen and redisplay, scrolling the selected window to center
51point vertically within it (@code{recenter}).
52@item C-v
53Scroll forward (a windowful or a specified number of lines) (@code{scroll-up}).
54@item @key{NEXT}
55@itemx @key{PAGEDOWN}
56Likewise, scroll forward.
57@item M-v
58Scroll backward (@code{scroll-down}).
59@item @key{PRIOR}
60@itemx @key{PAGEUP}
61Likewise, scroll backward.
62@item @var{arg} C-l
63Scroll so point is on line @var{arg} (@code{recenter}).
64@item C-M-l
65Scroll heuristically to bring useful information onto the screen
66(@code{reposition-window}).
67@end table
68
69@kindex C-l
70@findex recenter
71 The most basic scrolling command is @kbd{C-l} (@code{recenter}) with
72no argument. It scrolls the selected window so that point is halfway
73down from the top of the window. On a text terminal, it also clears
74the screen and redisplays all windows. That is useful in case the
75screen is garbled (@pxref{Screen Garbled}).
76
77@kindex C-v
78@kindex M-v
79@kindex NEXT
80@kindex PRIOR
81@kindex PAGEDOWN
82@kindex PAGEUP
83@findex scroll-up
84@findex scroll-down
85@vindex next-screen-context-lines
86 To read the buffer a windowful at a time, use @kbd{C-v}
87(@code{scroll-up}) with no argument. This scrolls forward by nearly
88the whole window height. The effect is to take the two lines at the
89bottom of the window and put them at the top, followed by nearly a
90whole windowful of lines that were not previously visible. If point
91was in the text that scrolled off the top, it ends up at the new top
92of the window.
93
94 @kbd{M-v} (@code{scroll-down}) with no argument scrolls backward in
95a similar way, also with overlap. The number of lines of overlap
96across a @kbd{C-v} or @kbd{M-v} is controlled by the variable
97@code{next-screen-context-lines}; by default, it is 2. The function
98keys @key{NEXT} and @key{PRIOR}, or @key{PAGEDOWN} and @key{PAGEUP},
99are equivalent to @kbd{C-v} and @kbd{M-v}.
100
101 The commands @kbd{C-v} and @kbd{M-v} with a numeric argument scroll
102the text in the selected window up or down a few lines. @kbd{C-v}
103with an argument moves the text and point up, together, that many
104lines; it brings the same number of new lines into view at the bottom
105of the window. @kbd{M-v} with numeric argument scrolls the text
106downward, bringing that many new lines into view at the top of the
107window. @kbd{C-v} with a negative argument is like @kbd{M-v} and vice
108versa.
109
110 The names of scroll commands are based on the direction that the
111text moves in the window. Thus, the command to scroll forward is
112called @code{scroll-up} because it moves the text upward on the
113screen. The keys @key{PAGEDOWN} and @key{PAGEUP} derive their names
114and customary meanings from a different convention that developed
115elsewhere; hence the strange result that @key{PAGEDOWN} runs
116@code{scroll-up}.
117
118@vindex scroll-preserve-screen-position
119 Some users like the full-screen scroll commands to keep point at the
120same screen line. To enable this behavior, set the variable
121@code{scroll-preserve-screen-position} to a non-@code{nil} value. In
122this mode, when scrolling shifts point off the screen, or into the
123scrolling margins, Emacs moves point to keep the same vertical
124position within the window. This mode is convenient for browsing
125through a file by scrolling by screenfuls; if you come back to the
126screen where you started, point goes back to the line where it
127started. However, this mode is inconvenient when you move to the next
128screen in order to move point to the text there.
129
130 Another way to do scrolling is with @kbd{C-l} with a numeric argument.
131@kbd{C-l} does not clear the screen when given an argument; it only scrolls
132the selected window. With a positive argument @var{n}, it repositions text
133to put point @var{n} lines down from the top. An argument of zero puts
134point on the very top line. Point does not move with respect to the text;
135rather, the text and point move rigidly on the screen. @kbd{C-l} with a
136negative argument puts point that many lines from the bottom of the window.
137For example, @kbd{C-u - 1 C-l} puts point on the bottom line, and @kbd{C-u
138- 5 C-l} puts it five lines from the bottom. @kbd{C-u C-l} scrolls to put
139point at the center (vertically) of the selected window.
140
141@kindex C-M-l
142@findex reposition-window
143 The @kbd{C-M-l} command (@code{reposition-window}) scrolls the current
144window heuristically in a way designed to get useful information onto
145the screen. For example, in a Lisp file, this command tries to get the
146entire current defun onto the screen if possible.
147
148@vindex scroll-conservatively
149 Scrolling happens automatically when point moves out of the visible
150portion of the text. Normally, automatic scrolling centers point
151vertically within the window. However, if you set
152@code{scroll-conservatively} to a small number @var{n}, then if you
153move point just a little off the screen---less than @var{n}
154lines---then Emacs scrolls the text just far enough to bring point
155back on screen. By default, @code{scroll-conservatively} is 0.
156
157@cindex aggressive scrolling
158@vindex scroll-up-aggressively
159@vindex scroll-down-aggressively
160 When the window does scroll by a longer distance, you can control
161how aggressively it scrolls, by setting the variables
162@code{scroll-up-aggressively} and @code{scroll-down-aggressively}.
163The value of @code{scroll-up-aggressively} should be either
164@code{nil}, or a fraction @var{f} between 0 and 1. A fraction
165specifies where on the screen to put point when scrolling upward.
166More precisely, when a window scrolls up because point is above the
167window start, the new start position is chosen to put point @var{f}
168part of the window height from the top. The larger @var{f}, the more
169aggressive the scrolling.
170
171 @code{nil}, which is the default, scrolls to put point at the center.
172So it is equivalent to .5.
173
174 Likewise, @code{scroll-down-aggressively} is used for scrolling
175down. The value, @var{f}, specifies how far point should be placed
176from the bottom of the window; thus, as with
177@code{scroll-up-aggressively}, a larger value is more aggressive.
178
179@vindex scroll-margin
180 The variable @code{scroll-margin} restricts how close point can come
181to the top or bottom of a window. Its value is a number of screen
182lines; if point comes within that many lines of the top or bottom of the
183window, Emacs recenters the window. By default, @code{scroll-margin} is
1840.
185
186@node Horizontal Scrolling
187@section Horizontal Scrolling
188@cindex horizontal scrolling
189
190 @dfn{Horizontal scrolling} means shifting all the lines sideways
191within a window---so that some of the text near the left margin is not
192displayed at all. When the text in a window is scrolled horizontally,
193text lines are truncated rather than continued (@pxref{Display
194Custom}). Whenever a window shows truncated lines, Emacs
195automatically updates its horizontal scrolling whenever point moves
196off the left or right edge of the screen. You can also use these
197commands to do explicit horizontal scrolling.
198
199@table @kbd
200@item C-x <
201Scroll text in current window to the left (@code{scroll-left}).
202@item C-x >
203Scroll to the right (@code{scroll-right}).
204@end table
205
206@kindex C-x <
207@kindex C-x >
208@findex scroll-left
209@findex scroll-right
210 The command @kbd{C-x <} (@code{scroll-left}) scrolls the selected
211window to the left by @var{n} columns with argument @var{n}. This moves
212part of the beginning of each line off the left edge of the window.
213With no argument, it scrolls by almost the full width of the window (two
214columns less, to be precise).
215
216 @kbd{C-x >} (@code{scroll-right}) scrolls similarly to the right. The
217window cannot be scrolled any farther to the right once it is displayed
218normally (with each line starting at the window's left margin);
219attempting to do so has no effect. This means that you don't have to
220calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large
221argument will restore the normal display.
222
223 If you use those commands to scroll a window horizontally, that sets
224a lower bound for automatic horizontal scrolling. Automatic scrolling
225will continue to scroll the window, but never farther to the right
226than the amount you previously set by @code{scroll-left}.
227
228@vindex hscroll-margin
229 The value of the variable @code{hscroll-margin} controls how close
230to the window's edges point is allowed to get before the window will
231be automatically scrolled. It is measured in columns. If the value
232is 5, then moving point within 5 columns of the edge causes horizontal
233scrolling away from that edge.
234
235@vindex hscroll-step
236 The variable @code{hscroll-step} determines how many columns to
237scroll the window when point gets too close to the edge. If it's
238zero, horizontal scrolling centers point horizontally within the
239window. If it's a positive integer, it specifies the number of
240columns to scroll by. If it's a floating-point number, it specifies
241the fraction of the window's width to scroll by. The default is zero.
242
243@vindex auto-hscroll-mode
244 To disable automatic horizontal scrolling, set the variable
245@code{auto-hscroll-mode} to @code{nil}.
246
247@node Follow Mode
248@section Follow Mode
249@cindex Follow mode
250@cindex mode, Follow
251@findex follow-mode
252@cindex windows, synchronizing
253@cindex synchronizing windows
254
255 @dfn{Follow mode} is a minor mode that makes two windows, both
256showing the same buffer, scroll as a single tall ``virtual window.''
257To use Follow mode, go to a frame with just one window, split it into
258two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x
259follow-mode}. From then on, you can edit the buffer in either of the
260two windows, or scroll either one; the other window follows it.
261
262 In Follow mode, if you move point outside the portion visible in one
263window and into the portion visible in the other window, that selects
264the other window---again, treating the two as if they were parts of
265one large window.
266
267 To turn off Follow mode, type @kbd{M-x follow-mode} a second time.
268
30@node Faces 269@node Faces
31@section Using Multiple Typefaces 270@section Using Multiple Typefaces
32@cindex faces 271@cindex faces
@@ -466,223 +705,6 @@ This command does nothing if the major mode is a member of the list
466@code{hi-lock-exclude-modes}. 705@code{hi-lock-exclude-modes}.
467@end table 706@end table
468 707
469@node Scrolling
470@section Scrolling
471
472 If a buffer contains text that is too large to fit entirely within a
473window that is displaying the buffer, Emacs shows a contiguous portion of
474the text. The portion shown always contains point.
475
476@cindex scrolling
477 @dfn{Scrolling} means moving text up or down in the window so that
478different parts of the text are visible. Scrolling ``forward'' or
479``up'' means that text moves up, and new text appears at the bottom.
480Scrolling ``backward'' or ``down'' moves text down, and new text
481appears at the top.
482
483 Scrolling happens automatically if you move point past the bottom or
484top of the window. You can also scroll explicitly with the commands
485in this section.
486
487@table @kbd
488@item C-l
489Clear screen and redisplay, scrolling the selected window to center
490point vertically within it (@code{recenter}).
491@item C-v
492Scroll forward (a windowful or a specified number of lines) (@code{scroll-up}).
493@item @key{NEXT}
494@itemx @key{PAGEDOWN}
495Likewise, scroll forward.
496@item M-v
497Scroll backward (@code{scroll-down}).
498@item @key{PRIOR}
499@itemx @key{PAGEUP}
500Likewise, scroll backward.
501@item @var{arg} C-l
502Scroll so point is on line @var{arg} (@code{recenter}).
503@item C-M-l
504Scroll heuristically to bring useful information onto the screen
505(@code{reposition-window}).
506@end table
507
508@kindex C-l
509@findex recenter
510 The most basic scrolling command is @kbd{C-l} (@code{recenter}) with
511no argument. It scrolls the selected window so that point is halfway
512down from the top of the window. On a text terminal, it also clears
513the screen and redisplays all windows. That is useful in case the
514screen is garbled (@pxref{Screen Garbled}).
515
516@kindex C-v
517@kindex M-v
518@kindex NEXT
519@kindex PRIOR
520@kindex PAGEDOWN
521@kindex PAGEUP
522@findex scroll-up
523@findex scroll-down
524@vindex next-screen-context-lines
525 To read the buffer a windowful at a time, use @kbd{C-v}
526(@code{scroll-up}) with no argument. This scrolls forward by nearly
527the whole window height. The effect is to take the two lines at the
528bottom of the window and put them at the top, followed by nearly a
529whole windowful of lines that were not previously visible. If point
530was in the text that scrolled off the top, it ends up at the new top
531of the window.
532
533 @kbd{M-v} (@code{scroll-down}) with no argument scrolls backward in
534a similar way, also with overlap. The number of lines of overlap
535across a @kbd{C-v} or @kbd{M-v} is controlled by the variable
536@code{next-screen-context-lines}; by default, it is 2. The function
537keys @key{NEXT} and @key{PRIOR}, or @key{PAGEDOWN} and @key{PAGEUP},
538are equivalent to @kbd{C-v} and @kbd{M-v}.
539
540 The commands @kbd{C-v} and @kbd{M-v} with a numeric argument scroll
541the text in the selected window up or down a few lines. @kbd{C-v}
542with an argument moves the text and point up, together, that many
543lines; it brings the same number of new lines into view at the bottom
544of the window. @kbd{M-v} with numeric argument scrolls the text
545downward, bringing that many new lines into view at the top of the
546window. @kbd{C-v} with a negative argument is like @kbd{M-v} and vice
547versa.
548
549 The names of scroll commands are based on the direction that the
550text moves in the window. Thus, the command to scroll forward is
551called @code{scroll-up} because it moves the text upward on the
552screen. The keys @key{PAGEDOWN} and @key{PAGEUP} derive their names
553and customary meanings from a different convention that developed
554elsewhere; hence the strange result that @key{PAGEDOWN} runs
555@code{scroll-up}.
556
557@vindex scroll-preserve-screen-position
558 Some users like the full-screen scroll commands to keep point at the
559same screen line. To enable this behavior, set the variable
560@code{scroll-preserve-screen-position} to a non-@code{nil} value. In
561this mode, when scrolling shifts point off the screen, or into the
562scrolling margins, Emacs moves point to keep the same vertical
563position within the window. This mode is convenient for browsing
564through a file by scrolling by screenfuls; if you come back to the
565screen where you started, point goes back to the line where it
566started. However, this mode is inconvenient when you move to the next
567screen in order to move point to the text there.
568
569 Another way to do scrolling is with @kbd{C-l} with a numeric argument.
570@kbd{C-l} does not clear the screen when given an argument; it only scrolls
571the selected window. With a positive argument @var{n}, it repositions text
572to put point @var{n} lines down from the top. An argument of zero puts
573point on the very top line. Point does not move with respect to the text;
574rather, the text and point move rigidly on the screen. @kbd{C-l} with a
575negative argument puts point that many lines from the bottom of the window.
576For example, @kbd{C-u - 1 C-l} puts point on the bottom line, and @kbd{C-u
577- 5 C-l} puts it five lines from the bottom. @kbd{C-u C-l} scrolls to put
578point at the center (vertically) of the selected window.
579
580@kindex C-M-l
581@findex reposition-window
582 The @kbd{C-M-l} command (@code{reposition-window}) scrolls the current
583window heuristically in a way designed to get useful information onto
584the screen. For example, in a Lisp file, this command tries to get the
585entire current defun onto the screen if possible.
586
587@vindex scroll-conservatively
588 Scrolling happens automatically when point moves out of the visible
589portion of the text. Normally, automatic scrolling centers point
590vertically within the window. However, if you set
591@code{scroll-conservatively} to a small number @var{n}, then if you
592move point just a little off the screen---less than @var{n}
593lines---then Emacs scrolls the text just far enough to bring point
594back on screen. By default, @code{scroll-conservatively} is 0.
595
596@cindex aggressive scrolling
597@vindex scroll-up-aggressively
598@vindex scroll-down-aggressively
599 When the window does scroll by a longer distance, you can control
600how aggressively it scrolls, by setting the variables
601@code{scroll-up-aggressively} and @code{scroll-down-aggressively}.
602The value of @code{scroll-up-aggressively} should be either
603@code{nil}, or a fraction @var{f} between 0 and 1. A fraction
604specifies where on the screen to put point when scrolling upward.
605More precisely, when a window scrolls up because point is above the
606window start, the new start position is chosen to put point @var{f}
607part of the window height from the top. The larger @var{f}, the more
608aggressive the scrolling.
609
610 @code{nil}, which is the default, scrolls to put point at the center.
611So it is equivalent to .5.
612
613 Likewise, @code{scroll-down-aggressively} is used for scrolling
614down. The value, @var{f}, specifies how far point should be placed
615from the bottom of the window; thus, as with
616@code{scroll-up-aggressively}, a larger value is more aggressive.
617
618@vindex scroll-margin
619 The variable @code{scroll-margin} restricts how close point can come
620to the top or bottom of a window. Its value is a number of screen
621lines; if point comes within that many lines of the top or bottom of the
622window, Emacs recenters the window. By default, @code{scroll-margin} is
6230.
624
625@node Horizontal Scrolling
626@section Horizontal Scrolling
627@cindex horizontal scrolling
628
629 @dfn{Horizontal scrolling} means shifting all the lines sideways
630within a window---so that some of the text near the left margin is not
631displayed at all. When the text in a window is scrolled horizontally,
632text lines are truncated rather than continued (@pxref{Display
633Custom}). Whenever a window shows truncated lines, Emacs
634automatically updates its horizontal scrolling whenever point moves
635off the left or right edge of the screen. You can also use these
636commands to do explicit horizontal scrolling.
637
638@table @kbd
639@item C-x <
640Scroll text in current window to the left (@code{scroll-left}).
641@item C-x >
642Scroll to the right (@code{scroll-right}).
643@end table
644
645@kindex C-x <
646@kindex C-x >
647@findex scroll-left
648@findex scroll-right
649 The command @kbd{C-x <} (@code{scroll-left}) scrolls the selected
650window to the left by @var{n} columns with argument @var{n}. This moves
651part of the beginning of each line off the left edge of the window.
652With no argument, it scrolls by almost the full width of the window (two
653columns less, to be precise).
654
655 @kbd{C-x >} (@code{scroll-right}) scrolls similarly to the right. The
656window cannot be scrolled any farther to the right once it is displayed
657normally (with each line starting at the window's left margin);
658attempting to do so has no effect. This means that you don't have to
659calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large
660argument will restore the normal display.
661
662 If you use those commands to scroll a window horizontally, that sets
663a lower bound for automatic horizontal scrolling. Automatic scrolling
664will continue to scroll the window, but never farther to the right
665than the amount you previously set by @code{scroll-left}.
666
667@vindex hscroll-margin
668 The value of the variable @code{hscroll-margin} controls how close
669to the window's edges point is allowed to get before the window will
670be automatically scrolled. It is measured in columns. If the value
671is 5, then moving point within 5 columns of the edge causes horizontal
672scrolling away from that edge.
673
674@vindex hscroll-step
675 The variable @code{hscroll-step} determines how many columns to
676scroll the window when point gets too close to the edge. If it's
677zero, horizontal scrolling centers point horizontally within the
678window. If it's a positive integer, it specifies the number of
679columns to scroll by. If it's a floating-point number, it specifies
680the fraction of the window's width to scroll by. The default is zero.
681
682@vindex auto-hscroll-mode
683 To disable automatic horizontal scrolling, set the variable
684@code{auto-hscroll-mode} to @code{nil}.
685
686@node Fringes 708@node Fringes
687@section Window Fringes 709@section Window Fringes
688@cindex fringes 710@cindex fringes
@@ -759,28 +781,6 @@ value of this variable is controlled by the variable
759can enable or disable this feature for all new buffers. (This feature 781can enable or disable this feature for all new buffers. (This feature
760currently doesn't work on text-only terminals.) 782currently doesn't work on text-only terminals.)
761 783
762@node Follow Mode
763@section Follow Mode
764@cindex Follow mode
765@cindex mode, Follow
766@findex follow-mode
767@cindex windows, synchronizing
768@cindex synchronizing windows
769
770 @dfn{Follow mode} is a minor mode that makes two windows, both
771showing the same buffer, scroll as a single tall ``virtual window.''
772To use Follow mode, go to a frame with just one window, split it into
773two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x
774follow-mode}. From then on, you can edit the buffer in either of the
775two windows, or scroll either one; the other window follows it.
776
777 In Follow mode, if you move point outside the portion visible in one
778window and into the portion visible in the other window, that selects
779the other window---again, treating the two as if they were parts of
780one large window.
781
782 To turn off Follow mode, type @kbd{M-x follow-mode} a second time.
783
784@node Selective Display 784@node Selective Display
785@section Selective Display 785@section Selective Display
786@cindex selective display 786@cindex selective display