home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / info / emacs-8 < prev    next >
Encoding:
GNU Info File  |  1993-07-06  |  46.9 KB  |  1,146 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.54 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Menu Bars,  Next: Faces,  Prev: Scroll Bars,  Up: Frames
  6.  
  7. Menu Bars
  8. =========
  9.  
  10.    By default, each Emacs frame has a menu bar at the top which you can
  11. use to perform certain common operations.  There's no need to describe
  12. them in detail here, as you can more easily see for yourself; also, we
  13. may change them and add to them in subsequent Emacs versions.
  14.  
  15.    Each of the operations in the menu bar is bound to an ordinary Emacs
  16. command which you can invoke equally well with `M-x' or with its own
  17. key bindings.  To see the command's name and documentation, type `C-h
  18. k' and then select the menu bar item you are interested in.
  19.  
  20.    You can turn display of menu bars on or off with `M-x menu-bar-mode'.
  21. With no argument, this command toggles Menu Bar mode, a minor mode.
  22. With an argument, the command turns Menu Bar mode on if the argument is
  23. positive, off if the argument is not positive.
  24.  
  25. 
  26. File: emacs,  Node: Faces,  Next: Misc X,  Prev: Menu Bars,  Up: Frames
  27.  
  28. Using Multiple Typefaces
  29. ========================
  30.  
  31.    When using Emacs with X, you can set up multiple styles of displaying
  32. characters.  The aspects of style that you can control are the type
  33. font, the foreground color, the background color, and whether to
  34. underline.
  35.  
  36.    The way you control display style is by defining named "faces".
  37. Each face can specify a type font, a foreground color, a background
  38. color, and an underline flag; but it does not have to specify all of
  39. them.
  40.  
  41.    The style of display used for a given character in the text is
  42. determined by combining several faces.  Which faces to use is always set
  43. up by Lisp programs, at present, by means of text properties and
  44. overlays.  Any aspect of the display style that isn't specified by
  45. overlays or text properties comes from the frame itself.
  46.  
  47.    When Transient Mark mode is enabled, the text of the region is
  48. highlighted when the mark is active.  This uses a face named `region';
  49. you can control the style of highlighting by changing the style of this
  50. face with the commands below.  *Note Setting Mark::, for more
  51. information about Transient Mark mode and activation and deactivation
  52. of the mark.
  53.  
  54.    Here are the commands for users to change the font of a face.
  55.  
  56. `M-x set-face-font RET FACE RET FONT RET'
  57.      Use font FONT in face FACE.
  58.  
  59. `M-x make-face-bold RET FACE RET'
  60.      Convert face FACE to use a bold version of its current font.
  61.  
  62. `M-x make-face-italic RET FACE RET'
  63.      Convert face FACE to use a italic version of its current font.
  64.  
  65. `M-x make-face-bold-italic RET FACE RET'
  66.      Convert face FACE to use a bold-italic version of its current font.
  67.  
  68. `M-x make-face-unbold RET FACE RET'
  69.      Convert face FACE to use a non-bold version of its current font.
  70.  
  71. `M-x make-face-unitalic RET FACE RET'
  72.      Convert face FACE to use a non-italic version of its current font.
  73.  
  74.    Here are the commands for users to set the colors and underline flag
  75. of a face:
  76.  
  77. `M-x set-face-foreground RET FACE RET COLOR RET'
  78.      Use color COLOR for the foreground of characters in face FACE.
  79.  
  80. `M-x set-face-background RET FACE RET COLOR RET'
  81.      Use color COLOR for the background of characters in face FACE.
  82.  
  83. `M-x set-face-underline-p RET FACE RET FLAG RET'
  84.      Specify whether to underline characters in face FACE.
  85.  
  86. `M-x invert-face RET FACE RET'
  87.      Swap the foreground and background colors of face FACE.
  88.  
  89. 
  90. File: emacs,  Node: Misc X,  Prev: Faces,  Up: Frames
  91.  
  92. Miscellaneous X Window Features
  93. ===============================
  94.  
  95.    To iconify the selected Emacs frame, type `C-z'.  The normal meaning
  96. of `C-z', to suspend Emacs, is not useful under a window system, so it
  97. has a different binding in that case (the command `iconify-frame').
  98.  
  99.    To delete the selected frame, type `C-x 5 0'.
  100.  
  101.    Under X Windows, when Transient Mark mode is enabled, Emacs
  102. highlights the region when the mark is active.  This is the main motive
  103. for using Transient Mark mode.  To enable this mode, use the command
  104. `M-x transient-mark-mode'.  *Note Mark::.
  105.  
  106. 
  107. File: emacs,  Node: Major Modes,  Next: Indentation,  Prev: Frames,  Up: Top
  108.  
  109. Major Modes
  110. ***********
  111.  
  112.    Emacs provides many alternative "major modes", each of which
  113. customizes Emacs for editing text of a particular sort.  The major modes
  114. are mutually exclusive, and each buffer has one major mode at any time.
  115. The mode line normally shows the name of the current major mode, in
  116. parentheses (*note Mode Line::.).
  117.  
  118.    The least specialized major mode is called "Fundamental mode".  This
  119. mode has no mode-specific redefinitions or variable settings, so that
  120. each Emacs command behaves in its most general manner, and each option
  121. is in its default state.  For editing any specific type of text, such
  122. as Lisp code or English text, you should switch to the appropriate
  123. major mode, such as Lisp mode or Text mode.
  124.  
  125.    Selecting a major mode changes the meanings of a few keys to become
  126. more specifically adapted to the language being edited.  The ones which
  127. are changed frequently are TAB, DEL, and LFD.  In addition, the
  128. commands which handle comments use the mode to determine how comments
  129. are to be delimited.  Many major modes redefine the syntactical
  130. properties of characters appearing in the buffer.  *Note Syntax::.
  131.  
  132.    The major modes fall into three major groups.  Lisp mode (which has
  133. several variants), C mode, Fortran mode and others are for specific
  134. programming languages.  Text mode, Nroff mode, TeX mode and Outline
  135. mode are for editing English text.  The remaining major modes are not
  136. intended for use on users' files; they are used in buffers created for
  137. specific purposes by Emacs, such as Dired mode for buffers made by Dired
  138. (*note Dired::.), and Mail mode for buffers made by `C-x m' (*note
  139. Sending Mail::.), and Shell mode for buffers used for communicating
  140. with an inferior shell process (*note Interactive Shell::.).
  141.  
  142.    Most programming language major modes specify that only blank lines
  143. separate paragraphs.  This is so that the paragraph commands remain
  144. useful.  (*Note Paragraphs::.)  They also cause Auto Fill mode to use
  145. the definition of TAB to indent the new lines it creates.  This is
  146. because most lines in a program are usually indented.  (*Note
  147. Indentation::.)
  148.  
  149. * Menu:
  150.  
  151. * Choosing Modes::     How major modes are specified or chosen.
  152.  
  153. 
  154. File: emacs,  Node: Choosing Modes,  Prev: Major Modes,  Up: Major Modes
  155.  
  156. How Major Modes are Chosen
  157. ==========================
  158.  
  159.    You can select a major mode explicitly for the current buffer, but
  160. most of the time Emacs determines which mode to use based on the file
  161. name or on special text in the file.
  162.  
  163.    Explicit selection of a new major mode is done with a `M-x' command.
  164. From the name of a major mode, add `-mode' to get the name of a command
  165. to select that mode.  Thus, you can enter Lisp mode by executing `M-x
  166. lisp-mode'.
  167.  
  168.    When you visit a file, Emacs usually chooses the right major mode
  169. based on the file's name.  For example, files whose names end in `.c'
  170. are edited in C mode.  The correspondence between file names and major
  171. mode is controlled by the variable `auto-mode-alist'.  Its value is a
  172. list in which each element has the form
  173.  
  174.      (REGEXP . MODE-FUNCTION)
  175.  
  176. For example, one element normally found in the list has the form
  177. `("\\.c$" . c-mode)', and it is responsible for selecting C mode for
  178. files whose names end in `.c'.  (Note that `\\' is needed in Lisp
  179. syntax to include a `\' in the string, which is needed to suppress the
  180. special meaning of `.' in regexps.)  The only practical way to change
  181. this variable is with Lisp code.
  182.  
  183.    You can specify which major mode should be used for editing a certain
  184. file by a special sort of text in the first nonblank line of the file.
  185. The mode name should appear in this line both preceded and followed by
  186. `-*-'.  Other text may appear on the line as well.  For example,
  187.  
  188.      ;-*-Lisp-*-
  189.  
  190. tells Emacs to use Lisp mode.  Such an explicit specification overrides
  191. any defaulting based on the file name.  Note how the semicolon is used
  192. to make Lisp treat this line as a comment.
  193.  
  194.    Another format of mode specification is
  195.  
  196.      -*-Mode: MODENAME;-*-
  197.  
  198. which allows you to specify local variables as well, like this:
  199.  
  200.      -*- mode: MODENAME; VAR: VALUE; ... -*-
  201.  
  202. *Note File Variables::, for more information about this.
  203.  
  204.    When you visit a file that does not specify a major mode to use, or
  205. when you create a new buffer with `C-x b', the variable
  206. `default-major-mode' specifies which major mode to use.  Normally its
  207. value is the symbol `fundamental-mode', which specifies Fundamental
  208. mode.  If `default-major-mode' is `nil', the major mode is taken from
  209. the previously selected buffer.
  210.  
  211.    If you change the major mode of a buffer, you can go back to the
  212. major mode Emacs would choose automatically: use the command `M-x
  213. normal-mode' to do this.  This is the same function that `find-file'
  214. calls to choose the major mode.  It also processes the file's local
  215. variables list if any.
  216.  
  217. 
  218. File: emacs,  Node: Indentation,  Next: Text,  Prev: Major Modes,  Up: Top
  219.  
  220. Indentation
  221. ***********
  222.  
  223.    This chapter describes the Emacs commands that add, remove, or
  224. adjust indentation.
  225.  
  226. `TAB'
  227.      Indent current line "appropriately" in a mode-dependent fashion.
  228.  
  229. `LFD'
  230.      Perform RET followed by TAB (`newline-and-indent').
  231.  
  232. `M-^'
  233.      Merge two lines (`delete-indentation').  This would cancel out the
  234.      effect of LFD.
  235.  
  236. `C-M-o'
  237.      Split line at point; text on the line after point becomes a new
  238.      line indented to the same column that it now starts in
  239.      (`split-line').
  240.  
  241. `M-m'
  242.      Move (forward or back) to the first nonblank character on the
  243.      current line (`back-to-indentation').
  244.  
  245. `C-M-\'
  246.      Indent several lines to same column (`indent-region').
  247.  
  248. `C-x TAB'
  249.      Shift block of lines rigidly right or left (`indent-rigidly').
  250.  
  251. `M-i'
  252.      Indent from point to the next prespecified tab stop column
  253.      (`tab-to-tab-stop').
  254.  
  255. `M-x indent-relative'
  256.      Indent from point to under an indentation point in the previous
  257.      line.
  258.  
  259.    Most programming languages have some indentation convention.  For
  260. Lisp code, lines are indented according to their nesting in
  261. parentheses.  The same general idea is used for C code, though many
  262. details are different.
  263.  
  264.    Whatever the language, to indent a line, use the TAB command.  Each
  265. major mode defines this command to perform the sort of indentation
  266. appropriate for the particular language.  In Lisp mode, TAB aligns the
  267. line according to its depth in parentheses.  No matter where in the
  268. line you are when you type TAB, it aligns the line as a whole.  In C
  269. mode, TAB implements a subtle and sophisticated indentation style that
  270. knows about many aspects of C syntax.
  271.  
  272.    In Text mode, TAB runs the command `tab-to-tab-stop', which indents
  273. to the next tab stop column.  You can set the tab stops with `M-x
  274. edit-tab-stops'.
  275.  
  276. * Menu:
  277.  
  278. * Indentation Commands::  Various commands and techniques for indentation.
  279. * Tab Stops::             You can set arbitrary "tab stops" and then
  280.                             indent to the next tab stop when you want to.
  281. * Just Spaces::           You can request indentation using just spaces.
  282.  
  283. 
  284. File: emacs,  Node: Indentation Commands,  Next: Tab Stops,  Prev: Indentation,  Up: Indentation
  285.  
  286. Indentation Commands and Techniques
  287. ===================================
  288.  
  289.    If you just want to insert a tab character in the buffer, you can
  290. type `C-q TAB'.
  291.  
  292.    To move over the indentation on a line, do `M-m'
  293. (`back-to-indentation').  This command, given anywhere on a line,
  294. positions point at the first nonblank character on the line.
  295.  
  296.    To insert an indented line before the current line, do `C-a C-o
  297. TAB'.  To make an indented line after the current line, use `C-e LFD'.
  298.  
  299.    `C-M-o' (`split-line') moves the text from point to the end of the
  300. line vertically down, so that the current line becomes two lines.
  301. `C-M-o' first moves point forward over any spaces and tabs.  Then it
  302. inserts after point a newline and enough indentation to reach the same
  303. column point is on.  Point remains before the inserted newline; in this
  304. regard, `C-M-o' resembles `C-o'.
  305.  
  306.    To join two lines cleanly, use the `M-^' (`delete-indentation')
  307. command.  It deletes the indentation at the front of the current line,
  308. and the line boundary as well, replacing them with a single space.  As
  309. a special case (useful for Lisp code) the single space is omitted if
  310. the characters to be joined are consecutive open parentheses or closing
  311. parentheses, or if the junction follows another newline.  To delete
  312. just the indentation of a line, go to the beginning of the line and use
  313. `M-\' (`delete-horizontal-space'), which deletes all spaces and tabs
  314. around the cursor.
  315.  
  316.    If you have a fill prefix, `M-^' deletes the fill prefix if it
  317. appears after the newline that is deleted.  *Note Fill Prefix::.
  318.  
  319.    There are also commands for changing the indentation of several
  320. lines at once.  `C-M-\' (`indent-region') gives each line which begins
  321. in the region the "usual" indentation by invoking TAB at the beginning
  322. of the line.  A numeric argument specifies the column to indent to, and
  323. each line is shifted left or right so that its first nonblank character
  324. appears in that column.  `C-x TAB' (`indent-rigidly') moves all of the
  325. lines in the region right by its argument (left, for negative
  326. arguments).  The whole group of lines moves rigidly sideways, which is
  327. how the command gets its name.
  328.  
  329.    `M-x indent-relative' indents at point based on the previous line
  330. (actually, the last nonempty line).  It inserts whitespace at point,
  331. moving point, until it is underneath an indentation point in the
  332. previous line.  An indentation point is the end of a sequence of
  333. whitespace or the end of the line.  If point is farther right than any
  334. indentation point in the previous line, the whitespace before point is
  335. deleted and the first indentation point then applicable is used.  If no
  336. indentation point is applicable even then, `indent-relative' runs
  337. `tab-to-tab-stop' (*note Tab Stops::.).
  338.  
  339.    `indent-relative' is the definition of TAB in Indented Text mode.
  340. *Note Text::.
  341.  
  342. 
  343. File: emacs,  Node: Tab Stops,  Next: Just Spaces,  Prev: Indentation Commands,  Up: Indentation
  344.  
  345. Tab Stops
  346. =========
  347.  
  348.    For typing in tables, you can use Text mode's definition of TAB,
  349. `tab-to-tab-stop'.  This command inserts indentation before point,
  350. enough to reach the next tab stop column.  If you are not in Text mode,
  351. this command can be found on the key `M-i'.
  352.  
  353.    You can specify the tab stops used by `M-i'.  They are stored in a
  354. variable called `tab-stop-list', as a list of column-numbers in
  355. increasing order.
  356.  
  357.    The convenient way to set the tab stops is with `M-x edit-tab-stops',
  358. which creates and selects a buffer containing a description of the tab
  359. stop settings.  You can edit this buffer to specify different tab
  360. stops, and then type `C-c C-c' to make those new tab stops take effect.
  361. In the tab stop buffer, `C-c C-c' runs the function
  362. `edit-tab-stops-note-changes' rather than its usual definition
  363. `save-buffer'.  `edit-tab-stops' records which buffer was current when
  364. you invoked it, and stores the tab stops back in that buffer; normally
  365. all buffers share the same tab stops and changing them in one buffer
  366. affects all, but if you happen to make `tab-stop-list' local in one
  367. buffer then `edit-tab-stops' in that buffer will edit the local
  368. settings.
  369.  
  370.    Here is what the text representing the tab stops looks like for
  371. ordinary tab stops every eight columns.
  372.  
  373.              :       :       :       :       :       :
  374.      0         1         2         3         4
  375.      0123456789012345678901234567890123456789012345678
  376.      To install changes, type C-c C-c
  377.  
  378.    The first line contains a colon at each tab stop.  The remaining
  379. lines are present just to help you see where the colons are and know
  380. what to do.
  381.  
  382.    Note that the tab stops that control `tab-to-tab-stop' have nothing
  383. to do with displaying tab characters in the buffer.  *Note Display
  384. Vars::, for more information on that.
  385.  
  386. 
  387. File: emacs,  Node: Just Spaces,  Prev: Tab Stops,  Up: Indentation
  388.  
  389. Tabs vs. Spaces
  390. ===============
  391.  
  392.    Emacs normally uses both tabs and spaces to indent lines.  If you
  393. prefer, all indentation can be made from spaces only.  To request this,
  394. set `indent-tabs-mode' to `nil'.  This is a per-buffer variable;
  395. altering the variable affects only the current buffer, but there is a
  396. default value which you can change as well.  *Note Locals::.
  397.  
  398.    There are also commands to convert tabs to spaces or vice versa,
  399. always preserving the columns of all nonblank text.  `M-x tabify' scans
  400. the region for sequences of spaces, and converts sequences of at least
  401. three spaces to tabs if that can be done without changing indentation.
  402. `M-x untabify' changes all tabs in the region to appropriate numbers of
  403. spaces.
  404.  
  405. 
  406. File: emacs,  Node: Text,  Next: Programs,  Prev: Indentation,  Up: Top
  407.  
  408. Commands for Human Languages
  409. ****************************
  410.  
  411.    The term "text" has two widespread meanings in our area of the
  412. computer field.  One is data that is a sequence of characters.  Any file
  413. that you edit with Emacs is text, in this sense of the word.  The other
  414. meaning is more restrictive: a sequence of characters in a human
  415. language for humans to read (possibly after processing by a text
  416. formatter), as opposed to a program or commands for a program.
  417.  
  418.    Human languages have syntactic/stylistic conventions that can be
  419. supported or used to advantage by editor commands: conventions involving
  420. words, sentences, paragraphs, and capital letters.  This chapter
  421. describes Emacs commands for all of these things.  There are also
  422. commands for "filling", which means rearranging the lines of a
  423. paragraph to be approximately equal in length.  The commands for moving
  424. over and killing words, sentences and paragraphs, while intended
  425. primarily for editing text, are also often useful for editing programs.
  426.  
  427.    Emacs has several major modes for editing human language text.  If
  428. the file contains text pure and simple, use Text mode, which customizes
  429. Emacs in small ways for the syntactic conventions of text.  For text
  430. which contains embedded commands for text formatters, Emacs has other
  431. major modes, each for a particular text formatter.  Thus, for input to
  432. TeX, you would use TeX mode; for input to nroff, Nroff mode.
  433.  
  434. * Menu:
  435.  
  436. * Words::         Moving over and killing words.
  437. * Sentences::     Moving over and killing sentences.
  438. * Paragraphs::      Moving over paragraphs.
  439. * Pages::      Moving over pages.
  440. * Filling::       Filling or justifying text.
  441. * Case::          Changing the case of text.
  442. * Text Mode::     The major modes for editing text files.
  443. * Outline Mode::  The major mode for editing outlines.
  444. * TeX Mode::      The major modes for editing input to the formatter TeX.
  445. * Nroff Mode::    The major mode for editing input to the formatter nroff.
  446.  
  447. 
  448. File: emacs,  Node: Words,  Next: Sentences,  Up: Text
  449.  
  450. Words
  451. =====
  452.  
  453.    Emacs has commands for moving over or operating on words.  By
  454. convention, the keys for them are all Meta characters.
  455.  
  456. `M-f'
  457.      Move forward over a word (`forward-word').
  458.  
  459. `M-b'
  460.      Move backward over a word (`backward-word').
  461.  
  462. `M-d'
  463.      Kill up to the end of a word (`kill-word').
  464.  
  465. `M-DEL'
  466.      Kill back to the beginning of a word (`backward-kill-word').
  467.  
  468. `M-@'
  469.      Mark the end of the next word (`mark-word').
  470.  
  471. `M-t'
  472.      Transpose two words or drag a word across other words
  473.      (`transpose-words').
  474.  
  475.    Notice how these keys form a series that parallels the
  476. character-based `C-f', `C-b', `C-d', `C-t' and DEL.  `M-@' is related
  477. to `C-@', which is an alias for `C-SPC'.
  478.  
  479.    The commands `M-f' (`forward-word') and `M-b' (`backward-word') move
  480. forward and backward over words.  These Meta characters are thus
  481. analogous to the corresponding control characters, `C-f' and `C-b',
  482. which move over single characters in the text.  The analogy extends to
  483. numeric arguments, which serve as repeat counts.  `M-f' with a negative
  484. argument moves backward, and `M-b' with a negative argument moves
  485. forward.  Forward motion stops right after the last letter of the word,
  486. while backward motion stops right before the first letter.
  487.  
  488.    `M-d' (`kill-word') kills the word after point.  To be precise, it
  489. kills everything from point to the place `M-f' would move to.  Thus, if
  490. point is in the middle of a word, `M-d' kills just the part after
  491. point.  If some punctuation comes between point and the next word, it
  492. is killed along with the word.  (If you wish to kill only the next word
  493. but not the punctuation before it, simply do `M-f' to get the end, and
  494. kill the word backwards with `M-DEL'.) `M-d' takes arguments just like
  495. `M-f'.
  496.  
  497.    `M-DEL' (`backward-kill-word') kills the word before point.  It
  498. kills everything from point back to where `M-b' would move to.  If
  499. point is after the space in `FOO, BAR', then `FOO, ' is killed.  (If
  500. you wish to kill just `FOO', do `M-b M-d' instead of `M-DEL'.)
  501.  
  502.    `M-t' (`transpose-words') exchanges the word before or containing
  503. point with the following word.  The delimiter characters between the
  504. words do not move.  For example, `FOO, BAR' transposes into `BAR, FOO'
  505. rather than `BAR FOO,'.  *Note Transpose::, for more on transposition
  506. and on arguments to transposition commands.
  507.  
  508.    To operate on the next N words with an operation which applies
  509. between point and mark, you can either set the mark at point and then
  510. move over the words, or you can use the command `M-@' (`mark-word')
  511. which does not move point, but sets the mark where `M-f' would move to.
  512. `M-@' accepts a numeric argument that says how many words to scan for
  513. the place to put the mark.
  514.  
  515.    The word commands' understanding of syntax is completely controlled
  516. by the syntax table.  Any character can, for example, be declared to be
  517. a word delimiter.  *Note Syntax::.
  518.  
  519. 
  520. File: emacs,  Node: Sentences,  Next: Paragraphs,  Prev: Words,  Up: Text
  521.  
  522. Sentences
  523. =========
  524.  
  525.    The Emacs commands for manipulating sentences and paragraphs are
  526. mostly on Meta keys, so as to be like the word-handling commands.
  527.  
  528. `M-a'
  529.      Move back to the beginning of the sentence (`backward-sentence').
  530.  
  531. `M-e'
  532.      Move forward to the end of the sentence (`forward-sentence').
  533.  
  534. `M-k'
  535.      Kill forward to the end of the sentence (`kill-sentence').
  536.  
  537. `C-x DEL'
  538.      Kill back to the beginning of the sentence
  539.      (`backward-kill-sentence').
  540.  
  541.    The commands `M-a' and `M-e' (`backward-sentence' and
  542. `forward-sentence') move to the beginning and end of the current
  543. sentence, respectively.  They were chosen to resemble `C-a' and `C-e',
  544. which move to the beginning and end of a line.  Unlike them, `M-a' and
  545. `M-e' if repeated or given numeric arguments move over successive
  546. sentences.  Emacs assumes that the typist's convention is followed, and
  547. thus considers a sentence to end wherever there is a `.', `?' or `!'
  548. followed by the end of a line or two spaces, with any number of `)',
  549. `]', `'', or `"' characters allowed in between.  A sentence also begins
  550. or ends wherever a paragraph begins or ends.
  551.  
  552.    Neither `M-a' nor `M-e' moves past the newline or spaces beyond the
  553. sentence edge at which it is stopping.
  554.  
  555.    Just as `C-a' and `C-e' have a kill command, `C-k', to go with them,
  556. so `M-a' and `M-e' have a corresponding kill command `M-k'
  557. (`kill-sentence') which kills from point to the end of the sentence.
  558. With minus one as an argument it kills back to the beginning of the
  559. sentence.  Larger arguments serve as a repeat count.
  560.  
  561.    There is a special command, `C-x DEL' (`backward-kill-sentence') for
  562. killing back to the beginning of a sentence, because this is useful
  563. when you change your mind in the middle of composing text.
  564.  
  565.    The variable `sentence-end' controls recognition of the end of a
  566. sentence.  It is a regexp that matches the last few characters of a
  567. sentence, together with the whitespace following the sentence.  Its
  568. normal value is
  569.  
  570.      "[.?!][]\"')]*\\($\\|\t\\|  \\)[ \t\n]*"
  571.  
  572. This example is explained in the section on regexps.  *Note Regexps::.
  573.  
  574. 
  575. File: emacs,  Node: Paragraphs,  Next: Pages,  Prev: Sentences,  Up: Text
  576.  
  577. Paragraphs
  578. ==========
  579.  
  580.    The Emacs commands for manipulating paragraphs are also Meta keys.
  581.  
  582. `M-{'
  583.      Move back to previous paragraph beginning (`backward-paragraph').
  584.  
  585. `M-}'
  586.      Move forward to next paragraph end (`forward-paragraph').
  587.  
  588. `M-h'
  589.      Put point and mark around this or next paragraph
  590.      (`mark-paragraph').
  591.  
  592.    `M-{' moves to the beginning of the current or previous paragraph,
  593. while `M-}' moves to the end of the current or next paragraph.  Blank
  594. lines and text formatter command lines separate paragraphs and are not
  595. part of any paragraph.  Also, an indented line starts a new paragraph.
  596.  
  597.    In major modes for programs (as opposed to Text mode), paragraphs
  598. begin and end only at blank lines.  This makes the paragraph commands
  599. continue to be useful even though there are no paragraphs per se.
  600.  
  601.    When there is a fill prefix, then paragraphs are delimited by all
  602. lines which don't start with the fill prefix.  *Note Filling::.
  603.  
  604.    When you wish to operate on a paragraph, you can use the command
  605. `M-h' (`mark-paragraph') to set the region around it.  This command
  606. puts point at the beginning and mark at the end of the paragraph point
  607. was in.  If point is between paragraphs (in a run of blank lines, or at
  608. a boundary), the paragraph following point is surrounded by point and
  609. mark.  If there are blank lines preceding the first line of the
  610. paragraph, one of these blank lines is included in the region.  Thus,
  611. for example, `M-h C-w' kills the paragraph around or after point.
  612.  
  613.    The precise definition of a paragraph boundary is controlled by the
  614. variables `paragraph-separate' and `paragraph-start'.  The value of
  615. `paragraph-start' is a regexp that should match any line that either
  616. starts or separates paragraphs.  The value of `paragraph-separate' is
  617. another regexp that should match only lines that separate paragraphs
  618. without being part of any paragraph.  Lines that start a new paragraph
  619. and are contained in it must match both regexps.  For example, normally
  620. `paragraph-start' is `"^[ \t\n\f]"' and `paragraph-separate' is `"^[
  621. \t\f]*$"'.
  622.  
  623.    Normally it is desirable for page boundaries to separate paragraphs.
  624. The default values of these variables recognize the usual separator for
  625. pages.
  626.  
  627. 
  628. File: emacs,  Node: Pages,  Next: Filling,  Prev: Paragraphs,  Up: Text
  629.  
  630. Pages
  631. =====
  632.  
  633.    Files are often thought of as divided into "pages" by the "formfeed"
  634. character (ASCII control-L, octal code 014).  For example, if a file is
  635. printed on a line printer, each page of the file, in this sense, will
  636. start on a new page of paper.  Emacs treats a page-separator character
  637. just like any other character.  You can insert it with `C-q C-l', or
  638. delete it with DEL.  Thus, you are free to paginate your file or not.
  639. However, since pages are often meaningful divisions of the file, Emacs
  640. provides commands to move over them and operate on them.
  641.  
  642. `C-x ['
  643.      Move point to previous page boundary (`backward-page').
  644.  
  645. `C-x ]'
  646.      Move point to next page boundary (`forward-page').
  647.  
  648. `C-x C-p'
  649.      Put point and mark around this page (or another page)
  650.      (`mark-page').
  651.  
  652. `C-x l'
  653.      Count the lines in this page (`count-lines-page').
  654.  
  655.    The `C-x [' (`backward-page') command moves point to immediately
  656. after the previous page delimiter.  If point is already right after a
  657. page delimiter, it skips that one and stops at the previous one.  A
  658. numeric argument serves as a repeat count.  The `C-x ]' (`forward-page')
  659. command moves forward past the next page delimiter.
  660.  
  661.    The `C-x C-p' command (`mark-page') puts point at the beginning of
  662. the current page and the mark at the end.  The page delimiter at the end
  663. is included (the mark follows it).  The page delimiter at the front is
  664. excluded (point follows it).  This command can be followed by `C-w' to
  665. kill a page which is to be moved elsewhere.  If it is inserted after a
  666. page delimiter, at a place where `C-x ]' or `C-x [' would take you, then
  667. the page will be properly delimited before and after once again.
  668.  
  669.    A numeric argument to `C-x C-p' is used to specify which page to go
  670. to, relative to the current one.  Zero means the current page.  One
  671. means the next page, and -1 means the previous one.
  672.  
  673.    The `C-x l' command (`count-lines-page') is good for deciding where
  674. to break a page in two.  It prints in the echo area the total number of
  675. lines in the current page, and then divides it up into those preceding
  676. the current line and those following, as in
  677.  
  678.      Page has 96 (72+25) lines
  679.  
  680. Notice that the sum is off by one; this is correct if point is not at
  681. the beginning of a line.
  682.  
  683.    The variable `page-delimiter' controls where pages begin.  Its value
  684. is a regexp that matches the beginning of a line that separates pages.
  685. The normal value of this variable is `"^\f"', which matches a formfeed
  686. character at the beginning of a line.
  687.  
  688. 
  689. File: emacs,  Node: Filling,  Next: Case,  Prev: Pages,  Up: Text
  690.  
  691. Filling Text
  692. ============
  693.  
  694.    With Auto Fill mode, text can be "filled" (broken up into lines that
  695. fit in a specified width) as you insert it.  If you alter existing text
  696. it may no longer be properly filled; then you can use the explicit fill
  697. commands to fill the paragraph again.
  698.  
  699. * Menu:
  700.  
  701. * Auto Fill::       Auto Fill mode breaks long lines automatically.
  702. * Fill Commands::  Commands to refill paragraphs and center lines.
  703. * Fill Prefix::    Filling when every line is indented or in a comment, etc.
  704.  
  705. 
  706. File: emacs,  Node: Auto Fill,  Next: Fill Commands,  Up: Filling
  707.  
  708. Auto Fill Mode
  709. --------------
  710.  
  711.    "Auto Fill" mode is a minor mode in which lines are broken
  712. automatically when they become too wide.  Breaking happens only when
  713. you type a SPC or RET.
  714.  
  715. `M-x auto-fill-mode'
  716.      Enable or disable Auto Fill mode.
  717.  
  718. `SPC'
  719. `RET'
  720.      In Auto Fill mode, break lines when appropriate.
  721.  
  722.    `M-x auto-fill-mode' turns Auto Fill mode on if it was off, or off if
  723. it was on.  With a positive numeric argument it always turns Auto Fill
  724. mode on, and with a negative argument always turns it off.  You can see
  725. when Auto Fill mode is in effect by the presence of the word `Fill' in
  726. the mode line, inside the parentheses.  Auto Fill mode is a minor mode,
  727. turned on or off for each buffer individually.  *Note Minor Modes::.
  728.  
  729.    In Auto Fill mode, lines are broken automatically at spaces when
  730. they get longer than the desired width.  Line breaking and
  731. rearrangement takes place only when you type SPC or RET.  If you wish
  732. to insert a space or newline without permitting line-breaking, type
  733. `C-q SPC' or `C-q LFD' (recall that a newline is really a linefeed).
  734. Also, `C-o' inserts a newline without line breaking.
  735.  
  736.    Auto Fill mode works well with Lisp mode, because when it makes a new
  737. line in Lisp mode it indents that line with TAB.  If a line ending in a
  738. comment gets too long, the text of the comment is split into two
  739. comment lines.  Optionally new comment delimiters are inserted at the
  740. end of the first line and the beginning of the second so that each line
  741. is a separate comment; the variable `comment-multi-line' controls the
  742. choice (*note Comments::.).
  743.  
  744.    Auto Fill mode does not refill entire paragraphs.  It can break
  745. lines but cannot merge lines.  So editing in the middle of a paragraph
  746. can result in a paragraph that is not correctly filled.  The easiest
  747. way to make the paragraph properly filled again is usually with the
  748. explicit fill commands.  *Note Fill Commands::.
  749.  
  750.    Many users like Auto Fill mode and want to use it in all text files.
  751. The section on init files says how to arrange this permanently for
  752. yourself.  *Note Init File::.
  753.  
  754. 
  755. File: emacs,  Node: Fill Commands,  Next: Fill Prefix,  Prev: Auto Fill,  Up: Filling
  756.  
  757. Explicit Fill Commands
  758. ----------------------
  759.  
  760. `M-q'
  761.      Fill current paragraph (`fill-paragraph').
  762.  
  763. `C-x f'
  764.      Set the fill column (`set-fill-column').
  765.  
  766. `M-x fill-region'
  767.      Fill each paragraph in the region (`fill-region').
  768.  
  769. `M-x fill-region-as-paragraph.'
  770.      Fill the region, considering it as one paragraph.
  771.  
  772. `M-s'
  773.      Center a line.
  774.  
  775.    To refill a paragraph, use the command `M-q' (`fill-paragraph').
  776. This operates on the paragraph that point is inside, or the one after
  777. point if point is between paragraphs.  Refilling works by removing all
  778. the line-breaks, then inserting new ones where necessary.
  779.  
  780.    The command `M-s' (`center-line') centers the current line within
  781. the current fill column.  With an argument, it centers several lines
  782. individually and moves past them.
  783.  
  784.    To refill many paragraphs, use `M-x fill-region', which divides the
  785. region into paragraphs and fills each of them.
  786.  
  787.    `M-q' and `fill-region' use the same criteria as `M-h' for finding
  788. paragraph boundaries (*note Paragraphs::.).  For more control, you can
  789. use `M-x fill-region-as-paragraph', which refills everything between
  790. point and mark.  This command deletes any blank lines within the
  791. region, so separate blocks of text end up combined into one block.
  792.  
  793.    A numeric argument to `M-q' causes it to "justify" the text as well
  794. as filling it.  This means that extra spaces are inserted to make the
  795. right margin line up exactly at the fill column.  To remove the extra
  796. spaces, use `M-q' with no argument.  (Likewise for `fill-region'.)
  797.  
  798.    When ADAPTIVE-FILL-MODE is non-`nil' (which is normally the case),
  799. if you use `fill-region-as-paragraph' on an indented paragraph and you
  800. don't have a fill prefix, it uses the indentation of the second line of
  801. the paragraph as the fill prefix.  The effect of adaptive filling is
  802. not noticeable in Text mode, because an indented line counts as a
  803. paragraph starter and thus each line of an indented paragraph is
  804. considered a paragraph of its own.  But you do notice the effect in
  805. Indented Text mode and some other major modes.
  806.  
  807.    The maximum line width for filling is in the variable `fill-column'.
  808. Altering the value of `fill-column' makes it local to the current
  809. buffer; until that time, the default value is in effect.  The default is
  810. initially 70.  *Note Locals::.
  811.  
  812.    The easiest way to set `fill-column' is to use the command `C-x f'
  813. (`set-fill-column').  With no argument, it sets `fill-column' to the
  814. current horizontal position of point.  With a numeric argument, it uses
  815. that as the new fill column.
  816.  
  817. 
  818. File: emacs,  Node: Fill Prefix,  Prev: Fill Commands,  Up: Filling
  819.  
  820. The Fill Prefix
  821. ---------------
  822.  
  823.    To fill a paragraph in which each line starts with a special marker
  824. (which might be a few spaces, giving an indented paragraph), use the
  825. "fill prefix" feature.  The fill prefix is a string which Emacs expects
  826. every line to start with, and which is not included in filling.
  827.  
  828. `C-x .'
  829.      Set the fill prefix (`set-fill-prefix').
  830.  
  831. `M-q'
  832.      Fill a paragraph using current fill prefix (`fill-paragraph').
  833.  
  834. `M-x fill-individual-paragraphs'
  835.      Fill the region, considering each change of indentation as
  836.      starting a new paragraph.
  837.  
  838. `M-x fill-nonuniform-paragraphs'
  839.      Fill the region, considering only paragraph-separator lines as
  840.      starting a new paragraph.
  841.  
  842.    To specify a fill prefix, move to a line that starts with the desired
  843. prefix, put point at the end of the prefix, and give the command
  844. `C-x .' (`set-fill-prefix').  That's a period after the `C-x'.  To turn
  845. off the fill prefix, specify an empty prefix: type `C-x .' with point
  846. at the beginning of a line.
  847.  
  848.    When a fill prefix is in effect, the fill commands remove the fill
  849. prefix from each line before filling and insert it on each line after
  850. filling.  The fill prefix is also inserted on new lines made
  851. automatically by Auto Fill mode.  Lines that do not start with the fill
  852. prefix are considered to start paragraphs, both in `M-q' and the
  853. paragraph commands; this is just right if you are using paragraphs with
  854. hanging indentation (every line indented except the first one).  Lines
  855. which are blank or indented once the prefix is removed also separate or
  856. start paragraphs; this is what you want if you are writing
  857. multi-paragraph comments with a comment delimiter on each line.
  858.  
  859.    For example, if `fill-column' is 40 and you set the fill prefix to
  860. `;; ', then `M-q' in the following text
  861.  
  862.      ;; This is an
  863.      ;; example of a paragraph
  864.      ;; inside a Lisp-style comment.
  865.  
  866. produces this:
  867.  
  868.      ;; This is an example of a paragraph
  869.      ;; inside a Lisp-style comment.
  870.  
  871.    The `C-o' command inserts the fill prefix on new lines it creates,
  872. when you use it at the beginning of a line (*note Blank Lines::.).
  873. Conversely, the command `M-^' deletes the prefix (if it occurs) after
  874. the newline that it deletes (*note Indentation::.).
  875.  
  876.    You can use `M-x fill-individual-paragraphs' to set the fill prefix
  877. for each paragraph automatically.  This command divides the region into
  878. paragraphs, treating every change in the amount of indentation as the
  879. start of a new paragraph, and fills each of these paragraphs.  Thus,
  880. all the lines in one "paragraph" have the same amount of indentation.
  881. That indentation serves as the fill prefix for that paragraph.
  882.  
  883.    `M-x fill-nonuniform-paragraphs' is a similar command that divides
  884. the region into paragraphs in a different way.  It considers only
  885. paragraph-separating lines (as defined by `paragraph-separate') as
  886. starting a new paragraph.  Since this means that the lines of one
  887. paragraph may have different amounts of indentation, the fill prefix
  888. used is the smallest amount of indentation of any of the lines of the
  889. paragraph.
  890.  
  891.    The fill prefix is stored in the variable `fill-prefix'.  Its value
  892. is a string, or `nil' when there is no fill prefix.  This is a
  893. per-buffer variable; altering the variable affects only the current
  894. buffer, but there is a default value which you can change as well.
  895. *Note Locals::.
  896.  
  897. 
  898. File: emacs,  Node: Case,  Next: Text Mode,  Prev: Filling,  Up: Text
  899.  
  900. Case Conversion Commands
  901. ========================
  902.  
  903.    Emacs has commands for converting either a single word or any
  904. arbitrary range of text to upper case or to lower case.
  905.  
  906. `M-l'
  907.      Convert following word to lower case (`downcase-word').
  908.  
  909. `M-u'
  910.      Convert following word to upper case (`upcase-word').
  911.  
  912. `M-c'
  913.      Capitalize the following word (`capitalize-word').
  914.  
  915. `C-x C-l'
  916.      Convert region to lower case (`downcase-region').
  917.  
  918. `C-x C-u'
  919.      Convert region to upper case (`upcase-region').
  920.  
  921.    The word conversion commands are the most useful.  `M-l'
  922. (`downcase-word') converts the word after point to lower case, moving
  923. past it.  Thus, repeating `M-l' converts successive words.  `M-u'
  924. (`upcase-word') converts to all capitals instead, while `M-c'
  925. (`capitalize-word') puts the first letter of the word into upper case
  926. and the rest into lower case.  All these commands convert several words
  927. at once if given an argument.  They are especially convenient for
  928. converting a large amount of text from all upper case to mixed case,
  929. because you can move through the text using `M-l', `M-u' or `M-c' on
  930. each word as appropriate, occasionally using `M-f' instead to skip a
  931. word.
  932.  
  933.    When given a negative argument, the word case conversion commands
  934. apply to the appropriate number of words before point, but do not move
  935. point.  This is convenient when you have just typed a word in the wrong
  936. case: you can give the case conversion command and continue typing.
  937.  
  938.    If a word case conversion command is given in the middle of a word,
  939. it applies only to the part of the word which follows point.  This is
  940. just like what `M-d' (`kill-word') does.  With a negative argument,
  941. case conversion applies only to the part of the word before point.
  942.  
  943.    The other case conversion commands are `C-x C-u' (`upcase-region')
  944. and `C-x C-l' (`downcase-region'), which convert everything between
  945. point and mark to the specified case.  Point and mark do not move.
  946.  
  947.    The region case conversion commands `upcase-region' and
  948. `downcase-region' are normally disabled.  This means that they ask for
  949. confirmation if you try to use them.  When you confirm, you may enable
  950. the command, which means it will not ask for confirmation again.  *Note
  951. Disabling::.
  952.  
  953. 
  954. File: emacs,  Node: Text Mode,  Next: Outline Mode,  Prev: Case,  Up: Text
  955.  
  956. Text Mode
  957. =========
  958.  
  959.    When you edit files of text in a human language, it's more convenient
  960. to use Text mode rather than Fundamental mode.  Invoke `M-x text-mode'
  961. to enter Text mode.  In Text mode, TAB runs the function
  962. `tab-to-tab-stop', which allows you to use arbitrary tab stops set with
  963. `M-x edit-tab-stops' (*note Tab Stops::.).  Features concerned with
  964. comments in programs are turned off except when explicitly invoked.
  965. The syntax table is changed so that periods are not considered part of
  966. a word, while apostrophes, backspaces and underlines are.
  967.  
  968.    A similar variant mode is Indented Text mode, intended for editing
  969. text in which most lines are indented.  This mode defines TAB to run
  970. `indent-relative' (*note Indentation::.), and makes Auto Fill indent
  971. the lines it creates.  The result is that normally a line made by Auto
  972. Filling, or by LFD, is indented just like the previous line.  Use `M-x
  973. indented-text-mode' to select this mode.
  974.  
  975.    Entering Text mode or Indented Text mode runs the hook
  976. `text-mode-hook'.  Other major modes related to Text mode also run this
  977. hook, followed by hooks of their own; this includes Nroff mode, TeX
  978. mode, Outline mode and Mail mode.  Hook functions on `text-mode-hook'
  979. can look at the value of `major-mode' to see which of these modes is
  980. actually being entered.  *Note Hooks::.
  981.  
  982. * Menu:
  983.  
  984.   Two modes similar to Text mode are of use for editing text that is to
  985. be passed through a text formatter before achieving the form in which
  986. humans are to read it.
  987.  
  988. * Nroff Mode::  The major mode for editing input to the formatter nroff.
  989. * TeX Mode::    The major modes for editing input to the formatter TeX.
  990.  
  991.   Another similar mode is used for editing outlines.  It allows you
  992. to view the text at various levels of detail.  You can view either
  993. the outline headings alone or both headings and text; you can also
  994. hide some of the headings at lower levels from view to make the high
  995. level structure more visible.
  996.  
  997. * Outline Mode::The major mode for editing outlines.
  998.  
  999. 
  1000. File: emacs,  Node: Outline Mode,  Next: TeX Mode,  Prev: Text Mode,  Up: Text
  1001.  
  1002. Outline Mode
  1003. ============
  1004.  
  1005.    Outline mode is a major mode much like Text mode but intended for
  1006. editing outlines.  It allows you to make parts of the text temporarily
  1007. invisible so that you can see just the overall structure of the
  1008. outline.  Type `M-x outline-mode' to switch to Outline mode as the
  1009. major mode of the current buffer.  Type `M-x outline-minor-mode' to
  1010. enable Outline mode as a minor mode in the current buffer.  When
  1011. Outline minor mode is enabled, the `C-c' commands of Outline mode
  1012. replace those of the major mode.
  1013.  
  1014.    When a line is invisible in outline mode, it does not appear on the
  1015. screen.  The screen appears exactly as if the invisible line were
  1016. deleted, except that an ellipsis (three periods in a row) appears at
  1017. the end of the previous visible line (only one ellipsis no matter how
  1018. many invisible lines follow).
  1019.  
  1020.    All editing commands treat the text of the invisible line as part of
  1021. the previous visible line.  For example, `C-n' moves onto the next
  1022. visible line.  Killing an entire visible line, including its
  1023. terminating newline, really kills all the following invisible lines
  1024. along with it; yanking it all back yanks the invisible lines and they
  1025. remain invisible.
  1026.  
  1027.    Entering Outline mode runs the hook `text-mode-hook' followed by the
  1028. hook `outline-mode-hook' (*note Hooks::.).
  1029.  
  1030. * Menu:
  1031.  
  1032. * Format: Outline Format.       What the text of an outline looks like.
  1033. * Motion: Outline Motion.       Special commands for moving through
  1034.                                      outlines.
  1035. * Visibility: Outline Visibility.  Commands to control what is visible.
  1036.  
  1037. 
  1038. File: emacs,  Node: Outline Format,  Next: Outline Motion,  Up: Outline Mode
  1039.  
  1040. Format of Outlines
  1041. ------------------
  1042.  
  1043.    Outline mode assumes that the lines in the buffer are of two types:
  1044. "heading lines" and "body lines".  A heading line represents a topic in
  1045. the outline.  Heading lines start with one or more stars; the number of
  1046. stars determines the depth of the heading in the outline structure.
  1047. Thus, a heading line with one star is a major topic; all the heading
  1048. lines with two stars between it and the next one-star heading are its
  1049. subtopics; and so on.  Any line that is not a heading line is a body
  1050. line.  Body lines belong with the preceding heading line.  Here is an
  1051. example:
  1052.  
  1053.      * Food
  1054.      
  1055.      This is the body,
  1056.      which says something about the topic of food.
  1057.      
  1058.      ** Delicious Food
  1059.      
  1060.      This is the body of the second-level header.
  1061.      
  1062.      ** Distasteful Food
  1063.      
  1064.      This could have
  1065.      a body too, with
  1066.      several lines.
  1067.      
  1068.      *** Dormitory Food
  1069.      
  1070.      * Shelter
  1071.      
  1072.      A second first-level topic with its header line.
  1073.  
  1074.    A heading line together with all following body lines is called
  1075. collectively an "entry".  A heading line together with all following
  1076. deeper heading lines and their body lines is called a "subtree".
  1077.  
  1078.    You can customize the criterion for distinguishing heading lines by
  1079. setting the variable `outline-regexp'.  Any line whose beginning has a
  1080. match for this regexp is considered a heading line.  Matches that start
  1081. within a line (not at the beginning) do not count.  The length of the
  1082. matching text determines the level of the heading; longer matches make
  1083. a more deeply nested level.  Thus, for example, if a text formatter has
  1084. commands `@chapter', `@section' and `@subsection' to divide the
  1085. document into chapters and sections, you could make those lines count
  1086. as heading lines by setting `outline-regexp' to
  1087. `"@chap\\|@\\(sub\\)*section"'.  Note the trick: the two words
  1088. `chapter' and `section' are equally long, but by defining the regexp to
  1089. match only `chap' we ensure that the length of the text matched on a
  1090. chapter heading is shorter, so that Outline mode will know that
  1091. sections are contained in chapters.  This works as long as no other
  1092. command starts with `@chap'.
  1093.  
  1094.    Outline mode makes a line invisible by changing the newline before it
  1095. into an ASCII control-M (code 015).  Most editing commands that work on
  1096. lines treat an invisible line as part of the previous line because,
  1097. strictly speaking, it *is* part of that line, since there is no longer a
  1098. newline in between.  When you save the file in Outline mode, control-M
  1099. characters are saved as newlines, so the invisible lines become ordinary
  1100. lines in the file.  But saving does not change the visibility status of
  1101. a line inside Emacs.
  1102.  
  1103. 
  1104. File: emacs,  Node: Outline Motion,  Next: Outline Visibility,  Prev: Outline Format,  Up: Outline Mode
  1105.  
  1106. Outline Motion Commands
  1107. -----------------------
  1108.  
  1109.    There are some special motion commands in Outline mode that move
  1110. backward and forward to heading lines.
  1111.  
  1112. `C-c C-n'
  1113.      Move point to the next visible heading line
  1114.      (`outline-next-visible-heading').
  1115.  
  1116. `C-c C-p'
  1117.      Move point to the previous visible heading line
  1118.      (`outline-previous-visible-heading').
  1119.  
  1120. `C-c C-f'
  1121.      Move point to the next visible heading line at the same level as
  1122.      the one point is on (`outline-forward-same-level').
  1123.  
  1124. `C-c C-b'
  1125.      Move point to the previous visible heading line at the same level
  1126.      (`outline-backward-same-level').
  1127.  
  1128. `C-c C-u'
  1129.      Move point up to a lower-level (more inclusive) visible heading
  1130.      line (`outline-up-heading').
  1131.  
  1132.    `C-c C-n' (`next-visible-heading') moves down to the next heading
  1133. line.  `C-c C-p' (`previous-visible-heading') moves similarly backward.
  1134. Both accept numeric arguments as repeat counts.  The names emphasize
  1135. that invisible headings are skipped, but this is not really a special
  1136. feature.  All editing commands that look for lines ignore the invisible
  1137. lines automatically.
  1138.  
  1139.    More powerful motion commands understand the level structure of
  1140. headings.  `C-c C-f' (`outline-forward-same-level') and `C-c C-b'
  1141. (`outline-backward-same-level') move from one heading line to another
  1142. visible heading at the same depth in the outline.  `C-c C-u'
  1143. (`outline-up-heading') moves backward to another heading that is less
  1144. deeply nested.
  1145.  
  1146.