(emacs)Pages


Next: Filling Prev: Paragraphs Up: Text

Pages
=====

   Files are often thought of as divided into "pages" by the "formfeed"
character (ASCII control-L, octal code 014).  For example, if a file is
printed on a line printer, each page of the file, in this sense, will
start on a new page of paper.  Emacs treats a page-separator character
just like any other character.  You can insert it with `C-q C-l', or
delete it with DEL.  Thus, you are free to paginate your file or not.
However, since pages are often meaningful divisions of the file, Emacs
provides commands to move over them and operate on them.

`C-x ['
     Move point to previous page boundary (`backward-page').

`C-x ]'
     Move point to next page boundary (`forward-page').

`C-x C-p'
     Put point and mark around this page (or another page)
     (`mark-page').

`C-x l'
     Count the lines in this page (`count-lines-page').

   The `C-x [' (`backward-page') command moves point to immediately
after the previous page delimiter.  If point is already right after a
page delimiter, it skips that one and stops at the previous one.  A
numeric argument serves as a repeat count.  The `C-x ]' (`forward-page')
command moves forward past the next page delimiter.

   The `C-x C-p' command (`mark-page') puts point at the beginning of
the current page and the mark at the end.  The page delimiter at the end
is included (the mark follows it).  The page delimiter at the front is
excluded (point follows it).  This command can be followed by `C-w' to
kill a page which is to be moved elsewhere.  If it is inserted after a
page delimiter, at a place where `C-x ]' or `C-x [' would take you, then
the page will be properly delimited before and after once again.

   A numeric argument to `C-x C-p' is used to specify which page to go
to, relative to the current one.  Zero means the current page.  One
means the next page, and -1 means the previous one.

   The `C-x l' command (`count-lines-page') is good for deciding where
to break a page in two.  It prints in the echo area the total number of
lines in the current page, and then divides it up into those preceding
the current line and those following, as in

     Page has 96 (72+25) lines

Notice that the sum is off by one; this is correct if point is not at
the beginning of a line.

   The variable `page-delimiter' controls where pages begin.  Its value
is a regexp that matches the beginning of a line that separates pages.
The normal value of this variable is `"^\f"', which matches a formfeed
character at the beginning of a line.


automatically generated by info2www