-\1f
-File: xemacs.info, Node: Rectangles, Next: Registers, Prev: Accumulating Text, Up: Top
-
-Rectangles
-==========
-
- The rectangle commands affect rectangular areas of text: all
-characters between a certain pair of columns, in a certain range of
-lines. Commands are provided to kill rectangles, yank killed
-rectangles, clear them out, or delete them. Rectangle commands are
-useful with text in multicolumnar formats, like code with comments at
-the right, or for changing text into or out of such formats.
-
- To specify the rectangle a command should work on, put the mark at
-one corner and point at the opposite corner. The specified rectangle is
-called the "region-rectangle" because it is controlled about the same
-way the region is controlled. Remember that a given combination of
-point and mark values can be interpreted either as specifying a region
-or as specifying a rectangle; it is up to the command that uses them to
-choose the interpretation.
-
-`M-x delete-rectangle'
- Delete the text of the region-rectangle, moving any following text
- on each line leftward to the left edge of the region-rectangle.
-
-`M-x kill-rectangle'
- Similar, but also save the contents of the region-rectangle as the
- "last killed rectangle".
-
-`M-x yank-rectangle'
- Yank the last killed rectangle with its upper left corner at point.
-
-`M-x open-rectangle'
- Insert blank space to fill the space of the region-rectangle. The
- previous contents of the region-rectangle are pushed rightward.
-
-`M-x clear-rectangle'
- Clear the region-rectangle by replacing its contents with spaces.
-
- The rectangle operations fall into two classes: commands deleting and
-moving rectangles, and commands for blank rectangles.
-
- There are two ways to get rid of the text in a rectangle: you can
-discard the text (delete it) or save it as the "last killed" rectangle.
-The commands for these two ways are `M-x delete-rectangle' and `M-x
-kill-rectangle'. In either case, the portion of each line that falls
-inside the rectangle's boundaries is deleted, causing following text
-(if any) on the line to move left.
-
- Note that "killing" a rectangle is not killing in the usual sense;
-the rectangle is not stored in the kill ring, but in a special place
-that only records the most recently killed rectangle (that is, does not
-append to a killed rectangle). Different yank commands have to be used
-and only one rectangle is stored, because yanking a rectangle is quite
-different from yanking linear text and yank-popping commands are
-difficult to make sense of.
-
- Inserting a rectangle is the opposite of deleting one. You specify
-where to put the upper left corner by putting point there. The
-rectangle's first line is inserted at point, the rectangle's second line
-is inserted at a point one line vertically down, and so on. The number
-of lines affected is determined by the height of the saved rectangle.
-
- To insert the last killed rectangle, type `M-x yank-rectangle'.
-This can be used to convert single-column lists into double-column
-lists; kill the second half of the list as a rectangle and then yank it
-beside the first line of the list.
-
- There are two commands for working with blank rectangles: `M-x
-clear-rectangle' erases existing text, and `M-x open-rectangle' inserts
-a blank rectangle. Clearing a rectangle is equivalent to deleting it
-and then inserting a blank rectangle of the same size.
-
- Rectangles can also be copied into and out of registers. *Note
-Rectangle Registers: RegRect.
-
-\1f
-File: xemacs.info, Node: Registers, Next: Display, Prev: Rectangles, Up: Top
-
-Registers
-*********
-
- XEmacs "registers" are places in which you can save text or
-positions for later use. Once you save text or a rectangle in a
-register, you can copy it into the buffer once or many times; a position
-saved in a register is used by moving point to that position.
-Rectangles can also be copied into and out of registers (*note
-Rectangles::.).
-
- Each register has a name which is a single character. A register can
-store a piece of text, a rectangle, a position, a window configuration,
-or a file name, but only one thing at any given time. Whatever you
-store in a register remains there until you store something else in that
-register. To see what a register R contains, use `M-x view-register'.
-
-`M-x view-register <RET> R'
- Display a description of what register R contains.
-
- `M-x view-register' reads a register name as an argument and then
-displays the contents of the specified register.
-
-* Menu:
-
-* Position: RegPos. Saving positions in registers.
-* Text: RegText. Saving text in registers.
-* Rectangle: RegRect. Saving rectangles in registers.
-* Configurations: RegConfig. Saving window configurations in registers.
-* Files: RegFiles. File names in registers.
-* Numbers: RegNumbers. Numbers in registers.
-* Bookmarks:: Bookmarks are like registers, but persistent.
-
-\1f
-File: xemacs.info, Node: RegPos, Next: RegText, Prev: Registers, Up: Registers
-
-Saving Positions in Registers
-=============================
-
- Saving a position records a place in a buffer so that you can move
-back there later. Moving to a saved position switches to that buffer
-and moves point to that place in it.
-
-`C-x r <SPC> R'
- Save position of point in register R (`point-to-register').
-
-`C-x r j R'
- Jump to the position saved in register R (`jump-to-register').
-
- To save the current position of point in a register, choose a name R
-and type `C-x r <SPC> R'. The register R retains the position thus
-saved until you store something else in that register.
-
- The command `C-x r j R' moves point to the position recorded in
-register R. The register is not affected; it continues to record the
-same location. You can jump to the same position using the same
-register as often as you want.
-
- If you use `C-x r j' to go to a saved position, but the buffer it
-was saved from has been killed, `C-x r j' tries to create the buffer
-again by visiting the same file. Of course, this works only for buffers
-that were visiting files.
-
-\1f
-File: xemacs.info, Node: RegText, Next: RegRect, Prev: RegPos, Up: Registers
-
-Saving Text in Registers
-========================
-
- When you want to insert a copy of the same piece of text many times,
-it can be impractical to use the kill ring, since each subsequent kill
-moves the piece of text further down on the ring. It becomes hard to
-keep track of the argument needed to retrieve the same text with `C-y'.
-An alternative is to store the text in a register with `C-x r s'
-(`copy-to-register') and then retrieve it with `C-x r i'
-(`insert-register').
-
-`C-x r s R'
- Copy region into register R (`copy-to-register').
-
-`C-x r g R'
-`C-x r i R'
- Insert text contents of register R (`insert-register').
-
- `C-x r s R' stores a copy of the text of the region into the
-register named R. Given a numeric argument, `C-x r s R' deletes the
-text from the buffer as well.
-
- `C-x r i R' inserts the text from register R in the buffer. By
-default it leaves point before the text and places the mark after it.
-With a numeric argument (`C-u'), it puts point after the text and the
-mark before it.
-
-\1f
-File: xemacs.info, Node: RegRect, Next: RegConfig, Prev: RegText, Up: Registers
-
-Saving Rectangles in Registers
-==============================
-
- A register can contain a rectangle instead of lines of text. The
-rectangle is represented as a list of strings. *Note Rectangles::, for
-basic information on rectangles and how to specify rectangles in a
-buffer.
-
-`C-x r r R'
- Copy the region-rectangle into register R
- (`copy-rectangle-to-register'). With a numeric argument, delete it
- as well.
-
-`C-x r g R'
-`C-x r i R'
- Insert the rectangle stored in register R (if it contains a
- rectangle) (`insert-register').
-
- The `C-x r i R' command inserts linear text if the register
-contains that, or inserts a rectangle if the register contains one.
-
- See also the command `sort-columns', which you can think of as
-sorting a rectangle. *Note Sorting::.
-
-\1f
-File: xemacs.info, Node: RegConfig, Next: RegNumbers, Prev: RegRect, Up: Registers
-
-Saving Window Configurations in Registers
-=========================================
-
- You can save the window configuration of the selected frame in a
-register, or even the configuration of all windows in all frames, and
-restore the configuration later.
-
-`C-x r w R'
- Save the state of the selected frame's windows in register R
- (`window-configuration-to-register').
-
-`M-x frame-configuration-to-register <RET> R'
- Save the state of all frames, including all their windows, in
- register R (`frame-configuration-to-register').
-
- Use `C-x r j R' to restore a window or frame configuration. This is
-the same command used to restore a cursor position. When you restore a
-frame configuration, any existing frames not included in the
-configuration become invisible. If you wish to delete these frames
-instead, use `C-u C-x r j R'.
-
-\1f
-File: xemacs.info, Node: RegNumbers, Next: RegFiles, Prev: RegConfig, Up: Registers
-
-Keeping Numbers in Registers
-============================
-
- There are commands to store a number in a register, to insert the
-number in the buffer in decimal, and to increment it. These commands
-can be useful in keyboard macros (*note Keyboard Macros::.).
-
-`C-u NUMBER C-x r n REG'
- Store NUMBER into register REG (`number-to-register').
-
-`C-u NUMBER C-x r + REG'
- Increment the number in register REG by NUMBER
- (`increment-register').
-
-`C-x r g REG'
- Insert the number from register REG into the buffer.
-
- `C-x r g' is the same command used to insert any other sort of
-register contents into the buffer.
-
-\1f
-File: xemacs.info, Node: RegFiles, Next: Bookmarks, Prev: RegNumbers, Up: Registers
-
-Keeping File Names in Registers
-===============================
-
- If you visit certain file names frequently, you can visit them more
-conveniently if you put their names in registers. Here's the Lisp code
-used to put a file name in a register:
-
- (set-register ?R '(file . NAME))
-
-For example,
-
- (set-register ?z '(file . "/usr/src/xemacs/src/ChangeLog"))
-
-puts the file name shown in register `z'.
-
- To visit the file whose name is in register R, type `C-x r j R'.
-(This is the same command used to jump to a position or restore a frame
-configuration.)
-
-\1f
-File: xemacs.info, Node: Bookmarks, Prev: RegFiles, Up: Registers
-
-Bookmarks
-=========
-
- "Bookmarks" are somewhat like registers in that they record
-positions you can jump to. Unlike registers, they have long names, and
-they persist automatically from one Emacs session to the next. The
-prototypical use of bookmarks is to record "where you were reading" in
-various files.
-
- Note: bookmark.el is distributed in edit-utils package. You need to
-install that to use bookmark facility (*note Packages::.).
-
-`C-x r m <RET>'
- Set the bookmark for the visited file, at point.
-
-`C-x r m BOOKMARK <RET>'
- Set the bookmark named BOOKMARK at point (`bookmark-set').
-
-`C-x r b BOOKMARK <RET>'
- Jump to the bookmark named BOOKMARK (`bookmark-jump').
-
-`C-x r l'
- List all bookmarks (`list-bookmarks').
-
-`M-x bookmark-save'
- Save all the current bookmark values in the default bookmark file.
-
- The prototypical use for bookmarks is to record one current position
-in each of several files. So the command `C-x r m', which sets a
-bookmark, uses the visited file name as the default for the bookmark
-name. If you name each bookmark after the file it points to, then you
-can conveniently revisit any of those files with `C-x r b', and move to
-the position of the bookmark at the same time.
-
- To display a list of all your bookmarks in a separate buffer, type
-`C-x r l' (`list-bookmarks'). If you switch to that buffer, you can
-use it to edit your bookmark definitions or annotate the bookmarks.
-Type `C-h m' in that buffer for more information about its special
-editing commands.
-
- When you kill XEmacs, XEmacs offers to save your bookmark values in
-your default bookmark file, `~/.emacs.bmk', if you have changed any
-bookmark values. You can also save the bookmarks at any time with the
-`M-x bookmark-save' command. The bookmark commands load your default
-bookmark file automatically. This saving and loading is how bookmarks
-persist from one XEmacs session to the next.
-
- If you set the variable `bookmark-save-flag' to 1, then each command
-that sets a bookmark will also save your bookmarks; this way, you don't
-lose any bookmark values even if XEmacs crashes. (The value, if a
-number, says how many bookmark modifications should go by between
-saving.)
-
- Bookmark position values are saved with surrounding context, so that
-`bookmark-jump' can find the proper position even if the file is
-modified slightly. The variable `bookmark-search-size' says how many
-characters of context to record, on each side of the bookmark's
-position.
-
- Here are some additional commands for working with bookmarks:
-
-`M-x bookmark-load <RET> FILENAME <RET>'
- Load a file named FILENAME that contains a list of bookmark
- values. You can use this command, as well as `bookmark-write', to
- work with other files of bookmark values in addition to your
- default bookmark file.
-
-`M-x bookmark-write <RET> FILENAME <RET>'
- Save all the current bookmark values in the file FILENAME.
-
-`M-x bookmark-delete <RET> BOOKMARK <RET>'
- Delete the bookmark named BOOKMARK.
-
-`M-x bookmark-insert-location <RET> BOOKMARK <RET>'
- Insert in the buffer the name of the file that bookmark BOOKMARK
- points to.
-
-`M-x bookmark-insert <RET> BOOKMARK <RET>'
- Insert in the buffer the *contents* of the file that bookmark
- BOOKMARK points to.
-
-\1f
-File: xemacs.info, Node: Display, Next: Search, Prev: Registers, Up: Top
-
-Controlling the Display
-***********************
-
- Since only part of a large buffer fits in the window, XEmacs tries
-to show the part that is likely to be interesting. The display control
-commands allow you to specify which part of the text you want to see.
-
-`C-l'
- Clear frame and redisplay, scrolling the selected window to center
- point vertically within it (`recenter').
-
-`C-v'
-`pgdn'
-`next'
- Scroll forward (a windowful or a specified number of lines)
- (`scroll-up'). On most X keyboards, you can get this
- functionality using the key labelled `Page Down', which generates
- either `next' or `pgdn'.
-
-`M-v'
-`pgup'
-`prior'
- Scroll backward (`scroll-down'). On most X keyboards, you can get
- this functionality using the key labelled `Page Up', which
- generates either `prior' or `pgup'.
-
-`ARG C-l'
- Scroll so point is on line ARG (`recenter').
-
-`C-x <'
-`C-pgdn'
-`C-next'
- Scroll text in current window to the left (`scroll-left').
-
-`C-x >'
-`C-pgup'
-`C-prior'
- Scroll to the right (`scroll-right').
-
-`C-x $'
- Make deeply indented lines invisible (`set-selective-display').
-
-* Menu:
-
-* Scrolling:: Moving text up and down in a window.
-* Horizontal Scrolling:: Moving text left and right in a window.
-* Selective Display:: Hiding lines with lots of indentation.
-* Display Vars:: Information on variables for customizing display.
-
-\1f
-File: xemacs.info, Node: Scrolling, Next: Horizontal Scrolling, Prev: Display, Up: Display
-
-Scrolling
-=========
-
- If a buffer contains text that is too large to fit entirely within
-the window that is displaying the buffer, XEmacs shows a contiguous
-section of the text. The section shown always contains point.
-
- "Scrolling" means moving text up or down in the window so that
-different parts of the text are visible. Scrolling forward means that
-text moves up, and new text appears at the bottom. Scrolling backward
-moves text down and new text appears at the top.
-
- Scrolling happens automatically if you move point past the bottom or
-top of the window. You can also explicitly request scrolling with the
-commands in this section.
-
-`C-l'
- Clear frame and redisplay, scrolling the selected window to center
- point vertically within it (`recenter').
-
-`C-v'
-`pgdn'
-`next'
- Scroll forward (a windowful or a specified number of lines)
- (`scroll-up').
-
-`M-v'
-`pgup'
-`prior'
- Scroll backward (`scroll-down').
-
-`ARG C-l'
- Scroll so point is on line ARG (`recenter').
-
- The most basic scrolling command is `C-l' (`recenter') with no
-argument. It clears the entire frame and redisplays all windows. In
-addition, it scrolls the selected window so that point is halfway down
-from the top of the window.
-
- The scrolling commands `C-v' and `M-v' let you move all the text in
-the window up or down a few lines. `C-v' (`scroll-up') with an
-argument shows you that many more lines at the bottom of the window,
-moving the text and point up together as `C-l' might. `C-v' with a
-negative argument shows you more lines at the top of the window.
-`Meta-v' (`scroll-down') is like `C-v', but moves in the opposite
-direction.
-
- To read the buffer a windowful at a time, use `C-v' with no
-argument. `C-v' takes the last two lines at the bottom of the window
-and puts them at the top, followed by nearly a whole windowful of lines
-not previously visible. Point moves to the new top of the window if it
-was in the text scrolled off the top. `M-v' with no argument moves
-backward with similar overlap. The number of lines of overlap across a
-`C-v' or `M-v' is controlled by the variable
-`next-screen-context-lines'; by default, it is two.
-
- Another way to scroll is using `C-l' with a numeric argument. `C-l'
-does not clear the frame when given an argument; it only scrolls the
-selected window. With a positive argument N, `C-l' repositions text to
-put point N lines down from the top. An argument of zero puts point on
-the very top line. Point does not move with respect to the text;
-rather, the text and point move rigidly on the frame. `C-l' with a
-negative argument puts point that many lines from the bottom of the
-window. For example, `C-u - 1 C-l' puts point on the bottom line, and
-`C-u - 5 C-l' puts it five lines from the bottom. Just `C-u' as
-argument, as in `C-u C-l', scrolls point to the center of the frame.
-
- Scrolling happens automatically if point has moved out of the visible
-portion of the text when it is time to display. Usually scrolling is
-done to put point vertically centered within the window. However, if
-the variable `scroll-step' has a non-zero value, an attempt is made to
-scroll the buffer by that many lines; if that is enough to bring point
-back into visibility, that is what happens.
-
- Scrolling happens automatically if point has moved out of the visible
-portion of the text when it is time to display. Usually scrolling is
-done to put point vertically centered within the window. However, if
-the variable `scroll-step' has a non-zero value, an attempt is made to
-scroll the buffer by that many lines; if that is enough to bring point
-back into visibility, that is what happens.
-
- If you set `scroll-step' to a small value because you want to use
-arrow keys to scroll the screen without recentering, the redisplay
-preemption will likely make XEmacs keep recentering the screen when
-scrolling fast, regardless of `scroll-step'. To prevent this, set
-`scroll-conservatively' to a small value, which will have the result of
-overriding the redisplay preemption.
-
-\1f
-File: xemacs.info, Node: Horizontal Scrolling, Prev: Scrolling, Up: Display
-
-Horizontal Scrolling
-====================
-
-`C-x <'
- Scroll text in current window to the left (`scroll-left').
-
-`C-x >'
- Scroll to the right (`scroll-right').
-
- The text in a window can also be scrolled horizontally. This means
-that each line of text is shifted sideways in the window, and one or
-more characters at the beginning of each line are not displayed at all.
-When a window has been scrolled horizontally in this way, text lines
-are truncated rather than continued (*note Continuation Lines::.), with
-a `$' appearing in the first column when there is text truncated to the
-left, and in the last column when there is text truncated to the right.
-
- The command `C-x <' (`scroll-left') scrolls the selected window to
-the left by N columns with argument N. With no argument, it scrolls by
-almost the full width of the window (two columns less, to be precise).
-`C-x >' (`scroll-right') scrolls similarly to the right. The window
-cannot be scrolled any farther to the right once it is displaying
-normally (with each line starting at the window's left margin);
-attempting to do so has no effect.
-
-\1f
-File: xemacs.info, Node: Selective Display, Next: Display Vars, Prev: Display, Up: Display
-
-Selective Display
-=================
-
- XEmacs can hide lines indented more than a certain number of columns
-(you specify how many columns). This allows you to get an overview of
-a part of a program.
-
- To hide lines, type `C-x $' (`set-selective-display') with a numeric
-argument N. (*Note Arguments::, for information on giving the
-argument.) Lines with at least N columns of indentation disappear from
-the screen. The only indication of their presence are three dots
-(`...'), which appear at the end of each visible line that is followed
-by one or more invisible ones.
-
- The invisible lines are still present in the buffer, and most editing
-commands see them as usual, so it is very easy to put point in the
-middle of invisible text. When this happens, the cursor appears at the
-end of the previous line, after the three dots. If point is at the end
-of the visible line, before the newline that ends it, the cursor
-appears before the three dots.
-
- The commands `C-n' and `C-p' move across the invisible lines as if
-they were not there.
-
- To make everything visible again, type `C-x $' with no argument.
-