home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / emacs-19.000 / emacs-19 / usr / local / info / emacs-3 < prev    next >
Encoding:
GNU Info File  |  1995-09-11  |  47.4 KB  |  1,177 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.55 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Position Info,  Next: Arguments,  Prev: Continuation Lines,  Up: Basic
  6.  
  7. Cursor Position Information
  8. ===========================
  9.  
  10.    Here are commands to get information about the size and position of
  11. parts of the buffer, and to count lines.
  12.  
  13. `M-x what-page'
  14.      Print page number of point, and line number within page.
  15.  
  16. `M-x what-line'
  17.      Print line number of point in the buffer.
  18.  
  19. `M-x line-number-mode'
  20.      Toggle automatic display of current line number.
  21.  
  22. `M-='
  23.      Print number of lines in the current region (`count-lines-region').
  24.      *Note Mark::, for information about the region.
  25.  
  26. `C-x ='
  27.      Print character code of character after point, character position
  28.      of point, and column of point (`what-cursor-position').
  29.  
  30.    There are two commands for working with line numbers.  `M-x
  31. what-line' computes the current line number and displays it in the echo
  32. area.  To go to a given line by number, use `M-x goto-line'; it prompts
  33. you for the number.  These line numbers count from one at the beginning
  34. of the buffer.
  35.  
  36.    `M-x line-number-mode' enables display of the current line number in
  37. the mode line; once you turn this on, the number updates as you move
  38. point, so it remains valid all the time.  *Note Mode Line::.  If you
  39. narrow the buffer, only the accessible portion counts for this feature.
  40.  
  41.    By contrast, `M-x what-page' counts pages from the beginning of the
  42. file, and counts lines within the page, printing both numbers.  *Note
  43. Pages::.
  44.  
  45.    While on this subject, we might as well mention `M-='
  46. (`count-lines-region'), which prints the number of lines in the region
  47. (*note Mark::.).  *Note Pages::, for the command `C-x l' which counts
  48. the lines in the current page.
  49.  
  50.    The command `C-x =' (`what-cursor-position') can be used to find out
  51. the column that the cursor is in, and other miscellaneous information
  52. about point.  It prints a line in the echo area that looks like this:
  53.  
  54.      Char: x (0170)  point=65986 of 563027(12%)  x=44
  55.  
  56. (In fact, this is the output produced when point is before the `x=44'
  57. in the example.)
  58.  
  59.    The two values after `Char:' describe the character that follows
  60. point, first by showing it and second by giving its octal character
  61. code.
  62.  
  63.    `point=' is followed by the position of point expressed as a
  64. character count.  The front of the buffer counts as position 1, one
  65. character later as 2, and so on.  The next, larger number is the total
  66. number of characters in the buffer.  Afterward in parentheses comes the
  67. position expressed as a percentage of the total size.
  68.  
  69.    `x=' is followed by the horizontal position of point, in columns
  70. from the left edge of the window.
  71.  
  72.    If the buffer has been narrowed, making some of the text at the
  73. beginning and the end temporarily inaccessible, `C-x =' prints
  74. additional text describing the currently accessible range.  For
  75. example, it might display this:
  76.  
  77.      Char: x (0170)  point=65986 of 563025(12%) <65102 - 68533>  x=44
  78.  
  79. where the two extra numbers give the smallest and largest character
  80. position that point is allowed to assume.  The characters between those
  81. two positions are the accessible ones.  *Note Narrowing::.
  82.  
  83.    If point is at the end of the buffer (or the end of the accessible
  84. part), `C-x =' omits any description of the character after point.  The
  85. output looks like this:
  86.  
  87.      point=563026 of 563025(100%)  x=0
  88.  
  89. 
  90. File: emacs,  Node: Arguments,  Prev: Position Info,  Up: Basic
  91.  
  92. Numeric Arguments
  93. =================
  94.  
  95.    Any Emacs command can be given a "numeric argument" (also called a
  96. "prefix argument").  Some commands interpret the argument as a
  97. repetition count.  For example, `C-f' with an argument of ten moves
  98. forward ten characters instead of one.  With these commands, no argument
  99. is equivalent to an argument of one.  Negative arguments tell most such
  100. commands to move or act in the opposite direction.
  101.  
  102.    If your terminal keyboard has a META key, the easiest way to specify
  103. a numeric argument is to type digits and/or a minus sign while holding
  104. down the the META key.  For example,
  105.      M-5 C-n
  106.  
  107. would move down five lines.  The characters `Meta-1', `Meta-2', and so
  108. on, as well as `Meta--', do this because they are keys bound to
  109. commands (`digit-argument' and `negative-argument') that are defined to
  110. contribute to an argument for the next command.  Digits and `-'
  111. modified with Control, or Control and Meta, also specify numeric
  112. arguments.
  113.  
  114.    Another way of specifying an argument is to use the `C-u'
  115. (`universal-argument') command followed by the digits of the argument.
  116. With `C-u', you can type the argument digits without holding down
  117. modifier keys; `C-u' works on all terminals.  To type a negative
  118. argument, type a minus sign after `C-u'.  Just a minus sign without
  119. digits normally means -1.
  120.  
  121.    `C-u' followed by a character which is neither a digit nor a minus
  122. sign has the special meaning of "multiply by four".  It multiplies the
  123. argument for the next command by four.  `C-u' twice multiplies it by
  124. sixteen.  Thus, `C-u C-u C-f' moves forward sixteen characters.  This
  125. is a good way to move forward "fast", since it moves about 1/5 of a line
  126. in the usual size screen.  Other useful combinations are `C-u C-n',
  127. `C-u C-u C-n' (move down a good fraction of a screen), `C-u C-u C-o'
  128. (make "a lot" of blank lines), and `C-u C-k' (kill four lines).
  129.  
  130.    Some commands care only about whether there is an argument, and not
  131. about its value.  For example, the command `M-q' (`fill-paragraph') with
  132. no argument fills text; with an argument, it justifies the text as well.
  133. (*Note Filling::, for more information on `M-q'.)  Plain `C-u' is a
  134. handy way of providing an argument for such commands.
  135.  
  136.    Some commands use the value of the argument as a repeat count, but do
  137. something peculiar when there is no argument.  For example, the command
  138. `C-k' (`kill-line') with argument N kills N lines, including their
  139. terminating newlines.  But `C-k' with no argument is special: it kills
  140. the text up to the next newline, or, if point is right at the end of
  141. the line, it kills the newline itself.  Thus, two `C-k' commands with
  142. no arguments can kill a nonblank line, just like `C-k' with an argument
  143. of one.  (*Note Killing::, for more information on `C-k'.)
  144.  
  145.    A few commands treat a plain `C-u' differently from an ordinary
  146. argument.  A few others may treat an argument of just a minus sign
  147. differently from an argument of -1.  These unusual cases are described
  148. when they come up; they are always for reasons of convenience of use of
  149. the individual command.
  150.  
  151.    You can use a numeric argument to insert multiple copies of a
  152. character.  This is straightforward unless the character is a digit; for
  153. example, `C-u 6 4 a' inserts 64 copies of the character `a'.  But this
  154. does not work for inserting digits; `C-u 6 4 1' specifies an argument
  155. of 641, rather than inserting anything.  To separate the digit to
  156. insert from the argument, type another `C-u'; for example, `C-u 6 4 C-u
  157. 1' does insert 64 copies of the character `1'.
  158.  
  159.    We use the term "prefix argument" as well as "numeric argument" to
  160. emphasize that you type the argument before the command, and to
  161. distinguish these arguments from minibuffer arguments that come after
  162. the command.
  163.  
  164. 
  165. File: emacs,  Node: Minibuffer,  Next: M-x,  Prev: Basic,  Up: Top
  166.  
  167. The Minibuffer
  168. **************
  169.  
  170.    The "minibuffer" is the facility used by Emacs commands to read
  171. arguments more complicated than a single number.  Minibuffer arguments
  172. can be file names, buffer names, Lisp function names, Emacs command
  173. names, Lisp expressions, and many other things, depending on the command
  174. reading the argument.  You can use the usual Emacs editing commands in
  175. the minibuffer to edit the argument text.
  176.  
  177.    When the minibuffer is in use, it appears in the echo area, and the
  178. terminal's cursor moves there.  The beginning of the minibuffer line
  179. displays a "prompt" which says what kind of input you should supply and
  180. how it will be used.  Often this prompt is derived from the name of the
  181. command that the argument is for.  The prompt normally ends with a
  182. colon.
  183.  
  184.    Sometimes a "default argument" appears in parentheses after the
  185. colon; it too is part of the prompt.  The default will be used as the
  186. argument value if you enter an empty argument (e.g., just type RET).
  187. For example, commands that read buffer names always show a default,
  188. which is the name of the buffer that will be used if you type just RET.
  189.  
  190.    The simplest way to enter a minibuffer argument is to type the text
  191. you want, terminated by RET which exits the minibuffer.  You can cancel
  192. the command that wants the argument, and get out of the minibuffer, by
  193. typing `C-g'.
  194.  
  195.    Since the minibuffer uses the screen space of the echo area, it can
  196. conflict with other ways Emacs customarily uses the echo area.  Here is
  197. how Emacs handles such conflicts:
  198.  
  199.    * If a command gets an error while you are in the minibuffer, this
  200.      does not cancel the minibuffer.  However, the echo area is needed
  201.      for the error message and therefore the minibuffer itself is
  202.      hidden for a while.  It comes back after a few seconds, or as soon
  203.      as you type anything.
  204.  
  205.    * If in the minibuffer you use a command whose purpose is to print a
  206.      message in the echo area, such as `C-x =', the message is printed
  207.      normally, and the minibuffer is hidden for a while.  It comes back
  208.      after a few seconds, or as soon as you type anything.
  209.  
  210.    * Echoing of keystrokes does not take place while the minibuffer is
  211.      in use.
  212.  
  213. * Menu:
  214.  
  215. * File: Minibuffer File.  Entering file names with the minibuffer.
  216. * Edit: Minibuffer Edit.  How to edit in the minibuffer.
  217. * Completion::          An abbreviation facility for minibuffer input.
  218. * Minibuffer History::    Reusing recent minibuffer arguments.
  219. * Repetition::          Re-executing commands that used the minibuffer.
  220.  
  221. 
  222. File: emacs,  Node: Minibuffer File,  Next: Minibuffer Edit,  Up: Minibuffer
  223.  
  224. Minibuffers for File Names
  225. ==========================
  226.  
  227.    Sometimes the minibuffer starts out with text in it.  For example,
  228. when you are supposed to give a file name, the minibuffer starts out
  229. containing the "default directory", which ends with a slash.  This is
  230. to inform you which directory the file will be found in if you do not
  231. specify a directory.
  232.  
  233.    For example, the minibuffer might start out with these contents:
  234.  
  235.      Find File: /u2/emacs/src/
  236.  
  237. where `Find File: ' is the prompt.  Typing `buffer.c' specifies the
  238. file `/u2/emacs/src/buffer.c'.  To find files in nearby directories,
  239. use `..'; thus, if you type `../lisp/simple.el', you will get the file
  240. named `/u2/emacs/lisp/simple.el'.  Alternatively, you can kill with
  241. `M-DEL' the directory names you don't want (*note Words::.).
  242.  
  243.    If you don't want any of the default, you can kill it with `C-a
  244. C-k'.  But you don't need to kill the default; you can simply ignore it.
  245. Insert an absolute file name, one starting with a slash or a tilde,
  246. after the default directory.  For example, to specify the file
  247. `/etc/termcap', just insert that name, giving these minibuffer contents:
  248.  
  249.      Find File: /u2/emacs/src//etc/termcap
  250.  
  251. Two slashes in a row are not normally meaningful in a file name, but
  252. they are allowed in GNU Emacs.  They mean, "ignore everything before
  253. the second slash in the pair."  Thus, `/u2/emacs/src/' is ignored in
  254. the example above, and you get the file `/etc/termcap'.
  255.  
  256.    If you set `insert-default-directory' to `nil', the default
  257. directory is not inserted in the minibuffer.  This way, the minibuffer
  258. starts out empty.  But the name you type, if relative, is still
  259. interpreted with respect to the same default directory.
  260.  
  261. 
  262. File: emacs,  Node: Minibuffer Edit,  Next: Completion,  Prev: Minibuffer File,  Up: Minibuffer
  263.  
  264. Editing in the Minibuffer
  265. =========================
  266.  
  267.    The minibuffer is an Emacs buffer (albeit a peculiar one), and the
  268. usual Emacs commands are available for editing the text of an argument
  269. you are entering.
  270.  
  271.    Since RET in the minibuffer is defined to exit the minibuffer, you
  272. can't use it to insert a newline in the minibuffer.  To do that, type
  273. `C-o' or `C-q LFD'.  (Recall that a newline is really the LFD
  274. character.)
  275.  
  276.    The minibuffer has its own window which always has space on the
  277. screen but acts as if it were not there when the minibuffer is not in
  278. use.  When the minibuffer is in use, its window is just like the
  279. others; you can switch to another window with `C-x o', edit text in
  280. other windows and perhaps even visit more files, before returning to
  281. the minibuffer to submit the argument.  You can kill text in another
  282. window, return to the minibuffer window, and then yank the text to use
  283. it in the argument.  *Note Windows::.
  284.  
  285.    There are some restrictions on the use of the minibuffer window,
  286. however.  You cannot switch buffers in it--the minibuffer and its
  287. window are permanently attached.  Also, you cannot split or kill the
  288. minibuffer window.  But you can make it taller in the normal fashion
  289. with `C-x ^'.  If you enable Resize-Minibuffer mode, then the
  290. minibuffer window expands vertically as necessary to hold the text that
  291. you put in the minibuffer.  Use `M-x resize-minibuffer-mode' to enable
  292. or disable this minor mode (*note Minor Modes::.).
  293.  
  294.    If while in the minibuffer you issue a command that displays help
  295. text of any sort in another window, you can use the `C-M-v' command
  296. while in the minibuffer to scroll the help text.  This lasts until you
  297. exit the minibuffer.  This feature is especially useful if a completing
  298. minibuffer gives you a list of possible completions.  *Note Other
  299. Window::.
  300.  
  301.    Emacs normally disallows most commands that use the minibuffer while
  302. the minibuffer is selected.  This rule is to prevent recursive
  303. minibuffers from confusing novice users.  If you want to be able to use
  304. such commands in the minibuffer, set the variable
  305. `enable-recursive-minibuffers' to a non-`nil' value.
  306.  
  307. 
  308. File: emacs,  Node: Completion,  Next: Minibuffer History,  Prev: Minibuffer Edit,  Up: Minibuffer
  309.  
  310. Completion
  311. ==========
  312.  
  313.    For certain kinds of arguments, you can use "completion" to enter
  314. the argument value.  Completion means that you type part of the
  315. argument, then Emacs visibly fills in the rest, or as much as can be
  316. determined from the part you have typed.
  317.  
  318.    When completion is available, certain keys--TAB, RET, and SPC--are
  319. rebound to complete the text present in the minibuffer into a longer
  320. string that it stands for, by matching it against a set of "completion
  321. alternatives" provided by the command reading the argument.  `?' is
  322. defined to display a list of possible completions of what you have
  323. inserted.
  324.  
  325.    For example, when `M-x' uses the minibuffer to read the name of a
  326. command, it provides a list of all available Emacs command names to
  327. complete against.  The completion keys match the text in the minibuffer
  328. against all the command names, find any additional name characters
  329. implied by the ones already present in the minibuffer, and add those
  330. characters to the ones you have given.  This is what makes it possible
  331. to type `M-x ins SPC b RET' instead of `M-x insert-buffer RET' (for
  332. example).
  333.  
  334.    Case is normally significant in completion, because it is significant
  335. in most of the names that you can complete (buffer names, file names and
  336. command names).  Thus, `fo' does not complete to `Foo'.  Completion
  337. does ignore case distinctions for certain arguments in which case does
  338. not matter.
  339.  
  340. * Menu:
  341.  
  342. * Example: Completion Example.
  343. * Commands: Completion Commands.
  344. * Strict Completion::
  345. * Options: Completion Options.
  346.  
  347. 
  348. File: emacs,  Node: Completion Example,  Next: Completion Commands,  Up: Completion
  349.  
  350. Completion Example
  351. ------------------
  352.  
  353.    A concrete example may help here.  If you type `M-x au TAB', the TAB
  354. looks for alternatives (in this case, command names) that start with
  355. `au'.  There are only two: `auto-fill-mode' and `auto-save-mode'.
  356. These are the same as far as `auto-', so the `au' in the minibuffer
  357. changes to `auto-'.
  358.  
  359.    If you type TAB again immediately, there are multiple possibilities
  360. for the very next character--it could be `s' or `f'--so no more
  361. characters are added; instead, TAB displays a list of all possible
  362. completions in another window.
  363.  
  364.    If you go on to type `f TAB', this TAB sees `auto-f'.  The only
  365. command name starting this way is `auto-fill-mode', so completion fills
  366. in the rest of that.  You now have `auto-fill-mode' in the minibuffer
  367. after typing just `au TAB f TAB'.  Note that TAB has this effect
  368. because in the minibuffer it is bound to the command
  369. `minibuffer-complete' when completion is available.
  370.  
  371. 
  372. File: emacs,  Node: Completion Commands,  Next: Strict Completion,  Prev: Completion Example,  Up: Completion
  373.  
  374. Completion Commands
  375. -------------------
  376.  
  377.    Here is a list of the completion commands defined in the minibuffer
  378. when completion is available.
  379.  
  380. `TAB'
  381.      Complete the text in the minibuffer as much as possible
  382.      (`minibuffer-complete').
  383.  
  384. `SPC'
  385.      Complete the minibuffer text, but don't go beyond one word
  386.      (`minibuffer-complete-word').
  387.  
  388. `RET'
  389.      Submit the text in the minibuffer as the argument, possibly
  390.      completing first as described below
  391.      (`minibuffer-complete-and-exit').
  392.  
  393. `?'
  394.      Print a list of all possible completions of the text in the
  395.      minibuffer (`minibuffer-list-completions').
  396.  
  397.    SPC completes much like TAB, but never goes beyond the next hyphen
  398. or space.  If you have `auto-f' in the minibuffer and type SPC, it
  399. finds that the completion is `auto-fill-mode', but it stops completing
  400. after `fill-'.  This gives `auto-fill-'.  Another SPC at this point
  401. completes all the way to `auto-fill-mode'.  SPC in the minibuffer when
  402. completion is available runs the command `minibuffer-complete-word'.
  403.  
  404.    Here are some commands you can use to choose a completion from a
  405. window that displays a list of completions:
  406.  
  407. `Mouse-2'
  408.      Clicking mouse button 2 on a completion in the list of possible
  409.      completions chooses that completion (`mouse-choose-completion').
  410.      You normally use this command while point is in the minibuffer;
  411.      but you must click in the list of completions, not in the
  412.      minibuffer itself.
  413.  
  414. `PRIOR'
  415. `M-v'
  416.      Typing PRIOR or PAGE-UP, or `M-v', while in the minibuffer,
  417.      selects the window showing the completion list buffer
  418.      (`switch-to-completions').  This paves the way for using the
  419.      commands below.  (Selecting that window in the usual ways has the
  420.      same effect, but this way is more convenient.)
  421.  
  422. `RET'
  423.      Typing RET *in the completion list buffer* chooses the completion
  424.      that point is in or next to (`choose-completion').  To use this
  425.      command, you must first switch windows to the window that shows
  426.      the list of completions.
  427.  
  428. `RIGHT'
  429.      Typing the right-arrow key RIGHT *in the completion list buffer*
  430.      moves point to the following completion (`next-completion').
  431.  
  432. `LEFT'
  433.      Typing the left-arrow key LEFT *in the completion list buffer*
  434.      moves point toward the beginning of the buffer, to the previous
  435.      completion (`previous-completion').
  436.  
  437. 
  438. File: emacs,  Node: Strict Completion,  Next: Completion Options,  Prev: Completion Commands,  Up: Completion
  439.  
  440. Strict Completion
  441. -----------------
  442.  
  443.    There are three different ways that RET can work in completing
  444. minibuffers, depending on how the argument will be used.
  445.  
  446.    * "Strict" completion is used when it is meaningless to give any
  447.      argument except one of the known alternatives.  For example, when
  448.      `C-x k' reads the name of a buffer to kill, it is meaningless to
  449.      give anything but the name of an existing buffer.  In strict
  450.      completion, RET refuses to exit if the text in the minibuffer does
  451.      not complete to an exact match.
  452.  
  453.    * "Cautious" completion is similar to strict completion, except that
  454.      RET exits only if the text was an exact match already, not needing
  455.      completion.  If the text is not an exact match, RET does not exit,
  456.      but it does complete the text.  If it completes to an exact match,
  457.      a second RET will exit.
  458.  
  459.      Cautious completion is used for reading file names for files that
  460.      must already exist.
  461.  
  462.    * "Permissive" completion is used when any string whatever is
  463.      meaningful, and the list of completion alternatives is just a
  464.      guide.  For example, when `C-x C-f' reads the name of a file to
  465.      visit, any file name is allowed, in case you want to create a
  466.      file.  In permissive completion, RET takes the text in the
  467.      minibuffer exactly as given, without completing it.
  468.  
  469.    The completion commands display a list of all possible completions in
  470. a window whenever there is more than one possibility for the very next
  471. character.  Also, typing `?' explicitly requests such a list.  If the
  472. list of completions is long, you can scroll it with `C-M-v' (*note
  473. Other Window::.).
  474.  
  475. 
  476. File: emacs,  Node: Completion Options,  Prev: Strict Completion,  Up: Completion
  477.  
  478. Completion Options
  479. ------------------
  480.  
  481.    When completion is done on file names, certain file names are usually
  482. ignored.  The variable `completion-ignored-extensions' contains a list
  483. of strings; a file whose name ends in any of those strings is ignored
  484. as a possible completion.  The standard value of this variable has
  485. several elements including `".o"', `".elc"', `".dvi"' and `"~"'.  The
  486. effect is that, for example, `foo' can complete to `foo.c' even though
  487. `foo.o' exists as well.  However, if *all* the possible completions end
  488. in "ignored" strings, then they are not ignored.  Ignored extensions do
  489. not apply to lists of completions--those always mention all possible
  490. completions.
  491.  
  492.    Normally, a completion command that finds the next character is
  493. undetermined automatically displays a list of all possible completions.
  494. If the variable `completion-auto-help' is set to `nil', this does not
  495. happen, and you must type `?' to display the possible completions.
  496.  
  497.    The `complete' library implements a more powerful kind of completion
  498. that can complete multiple words at a time.  For example, it can
  499. complete the command name abbreviation `p-b' into `print-buffer',
  500. because no other command starts with two words whose initials are `p'
  501. and `b'.  To use this library, put `(load "complete")' in your
  502. `~/.emacs' file (*note Init File::.).
  503.  
  504.    Icomplete mode presents a constantly-updated display that tells you
  505. what completions are available for the text you've entered so far.  The
  506. command to enable or disable this minor mode is `M-x icomplete-mode'.
  507.  
  508. 
  509. File: emacs,  Node: Minibuffer History,  Next: Repetition,  Prev: Completion,  Up: Minibuffer
  510.  
  511. Minibuffer History
  512. ==================
  513.  
  514.    Every argument that you enter with the minibuffer is saved on a
  515. "minibuffer history list" so that you can use it again later in another
  516. argument.  Special commands load the text of an earlier argument in the
  517. minibuffer.  They discard the old minibuffer contents, so you can think
  518. of them as moving through the history of previous arguments.
  519.  
  520. `M-p'
  521.      Move to the next earlier argument string saved in the minibuffer
  522.      history (`previous-history-element').
  523.  
  524. `M-n'
  525.      Move to the next later argument string saved in the minibuffer
  526.      history (`next-history-element').
  527.  
  528. `M-r REGEXP RET'
  529.      Move to an earlier saved argument in the minibuffer history that
  530.      has a match for REGEXP (`previous-matching-history-element').
  531.  
  532. `M-s REGEXP RET'
  533.      Move to a later saved argument in the minibuffer history that has a
  534.      match for REGEXP (`next-matching-history-element').
  535.  
  536.    The simplest way to reuse the saved arguments in the history list is
  537. to move through the history list one element at a time.  While in the
  538. minibuffer, type `M-p' (`previous-history-element') to "move to" the
  539. next earlier minibuffer input, and use `M-n' (`next-history-element')
  540. to "move to" the next later input.
  541.  
  542.    The previous input that you fetch from the history entirely replaces
  543. the contents of the minibuffer.  To use it as the argument, exit the
  544. minibuffer as usual with RET.  You can also edit the text before you
  545. reuse it; this does not change the history element that you "moved" to,
  546. but your new argument does go at the end of the history list in its own
  547. right.
  548.  
  549.    There are also commands to search forward or backward through the
  550. history.  As of this writing, they search for history elements that
  551. match a regular expression that you specify with the minibuffer.  `M-r'
  552. (`previous-matching-history-element') searches older elements in the
  553. history, while `M-s' (`next-matching-history-element') searches newer
  554. elements.  By special dispensation, these commands can use the
  555. minibuffer to read their arguments even though you are already in the
  556. minibuffer when you issue them.
  557.  
  558.    All uses of the minibuffer record your input on a history list, but
  559. there are separate history lists for different kinds of arguments.  For
  560. example, there is a list for file names, used by all the commands that
  561. read file names.  There is a list for arguments of commands like
  562. `query-replace'.  There are several very specific history lists,
  563. including one for command names read by M-x and one for compilation
  564. commands read by `compile'.  Finally, there is one "miscellaneous"
  565. history list that most minibuffer arguments use.
  566.  
  567. 
  568. File: emacs,  Node: Repetition,  Prev: Minibuffer History,  Up: Minibuffer
  569.  
  570. Repeating Minibuffer Commands
  571. =============================
  572.  
  573.    Every command that uses the minibuffer at least once is recorded on a
  574. special history list, together with the values of its arguments, so that
  575. you can repeat the entire command.  In particular, every use of `M-x'
  576. is recorded there, since `M-x' uses the minibuffer to read the command
  577. name.
  578.  
  579. `C-x ESC ESC'
  580.      Re-execute a recent minibuffer command (`repeat-complex-command').
  581.  
  582. `M-x list-command-history'
  583.      Display the entire command history, showing all the commands `C-x
  584.      ESC ESC' can repeat, most recent first.
  585.  
  586.    `C-x ESC ESC' is used to re-execute a recent minibuffer-using
  587. command.  With no argument, it repeats the last such command.  A
  588. numeric argument specifies which command to repeat; one means the last
  589. one, and larger numbers specify earlier ones.
  590.  
  591.    `C-x ESC ESC' works by turning the previous command into a Lisp
  592. expression and then entering a minibuffer initialized with the text for
  593. that expression.  If you type just RET, the command is repeated as
  594. before.  You can also change the command by editing the Lisp
  595. expression.  Whatever expression you finally submit is what will be
  596. executed.  The repeated command is added to the front of the command
  597. history unless it is identical to the most recently executed command
  598. already there.
  599.  
  600.    Even if you don't understand Lisp syntax, it will probably be obvious
  601. which command is displayed for repetition.  If you do not change the
  602. text, it will repeat exactly as before.
  603.  
  604.    Once inside the minibuffer for `C-x ESC ESC', you can use the
  605. minibuffer history commands (`M-p', `M-n', `M-r', `M-s'; *note
  606. Minibuffer History::.) to move through the history list of saved entire
  607. commands.  After finding the desired previous command, you can edit its
  608. expression as usual and then resubmit it by typing RET as usual.
  609.  
  610.    The list of previous minibuffer-using commands is stored as a Lisp
  611. list in the variable `command-history'.  Each element is a Lisp
  612. expression which describes one command and its arguments.  Lisp programs
  613. can reexecute a command by calling `eval' with the `command-history'
  614. element.
  615.  
  616. 
  617. File: emacs,  Node: M-x,  Next: Help,  Prev: Minibuffer,  Up: Top
  618.  
  619. Running Commands by Name
  620. ************************
  621.  
  622.    The Emacs commands that are used often or that must be quick to type
  623. are bound to keys--short sequences of characters--for convenient use.
  624. Other Emacs commands that do not need to be brief are not bound to
  625. keys; to run them, you must refer to them by name.
  626.  
  627.    A command name is, by convention, made up of one or more words,
  628. separated by hyphens; for example, `auto-fill-mode' or `manual-entry'.
  629. The use of English words makes the command name easier to remember than
  630. a key made up of obscure characters, even though it is more characters
  631. to type.
  632.  
  633.    The way to run a command by name is to start with `M-x', type the
  634. command name, and finish it with RET.  `M-x' uses the minibuffer to
  635. read the command name.  RET exits the minibuffer and runs the command.
  636. The string `M-x' appears at the beginning of the minibuffer as a
  637. "prompt" to remind you to enter the name of a command to be run.  *Note
  638. Minibuffer::, for full information on the features of the minibuffer.
  639.  
  640.    You can use completion to enter the command name.  For example, the
  641. command `forward-char' can be invoked by name by typing
  642.  
  643.      M-x forward-char RET
  644.  
  645. or
  646.  
  647.      M-x forw TAB c RET
  648.  
  649. Note that `forward-char' is the same command that you invoke with the
  650. key `C-f'.  You can run any Emacs command by name using `M-x', whether
  651. or not any keys are bound to it.
  652.  
  653.    If you type `C-g' while the command name is being read, you cancel
  654. the `M-x' command and get out of the minibuffer, ending up at top level.
  655.  
  656.    To pass a numeric argument to the command you are invoking with
  657. `M-x', specify the numeric argument before the `M-x'.  `M-x' passes the
  658. argument along to the command it runs.  The argument value appears in
  659. the prompt while the command name is being read.
  660.  
  661.    Normally, when describing a command that is run by name, we omit the
  662. RET that is needed to terminate the name.  Thus we might speak of `M-x
  663. auto-fill-mode' rather than `M-x auto-fill-mode RET'.  We mention the
  664. RET only when there is a need to emphasize its presence, such as when
  665. we show the command together with following arguments.
  666.  
  667.    `M-x' works by running the command `execute-extended-command', which
  668. is responsible for reading the name of another command and invoking it.
  669.  
  670. 
  671. File: emacs,  Node: Help,  Next: Mark,  Prev: M-x,  Up: Top
  672.  
  673. Help
  674. ****
  675.  
  676.    Emacs provides extensive help features accessible through a single
  677. character, `C-h'.  `C-h' is a prefix key that is used only for
  678. documentation-printing commands.  The characters that you can type after
  679. `C-h' are called "help options".  One help option is `C-h'; that is how
  680. you ask for help about using `C-h'.  To cancel, type `C-g'.  The
  681. function key F1 is equivalent to `C-h'.
  682.  
  683.    `C-h C-h' displays a list of the possible help options, each with a
  684. brief description.  Before you type a help option, you can use SPC or
  685. DEL to scroll through the list.
  686.  
  687.    `C-h' or F1 means "help" in various other contexts as well.  For
  688. example, in `query-replace', it describes the options available.  After
  689. a prefix key, it displays a list of the alternatives that can follow
  690. the prefix key.  (A few prefix keys don't support this because they
  691. define other meanings for `C-h'.)
  692.  
  693. * Menu:
  694.  
  695. * Help Summary::    Brief list of all Help commands.
  696. * Key Help::        Asking what a key does in Emacs.
  697. * Name Help::        Asking about a command, variable or function name.
  698. * Apropos::        Asking what pertains to a given topic.
  699. * Library Keywords::    Finding Lisp libraries by keywords (topics).
  700. * Misc Help::        Other help commands.
  701.  
  702. 
  703. File: emacs,  Node: Help Summary,  Next: Key Help,  Up: Help
  704.  
  705. Help Summary
  706. ============
  707.  
  708.    Here is a summary of the defined help commands.
  709.  
  710. `C-h a REGEXP RET'
  711.      Display list of commands whose names match REGEXP
  712.      (`command-apropos').
  713.  
  714. `C-h b'
  715.      Display a table of all key bindings in effect now, in this order:
  716.      minor mode bindings, major mode bindings, and global bindings
  717.      (`describe-bindings').
  718.  
  719. `C-h c KEY'
  720.      Print the name of the command that KEY runs
  721.      (`describe-key-briefly').  Here `c' stands for `character'.  For
  722.      more extensive information on KEY, use `C-h k'.
  723.  
  724. `C-h f FUNCTION RET'
  725.      Display documentation on the Lisp function named FUNCTION
  726.      (`describe-function').  Since commands are Lisp functions, a
  727.      command name may be used.
  728.  
  729. `C-h i'
  730.      Run Info, the program for browsing documentation files (`info').
  731.      The complete Emacs manual is available on-line in Info.
  732.  
  733. `C-h k KEY'
  734.      Display name and documentation of the command that KEY runs
  735.      (`describe-key').
  736.  
  737. `C-h l'
  738.      Display a description of the last 100 characters you typed
  739.      (`view-lossage').
  740.  
  741. `C-h m'
  742.      Display documentation of the current major mode (`describe-mode').
  743.  
  744. `C-h n'
  745.      Display documentation of Emacs changes, most recent first
  746.      (`view-emacs-news').
  747.  
  748. `C-h p'
  749.      Find packages by topic keyword (`finder-by-keyword').
  750.  
  751. `C-h s'
  752.      Display current contents of the syntax table, plus an explanation
  753.      of what they mean (`describe-syntax').  *Note Syntax::.
  754.  
  755. `C-h t'
  756.      Enter the Emacs interactive tutorial (`help-with-tutorial').
  757.  
  758. `C-h v VAR RET'
  759.      Display the documentation of the Lisp variable VAR
  760.      (`describe-variable').
  761.  
  762. `C-h w COMMAND RET'
  763.      Print which keys run the command named COMMAND (`where-is').
  764.  
  765. `C-h C-f FUNCTION RET'
  766.      Enter Info and go to the node documenting the Emacs function
  767.      FUNCTION (`info-goto-emacs-command-node').
  768.  
  769. `C-h C-k KEY'
  770.      Enter Info and go to the node where the key sequence KEY is
  771.      documented (`info-goto-emacs-key-command-node').
  772.  
  773. `C-h C-c'
  774.      Display the copying conditions for GNU Emacs.
  775.  
  776. `C-h C-d'
  777.      Display information about getting new versions of GNU Emacs.
  778.  
  779. `C-h C-p'
  780.      Display information about the GNU Project.
  781.  
  782. 
  783. File: emacs,  Node: Key Help,  Next: Name Help,  Prev: Help Summary,  Up: Help
  784.  
  785. Documentation for a Key
  786. =======================
  787.  
  788.    The most basic `C-h' options are `C-h c' (`describe-key-briefly')
  789. and `C-h k' (`describe-key').  `C-h c KEY' prints in the echo area the
  790. name of the command that KEY is bound to.  For example, `C-h c C-f'
  791. prints `forward-char'.  Since command names are chosen to describe what
  792. the commands do, this is a good way to get a very brief description of
  793. what KEY does.
  794.  
  795.    `C-h k KEY' is similar but gives more information: it displays the
  796. documentation string of the command as well as its name.  This is too
  797. big for the echo area, so a window is used for the display.
  798.  
  799.    `C-h c' and `C-h k' work for any sort of key sequences, including
  800. function keys and mouse events.
  801.  
  802. 
  803. File: emacs,  Node: Name Help,  Next: Apropos,  Prev: Key Help,  Up: Help
  804.  
  805. Help by Command or Variable Name
  806. ================================
  807.  
  808.    `C-h f' (`describe-function') reads the name of a Lisp function
  809. using the minibuffer, then displays that function's documentation string
  810. in a window.  Since commands are Lisp functions, you can use this to get
  811. the documentation of a command that you know by name.  For example,
  812.  
  813.      C-h f auto-fill-mode RET
  814.  
  815. displays the documentation of `auto-fill-mode'.  This is the only way
  816. to get the documentation of a command that is not bound to any key (one
  817. which you would normally run using `M-x').
  818.  
  819.    `C-h f' is also useful for Lisp functions that you are planning to
  820. use in a Lisp program.  For example, if you have just written the
  821. expression `(make-vector len)' and want to check that you are using
  822. `make-vector' properly, type `C-h f make-vector RET'.  Because `C-h f'
  823. allows all function names, not just command names, you may find that
  824. some of your favorite abbreviations that work in `M-x' don't work in
  825. `C-h f'.  An abbreviation may be unique among command names yet fail to
  826. be unique when other function names are allowed.
  827.  
  828.    The function name for `C-h f' to describe has a default which is
  829. used if you type RET leaving the minibuffer empty.  The default is the
  830. function called by the innermost Lisp expression in the buffer around
  831. point, *provided* that is a valid, defined Lisp function name.  For
  832. example, if point is located following the text `(make-vector (car x)',
  833. the innermost list containing point is the one that starts with
  834. `(make-vector', so the default is to describe the function
  835. `make-vector'.
  836.  
  837.    `C-h f' is often useful just to verify that you have the right
  838. spelling for the function name.  If `C-h f' mentions a name from the
  839. buffer as the default, that name must be defined as a Lisp function.  If
  840. that is all you want to know, just type `C-g' to cancel the `C-h f'
  841. command, then go on editing.
  842.  
  843.    `C-h w COMMAND RET' tells you what keys are bound to COMMAND.  It
  844. prints a list of the keys in the echo area.  If it says the command is
  845. not on any key, you must use `M-x' to run it.  `C-h w' runs the command
  846. `where-is'.
  847.  
  848.    `C-h v' (`describe-variable') is like `C-h f' but describes Lisp
  849. variables instead of Lisp functions.  Its default is the Lisp symbol
  850. around or before point, but only if that is the name of a known Lisp
  851. variable.  *Note Variables::.
  852.  
  853. 
  854. File: emacs,  Node: Apropos,  Next: Library Keywords,  Prev: Name Help,  Up: Help
  855.  
  856. Apropos
  857. =======
  858.  
  859.    A more sophisticated sort of question to ask is, "What are the
  860. commands for working with files?"  To ask this question, type `C-h a
  861. file RET', which displays a list of all command names that contain
  862. `file', including `copy-file', `find-file', and so on.  With each
  863. command name appears a brief description of how to use the command, and
  864. what keys you can currently invoke it with.  For example, it would say
  865. that you can invoke `find-file' by typing `C-x C-f'.  The `a' in `C-h
  866. a' stands for `Apropos'; `C-h a' runs the command `command-apropos'.
  867.  
  868.    Because `C-h a' looks only for functions whose names contain the
  869. string which you specify, you must use ingenuity in choosing the
  870. string.  If you are looking for commands for killing backwards and `C-h
  871. a kill-backwards RET' doesn't reveal any, don't give up.  Try just
  872. `kill', or just `backwards', or just `back'.  Be persistent.  Also note
  873. that you can use a regular expression as the argument, for more
  874. flexibility (*note Regexps::.).
  875.  
  876.    Here is a set of arguments to give to `C-h a' that covers many
  877. classes of Emacs commands, since there are strong conventions for naming
  878. the standard Emacs commands.  By giving you a feel for the naming
  879. conventions, this set should also serve to aid you in developing a
  880. technique for picking `apropos' strings.
  881.  
  882.      char, line, word, sentence, paragraph, region, page, sexp, list,
  883.      defun, rect, buffer, frame, window, face, file, dir, register,
  884.      mode, beginning, end, forward, backward, next, previous, up, down,
  885.      search, goto, kill, delete, mark, insert, yank, fill, indent,
  886.      case, change, set, what, list, find, view, describe, default.
  887.  
  888.    To list all Lisp symbols that contain a match for a regexp, not just
  889. the ones that are defined as commands, use the command `M-x apropos'
  890. instead of `C-h a'.  This command does not check key bindings by
  891. default; specify a numeric argument if you want it to check them.
  892.  
  893.    The `super-apropos' command is like `apropos' except that it
  894. searches documentation strings as well as symbol names for matches for
  895. the specified regular expression.
  896.  
  897. 
  898. File: emacs,  Node: Library Keywords,  Next: Misc Help,  Prev: Apropos,  Up: Help
  899.  
  900. Keyword Search for Lisp Libraries
  901. =================================
  902.  
  903.    The `C-h p' command lets you search the standard Emacs Lisp
  904. libraries by topic keywords.  Here is a partial list of keywords you can
  905. use:
  906.  
  907. `abbrev'
  908.      Abbreviation handling, typing shortcuts, macros.
  909.  
  910. `bib'
  911.      Support for the bibliography processor `bib'.
  912.  
  913. `c'
  914.      C and C++ language support.
  915.  
  916. `calendar'
  917.      Calendar and time management support.
  918.  
  919. `comm'
  920.      Communications, networking, remote access to files.
  921.  
  922. `data'
  923.      Support for editing files of data.
  924.  
  925. `debugging'
  926.      Support for debugging programs.
  927.  
  928. `docs'
  929.      Support for Emacs documentation.
  930.  
  931. `emulations'
  932.      Emulations of other editors.
  933.  
  934. `extensions'
  935.      Emacs Lisp language extensions.
  936.  
  937. `faces'
  938.      Support for using faces (fonts and colors; *note Faces::.).
  939.  
  940. `frames'
  941.      Support for Emacs frames and window systems.
  942.  
  943. `games'
  944.      Games, jokes and amusements.
  945.  
  946. `hardware'
  947.      Support for interfacing with exotic hardware.
  948.  
  949. `help'
  950.      Support for on-line help systems.
  951.  
  952. `hypermedia'
  953.      Support for links within text, or other media types.
  954.  
  955. `i18n'
  956.      Internationalization and alternate character-set support.
  957.  
  958. `internal'
  959.      Code for Emacs internals, build process, defaults.
  960.  
  961. `languages'
  962.      Specialized modes for editing programming languages.
  963.  
  964. `lisp'
  965.      Support for using Lisp (including Emacs Lisp).
  966.  
  967. `local'
  968.      Libraries local to your site.
  969.  
  970. `maint'
  971.      Maintenance aids for the Emacs development group.
  972.  
  973. `mail'
  974.      Modes for electronic-mail handling.
  975.  
  976. `matching'
  977.      Searching and matching.
  978.  
  979. `news'
  980.      Support for netnews reading and posting.
  981.  
  982. `non-text'
  983.      Support for editing files that are not ordinary text.
  984.  
  985. `oop'
  986.      Support for object-oriented programming.
  987.  
  988. `outlines'
  989.      Hierarchical outlining.
  990.  
  991. `processes'
  992.      Process, subshell, compilation, and job control support.
  993.  
  994. `terminals'
  995.      Support for terminal types.
  996.  
  997. `tex'
  998.      Support for the TeX formatter.
  999.  
  1000. `tools'
  1001.      Programming tools.
  1002.  
  1003. `unix'
  1004.      Front-ends/assistants for, or emulators of, Unix features.
  1005.  
  1006. `vms'
  1007.      Support code for VMS.
  1008.  
  1009. `wp'
  1010.      Word processing.
  1011.  
  1012. 
  1013. File: emacs,  Node: Misc Help,  Prev: Library Keywords,  Up: Help
  1014.  
  1015. Other Help Commands
  1016. ===================
  1017.  
  1018.    `C-h i' (`info') runs the Info program, which is used for browsing
  1019. through structured documentation files.  The entire Emacs manual is
  1020. available within Info.  Eventually all the documentation of the GNU
  1021. system will be available.  Type `h' after entering Info to run a
  1022. tutorial on using Info.
  1023.  
  1024.    There are two special help commands for accessing Emacs documentation
  1025. through Info.  `C-h C-f FUNCTION RET' enters Info and goes straight to
  1026. the documentation of the Emacs function FUNCTION.  `C-h C-k KEY' enters
  1027. Info and goes straight to the documentation of the key KEY.  These two
  1028. keys run the commands `Info-goto-emacs-command-node' and
  1029. `Info-goto-emacs-key-command-node'.
  1030.  
  1031.    If something surprising happens, and you are not sure what commands
  1032. you typed, use `C-h l' (`view-lossage').  `C-h l' prints the last 100
  1033. command characters you typed in.  If you see commands that you don't
  1034. know, you can use `C-h c' to find out what they do.
  1035.  
  1036.    Emacs has numerous major modes, each of which redefines a few keys
  1037. and makes a few other changes in how editing works.  `C-h m'
  1038. (`describe-mode') prints documentation on the current major mode, which
  1039. normally describes all the commands that are changed in this mode.
  1040.  
  1041.    `C-h b' (`describe-bindings') and `C-h s' (`describe-syntax')
  1042. present other information about the current Emacs mode.  `C-h b'
  1043. displays a list of all the key bindings now in effect; the local
  1044. bindings defined by the current minor modes first, then the local
  1045. bindings defined by the current major mode, and finally the global
  1046. bindings (*note Key Bindings::.).  `C-h s' displays the contents of the
  1047. syntax table, with explanations of each character's syntax (*note
  1048. Syntax::.).
  1049.  
  1050.    You can get a similar list for a particular prefix key by typing
  1051. `C-h' after the prefix key.  (There are a few prefix keys for which
  1052. this does not work--those that provide their own bindings for `C-h'.
  1053. One of these is ESC, because `ESC C-h' is actually `C-M-h', which marks
  1054. a defun.)
  1055.  
  1056.    The other `C-h' options display various files of useful information.
  1057. `C-h C-w' displays the full details on the complete absence of
  1058. warranty for GNU Emacs.  `C-h n' (`view-emacs-news') displays the file
  1059. `emacs/etc/NEWS', which contains documentation on Emacs changes
  1060. arranged chronologically.  `C-h t' (`help-with-tutorial') displays the
  1061. learn-by-doing Emacs tutorial.  `C-h C-c' (`describe-copying') displays
  1062. the file `emacs/etc/COPYING', which tells you the conditions you must
  1063. obey in distributing copies of Emacs.  `C-h C-d'
  1064. (`describe-distribution') displays the file `emacs/etc/DISTRIB', which
  1065. tells you how you can order a copy of the latest version of Emacs.
  1066. `C-h C-p' (`describe-project') displays general information about the
  1067. GNU Project.
  1068.  
  1069. 
  1070. File: emacs,  Node: Mark,  Next: Killing,  Prev: Help,  Up: Top
  1071.  
  1072. The Mark and the Region
  1073. ***********************
  1074.  
  1075.    Many Emacs commands operate on an arbitrary contiguous part of the
  1076. current buffer.  To specify the text for such a command to operate on,
  1077. you set "the mark" at one end of it, and move point to the other end.
  1078. The text between point and the mark is called "the region".  Emacs
  1079. highlights the region whenever there is one, if you enable Transient
  1080. Mark mode (*note Transient Mark::.).
  1081.  
  1082.    You can move point or the mark to adjust the boundaries of the
  1083. region.  It doesn't matter which one is set first chronologically, or
  1084. which one comes earlier in the text.  Once the mark has been set, it
  1085. remains where you put it until you set it again at another place.  Each
  1086. Emacs buffer has its own mark, so that when you return to a buffer that
  1087. had been selected previously, it has the same mark it had before.
  1088.  
  1089.    Many commands that insert text, such as `C-y' (`yank') and `M-x
  1090. insert-buffer', position point and the mark at opposite ends of the
  1091. inserted text, so that the region contains the text just inserted.
  1092.  
  1093.    Aside from delimiting the region, the mark is also useful for
  1094. remembering a spot that you may want to go back to.  To make this
  1095. feature more useful, each buffer remembers 16 previous locations of the
  1096. mark in the "mark ring".
  1097.  
  1098. * Menu:
  1099.  
  1100. * Setting Mark::    Commands to set the mark.
  1101. * Transient Mark::    How to make Emacs highlight the region-
  1102.               when there is one.
  1103. * Using Region::    Summary of ways to operate on contents of the region.
  1104. * Marking Objects::    Commands to put region around textual units.
  1105. * Mark Ring::       Previous mark positions saved so you can go back there.
  1106. * Global Mark Ring::    Previous mark positions in various buffers.
  1107.  
  1108. 
  1109. File: emacs,  Node: Setting Mark,  Next: Transient Mark,  Up: Mark
  1110.  
  1111. Setting the Mark
  1112. ================
  1113.  
  1114.    Here are some commands for setting the mark:
  1115.  
  1116. `C-SPC'
  1117.      Set the mark where point is (`set-mark-command').
  1118.  
  1119. `C-@'
  1120.      The same.
  1121.  
  1122. `C-x C-x'
  1123.      Interchange mark and point (`exchange-point-and-mark').
  1124.  
  1125. `Drag-Mouse-1'
  1126.      Set point and the mark around the text you drag across.
  1127.  
  1128. `Mouse-3'
  1129.      Set the mark where point is, then move point to where you click
  1130.      (`mouse-save-then-kill').
  1131.  
  1132.    For example, suppose you wish to convert part of the buffer to all
  1133. upper-case, using the `C-x C-u' (`upcase-region') command which
  1134. operates on the text in the region.  You can first go to the beginning
  1135. of the text to be capitalized, type `C-SPC' to put the mark there, move
  1136. to the end, and then type `C-x C-u'.  Or, you can set the mark at the
  1137. end of the text, move to the beginning, and then type `C-x C-u'.
  1138.  
  1139.    The most common way to set the mark is with the `C-SPC' command
  1140. (`set-mark-command').  This sets the mark where point is.  Then you can
  1141. move point away, leaving the mark behind.
  1142.  
  1143.    There are two ways to set the mark with the mouse.  You can drag
  1144. mouse button one across a range of text; that puts point where you
  1145. release the mouse button, and sets the mark at the other end of that
  1146. range.  Or you can click mouse button three, which sets the mark at
  1147. point (like `C-SPC') and them moves point (like `Mouse-1').  Both of
  1148. these methods copy the region into the kill ring in addition to setting
  1149. the mark; that gives behavior consistent with other window-driven
  1150. applications, but if you don't want to modify the kill ring, you must
  1151. use keyboard commands to set the mark.  *Note Mouse Commands::.
  1152.  
  1153.    Ordinary terminals have only one cursor, so there is no way for Emacs
  1154. to show you where the mark is located.  You have to remember.  The usual
  1155. solution to this problem is to set the mark and then use it soon, before
  1156. you forget where it is.  Alternatively, you can see where the mark is
  1157. with the command `C-x C-x' (`exchange-point-and-mark') which puts the
  1158. mark where point was and point where the mark was.  The extent of the
  1159. region is unchanged, but the cursor and point are now at the previous
  1160. position of the mark.  In Transient Mark mode, this command reactivates
  1161. the mark.
  1162.  
  1163.    `C-x C-x' is also useful when you are satisfied with the position of
  1164. point but want to move the mark; do `C-x C-x' to put point at that end
  1165. of the region, and then move it.  A second use of `C-x C-x', if
  1166. necessary, puts the mark at the new position with point back at its
  1167. original position.
  1168.  
  1169.    There is no such character as `C-SPC' in ASCII; when you type SPC
  1170. while holding down CTRL, what you get on most ordinary terminals is the
  1171. character `C-@'.  This key is actually bound to `set-mark-command'.
  1172. But unless you are unlucky enough to have a terminal where typing
  1173. `C-SPC' does not produce `C-@', you might as well think of this
  1174. character as `C-SPC'.  Under X, `C-SPC' is actually a distinct
  1175. character, but its binding is still `set-mark-command'.
  1176.  
  1177.