diff options
| author | Richard M. Stallman | 2006-02-08 00:21:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-02-08 00:21:56 +0000 |
| commit | 5f4d658543589bb6ff8e0fbc0226e55ffb119978 (patch) | |
| tree | 3e93409b4ed6c0248b077dc7fe7583a0d8193827 | |
| parent | 2b02353b7bfdf86d0c333b00896d7752a9f408e9 (diff) | |
| download | emacs-5f4d658543589bb6ff8e0fbc0226e55ffb119978.tar.gz emacs-5f4d658543589bb6ff8e0fbc0226e55ffb119978.zip | |
Minor clarifications.
(Sentences): Explain why two-space convention is better.
Explain sentence-end-without-period here.
(Fill Commands): Not here.
(Refill): Node moved down.
(Filling): Update menu.
(Table Creation, Cell Justification, Column Commands): Clarify.
| -rw-r--r-- | man/text.texi | 425 |
1 files changed, 207 insertions, 218 deletions
diff --git a/man/text.texi b/man/text.texi index 8c624c42dde..4fb5ee9cc1e 100644 --- a/man/text.texi +++ b/man/text.texi | |||
| @@ -12,7 +12,8 @@ computer field. One is data that is a sequence of characters. Any file | |||
| 12 | that you edit with Emacs is text, in this sense of the word. The other | 12 | that you edit with Emacs is text, in this sense of the word. The other |
| 13 | meaning is more restrictive: a sequence of characters in a human language | 13 | meaning is more restrictive: a sequence of characters in a human language |
| 14 | for humans to read (possibly after processing by a text formatter), as | 14 | for humans to read (possibly after processing by a text formatter), as |
| 15 | opposed to a program or commands for a program. | 15 | opposed to a program or binary data. This chapter is concerned with |
| 16 | editing text in the narrower sense. | ||
| 16 | 17 | ||
| 17 | Human languages have syntactic/stylistic conventions that can be | 18 | Human languages have syntactic/stylistic conventions that can be |
| 18 | supported or used to advantage by editor commands: conventions involving | 19 | supported or used to advantage by editor commands: conventions involving |
| @@ -41,7 +42,7 @@ mode (@pxref{TeX Mode}). | |||
| 41 | @ifinfo | 42 | @ifinfo |
| 42 | mode. | 43 | mode. |
| 43 | @end ifinfo | 44 | @end ifinfo |
| 44 | For input to nroff, use Nroff mode. | 45 | For input to groff or nroff, use Nroff mode. |
| 45 | 46 | ||
| 46 | Instead of using a text formatter, you can edit formatted text in | 47 | Instead of using a text formatter, you can edit formatted text in |
| 47 | WYSIWYG style (``what you see is what you get''), with Enriched mode. | 48 | WYSIWYG style (``what you see is what you get''), with Enriched mode. |
| @@ -113,7 +114,7 @@ in the text. The analogy extends to numeric arguments, which serve as | |||
| 113 | repeat counts. @kbd{M-f} with a negative argument moves backward, and | 114 | repeat counts. @kbd{M-f} with a negative argument moves backward, and |
| 114 | @kbd{M-b} with a negative argument moves forward. Forward motion | 115 | @kbd{M-b} with a negative argument moves forward. Forward motion |
| 115 | stops right after the last letter of the word, while backward motion | 116 | stops right after the last letter of the word, while backward motion |
| 116 | stops right before the first letter.@refill | 117 | stops right before the first letter. |
| 117 | 118 | ||
| 118 | @kindex M-d | 119 | @kindex M-d |
| 119 | @findex kill-word | 120 | @findex kill-word |
| @@ -130,10 +131,10 @@ the end, and kill the word backwards with @kbd{M-@key{DEL}}.) | |||
| 130 | @kindex M-DEL | 131 | @kindex M-DEL |
| 131 | @kbd{M-@key{DEL}} (@code{backward-kill-word}) kills the word before | 132 | @kbd{M-@key{DEL}} (@code{backward-kill-word}) kills the word before |
| 132 | point. It kills everything from point back to where @kbd{M-b} would | 133 | point. It kills everything from point back to where @kbd{M-b} would |
| 133 | move to. If point is after the space in @w{@samp{FOO, BAR}}, then | 134 | move to. For instance, if point is after the space in @w{@samp{FOO, |
| 134 | @w{@samp{FOO, }} is killed. (If you wish to kill just @samp{FOO}, and | 135 | BAR}}, it kills @w{@samp{FOO, }}. If you wish to kill just |
| 135 | not the comma and the space, use @kbd{M-b M-d} instead of | 136 | @samp{FOO}, and not the comma and the space, use @kbd{M-b M-d} instead |
| 136 | @kbd{M-@key{DEL}}.) | 137 | of @kbd{M-@key{DEL}}. |
| 137 | 138 | ||
| 138 | @c Don't index M-t and transpose-words here, they are indexed in | 139 | @c Don't index M-t and transpose-words here, they are indexed in |
| 139 | @c fixit.texi, in the node "Transpose". | 140 | @c fixit.texi, in the node "Transpose". |
| @@ -155,9 +156,9 @@ to. @kbd{M-@@} accepts a numeric argument that says how many words to | |||
| 155 | scan for the place to put the mark. In Transient Mark mode, this command | 156 | scan for the place to put the mark. In Transient Mark mode, this command |
| 156 | activates the mark. | 157 | activates the mark. |
| 157 | 158 | ||
| 158 | The word commands' understanding of syntax is completely controlled by | 159 | The word commands' understanding of word boundaries is controlled |
| 159 | the syntax table. Any character can, for example, be declared to be a word | 160 | by the syntax table. Any character can, for example, be declared to |
| 160 | delimiter. @xref{Syntax}. | 161 | be a word delimiter. @xref{Syntax}. |
| 161 | 162 | ||
| 162 | @node Sentences | 163 | @node Sentences |
| 163 | @section Sentences | 164 | @section Sentences |
| @@ -206,7 +207,7 @@ beginning of the sentence. Larger arguments serve as a repeat count. | |||
| 206 | There is also a command, @kbd{C-x @key{DEL}} | 207 | There is also a command, @kbd{C-x @key{DEL}} |
| 207 | (@code{backward-kill-sentence}), for killing back to the beginning of a | 208 | (@code{backward-kill-sentence}), for killing back to the beginning of a |
| 208 | sentence. This command is useful when you change your mind in the | 209 | sentence. This command is useful when you change your mind in the |
| 209 | middle of composing text.@refill | 210 | middle of composing text. |
| 210 | 211 | ||
| 211 | The sentence commands assume that you follow the American typist's | 212 | The sentence commands assume that you follow the American typist's |
| 212 | convention of putting two spaces at the end of a sentence; they consider | 213 | convention of putting two spaces at the end of a sentence; they consider |
| @@ -214,34 +215,36 @@ a sentence to end wherever there is a @samp{.}, @samp{?} or @samp{!} | |||
| 214 | followed by the end of a line or two spaces, with any number of | 215 | followed by the end of a line or two spaces, with any number of |
| 215 | @samp{)}, @samp{]}, @samp{'}, or @samp{"} characters allowed in between. | 216 | @samp{)}, @samp{]}, @samp{'}, or @samp{"} characters allowed in between. |
| 216 | A sentence also begins or ends wherever a paragraph begins or ends. | 217 | A sentence also begins or ends wherever a paragraph begins or ends. |
| 218 | It is useful to follow this convention, because it makes a distinction | ||
| 219 | between periods that end a sentence and periods that indicate | ||
| 220 | abbreviations; that enables the Emacs sentence commands to distinguish, | ||
| 221 | too. These commands to not stop for periods that indicate abbreviations. | ||
| 217 | 222 | ||
| 218 | @vindex sentence-end | 223 | @vindex sentence-end-double-space |
| 219 | The variable @code{sentence-end} controls recognition of the end of | 224 | If you want to use just one space between sentences, you can set the |
| 220 | a sentence. If non-@code{nil}, it is a regexp that matches the last | 225 | variable @code{sentence-end-double-space} to @code{nil} to make the |
| 221 | few characters of a sentence, together with the whitespace following | 226 | sentence commands stop for single spaces. However, this mode has a |
| 222 | the sentence. If the value is @code{nil}, the default, then Emacs | 227 | drawback: there is no way to distinguish between periods that end |
| 223 | computes the regexp according to various criteria. The result is | 228 | sentences and those that indicate abbreviations. For convenient and |
| 224 | normally similar to the following regexp: | 229 | reliable editing, we therefore recommend you follow the two-space |
| 225 | 230 | convention. The variable @code{sentence-end-double-space} also | |
| 226 | @example | 231 | affects filling (@pxref{Fill Commands}) in related ways. |
| 227 | "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" | ||
| 228 | @end example | ||
| 229 | |||
| 230 | @noindent | ||
| 231 | This example is explained in the section on regexps. @xref{Regexp Example}. | ||
| 232 | |||
| 233 | If you want to use just one space between sentences, you should | ||
| 234 | set @code{sentence-end} to this value: | ||
| 235 | 232 | ||
| 236 | @example | 233 | @vindex sentence-end |
| 237 | "[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*" | 234 | The variable @code{sentence-end} controls how to recognize the end |
| 238 | @end example | 235 | of a sentence. If non-@code{nil}, it is a regexp that matches the |
| 236 | last few characters of a sentence, together with the whitespace | ||
| 237 | following the sentence. If the value is @code{nil}, the default, then | ||
| 238 | Emacs computes the regexp according to various criteria such as the | ||
| 239 | value of @code{sentence-end-double-space}. @xref{Regexp Example}, for | ||
| 240 | a detailed explanation of one of the regular expressions Emacs uses | ||
| 241 | for this purpose. | ||
| 239 | 242 | ||
| 240 | @noindent | 243 | @vindex sentence-end-without-period |
| 241 | This is what setting the variable @code{sentence-end-double-space} to | 244 | Some languages do not use period to indicate end of sentence. For |
| 242 | @code{nil} automatically does. But note that this makes it impossible | 245 | example, a sentence in Thai text ends with double space but without a |
| 243 | to distinguish between periods that end sentences and those that | 246 | period. Set the variable @code{sentence-end-without-period} to |
| 244 | indicate abbreviations. | 247 | @code{t} to tell the sentence commands that a period is not necessary. |
| 245 | 248 | ||
| 246 | @node Paragraphs | 249 | @node Paragraphs |
| 247 | @section Paragraphs | 250 | @section Paragraphs |
| @@ -266,18 +269,20 @@ Put point and mark around this or next paragraph (@code{mark-paragraph}). | |||
| 266 | @kbd{M-@{} moves to the beginning of the current or previous | 269 | @kbd{M-@{} moves to the beginning of the current or previous |
| 267 | paragraph, while @kbd{M-@}} moves to the end of the current or next | 270 | paragraph, while @kbd{M-@}} moves to the end of the current or next |
| 268 | paragraph. Blank lines and text-formatter command lines separate | 271 | paragraph. Blank lines and text-formatter command lines separate |
| 269 | paragraphs and are not considered part of any paragraph. In | 272 | paragraphs and are not considered part of any paragraph. If there is |
| 270 | Paragraph-Indent Text mode, but not in Text mode, an indented line | 273 | a blank line before the paragraph, @kbd{M-@{} moves to the blank line, |
| 271 | also starts a new paragraph. If there is a blank line before the | 274 | because that is convenient in practice. |
| 272 | paragraph, @kbd{M-@{} moves to the blank line, because that is | 275 | |
| 273 | convenient in practice. | 276 | In Text mode, an indented line is not a paragraph break. If you |
| 277 | want indented lines to have this effect, use Paragraph-Indent Text | ||
| 278 | mode instead. @xref{Text Mode}. | ||
| 274 | 279 | ||
| 275 | In major modes for programs, paragraphs begin and end only at blank | 280 | In major modes for programs, paragraphs begin and end only at blank |
| 276 | lines. This makes the paragraph commands continue to be useful even | 281 | lines. This makes the paragraph commands useful, even though there |
| 277 | though there are no paragraphs per se. | 282 | are no paragraphs as such in a program. |
| 278 | 283 | ||
| 279 | When there is a fill prefix, then paragraphs are delimited by all lines | 284 | When you have set a fill prefix, then paragraphs are delimited by |
| 280 | which don't start with the fill prefix. @xref{Filling}. | 285 | all lines which don't start with the fill prefix. @xref{Filling}. |
| 281 | 286 | ||
| 282 | @kindex M-h | 287 | @kindex M-h |
| 283 | @findex mark-paragraph | 288 | @findex mark-paragraph |
| @@ -399,11 +404,11 @@ Text}). | |||
| 399 | 404 | ||
| 400 | @menu | 405 | @menu |
| 401 | * Auto Fill:: Auto Fill mode breaks long lines automatically. | 406 | * Auto Fill:: Auto Fill mode breaks long lines automatically. |
| 402 | * Refill:: Keeping paragraphs filled. | ||
| 403 | * Fill Commands:: Commands to refill paragraphs and center lines. | 407 | * Fill Commands:: Commands to refill paragraphs and center lines. |
| 404 | * Fill Prefix:: Filling paragraphs that are indented | 408 | * Fill Prefix:: Filling paragraphs that are indented |
| 405 | or in a comment, etc. | 409 | or in a comment, etc. |
| 406 | * Adaptive Fill:: How Emacs can determine the fill prefix automatically. | 410 | * Adaptive Fill:: How Emacs can determine the fill prefix automatically. |
| 411 | * Refill:: Keeping paragraphs filled. | ||
| 407 | * Longlines:: Editing text with very long lines. | 412 | * Longlines:: Editing text with very long lines. |
| 408 | @end menu | 413 | @end menu |
| 409 | 414 | ||
| @@ -464,31 +469,6 @@ paragraph properly filled again is usually with the explicit fill commands. | |||
| 464 | The section on init files says how to arrange this permanently for yourself. | 469 | The section on init files says how to arrange this permanently for yourself. |
| 465 | @xref{Init File}. | 470 | @xref{Init File}. |
| 466 | 471 | ||
| 467 | @node Refill | ||
| 468 | @subsection Refill Mode | ||
| 469 | @cindex refilling text, word processor style | ||
| 470 | @cindex modes, Refill | ||
| 471 | @cindex Refill minor mode | ||
| 472 | |||
| 473 | Refill minor mode provides support for keeping paragraphs filled as | ||
| 474 | you type or modify them in other ways. It provides an effect similar | ||
| 475 | to typical word processor behavior. This works by running a | ||
| 476 | paragraph-filling command at suitable times. | ||
| 477 | |||
| 478 | To toggle the use of Refill mode in the current buffer, type | ||
| 479 | @kbd{M-x refill-mode}. When you are typing text, only characters | ||
| 480 | which normally trigger auto filling, like the space character, will | ||
| 481 | trigger refilling. This is to avoid making it too slow. Apart from | ||
| 482 | self-inserting characters, other commands which modify the text cause | ||
| 483 | refilling. | ||
| 484 | |||
| 485 | The current implementation is preliminary and not robust. You can | ||
| 486 | get better ``line wrapping'' behavior using Longlines mode. | ||
| 487 | @xref{Longlines}. However, Longlines mode has an important | ||
| 488 | side-effect: the newlines that it inserts for you are not saved to | ||
| 489 | disk, so the files that you make with Longlines mode will appear to be | ||
| 490 | completely unfilled if you edit them without Longlines mode. | ||
| 491 | |||
| 492 | @node Fill Commands | 472 | @node Fill Commands |
| 493 | @subsection Explicit Fill Commands | 473 | @subsection Explicit Fill Commands |
| 494 | 474 | ||
| @@ -515,24 +495,24 @@ where necessary. | |||
| 515 | 495 | ||
| 516 | @findex fill-region | 496 | @findex fill-region |
| 517 | To refill many paragraphs, use @kbd{M-x fill-region}, which | 497 | To refill many paragraphs, use @kbd{M-x fill-region}, which |
| 518 | divides the region into paragraphs and fills each of them. | 498 | finds the paragraphs in the region and fills each of them. |
| 519 | 499 | ||
| 520 | @findex fill-region-as-paragraph | 500 | @findex fill-region-as-paragraph |
| 521 | @kbd{M-q} and @code{fill-region} use the same criteria as @kbd{M-h} | 501 | @kbd{M-q} and @code{fill-region} use the same criteria as @kbd{M-h} |
| 522 | for finding paragraph boundaries (@pxref{Paragraphs}). For more | 502 | for finding paragraph boundaries (@pxref{Paragraphs}). For more |
| 523 | control, you can use @kbd{M-x fill-region-as-paragraph}, which refills | 503 | control, you can use @kbd{M-x fill-region-as-paragraph}, which refills |
| 524 | everything between point and mark. This command deletes any blank lines | 504 | everything between point and mark as a single paragraph. This command |
| 525 | within the region, so separate blocks of text end up combined into one | 505 | deletes any blank lines within the region, so separate blocks of text |
| 526 | block.@refill | 506 | end up combined into one block. |
| 527 | 507 | ||
| 528 | @cindex justification | 508 | @cindex justification |
| 529 | A numeric argument to @kbd{M-q} causes it to @dfn{justify} the text as | 509 | A numeric argument to @kbd{M-q} tells it to @dfn{justify} the text |
| 530 | well as filling it. This means that extra spaces are inserted to make | 510 | as well as filling it. This means that extra spaces are inserted to |
| 531 | the right margin line up exactly at the fill column. To remove the | 511 | make the right margin line up exactly at the fill column. To remove |
| 532 | extra spaces, use @kbd{M-q} with no argument. (Likewise for | 512 | the extra spaces, use @kbd{M-q} with no argument. (Likewise for |
| 533 | @code{fill-region}.) Another way to control justification, and choose | 513 | @code{fill-region}.) Another way to control justification, and choose |
| 534 | other styles of filling, is with the @code{justification} text property; | 514 | other styles of filling, is with the @code{justification} text |
| 535 | see @ref{Format Justification}. | 515 | property; see @ref{Format Justification}. |
| 536 | 516 | ||
| 537 | @kindex M-s @r{(Text mode)} | 517 | @kindex M-s @r{(Text mode)} |
| 538 | @cindex centering | 518 | @cindex centering |
| @@ -561,7 +541,6 @@ indicates an abbreviation and not the end of a sentence. To preserve | |||
| 561 | the distinction between these two ways of using a period, the fill | 541 | the distinction between these two ways of using a period, the fill |
| 562 | commands do not break a line after a period followed by just one space. | 542 | commands do not break a line after a period followed by just one space. |
| 563 | 543 | ||
| 564 | @vindex sentence-end-double-space | ||
| 565 | If the variable @code{sentence-end-double-space} is @code{nil}, the | 544 | If the variable @code{sentence-end-double-space} is @code{nil}, the |
| 566 | fill commands expect and leave just one space at the end of a sentence. | 545 | fill commands expect and leave just one space at the end of a sentence. |
| 567 | Ordinarily this variable is @code{t}, so the fill commands insist on | 546 | Ordinarily this variable is @code{t}, so the fill commands insist on |
| @@ -571,18 +550,13 @@ two spaces for the end of a sentence, as explained above. @xref{Sentences}. | |||
| 571 | If the variable @code{colon-double-space} is non-@code{nil}, the | 550 | If the variable @code{colon-double-space} is non-@code{nil}, the |
| 572 | fill commands put two spaces after a colon. | 551 | fill commands put two spaces after a colon. |
| 573 | 552 | ||
| 574 | @vindex sentence-end-without-period | ||
| 575 | Some languages do not use period to indicate end of sentence. For | ||
| 576 | example, a sentence in Thai text ends with double space but without a | ||
| 577 | period. Set the variable @code{sentence-end-without-period} to | ||
| 578 | @code{t} to tell the sentence commands that a period is not necessary. | ||
| 579 | |||
| 580 | @vindex fill-nobreak-predicate | 553 | @vindex fill-nobreak-predicate |
| 581 | The variable @code{fill-nobreak-predicate} specifies additional | 554 | The variable @code{fill-nobreak-predicate} specifies additional |
| 582 | conditions for where line-breaking is allowed. Its value is either | 555 | conditions for where line-breaking is allowed. Its value is either |
| 583 | @code{nil} or a Lisp function; the function is called with no | 556 | @code{nil} or a Lisp function; the function is called with no |
| 584 | arguments, and if it returns a non-@code{nil} value, then point is not | 557 | arguments, with point at a place where Emacs is considering breaking |
| 585 | a good place to break the line. Two standard functions you can use are | 558 | the line. If the function returns a non-@code{nil} value, then that's |
| 559 | a bad place to break the line. Two standard functions you can use are | ||
| 586 | @code{fill-single-word-nobreak-p} (don't break after the first word of | 560 | @code{fill-single-word-nobreak-p} (don't break after the first word of |
| 587 | a sentence or before the last) and @code{fill-french-nobreak-p} (don't | 561 | a sentence or before the last) and @code{fill-french-nobreak-p} (don't |
| 588 | break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). | 562 | break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). |
| @@ -615,20 +589,20 @@ a new paragraph. | |||
| 615 | @findex set-fill-prefix | 589 | @findex set-fill-prefix |
| 616 | To specify a fill prefix for the current buffer, move to a line that | 590 | To specify a fill prefix for the current buffer, move to a line that |
| 617 | starts with the desired prefix, put point at the end of the prefix, | 591 | starts with the desired prefix, put point at the end of the prefix, |
| 618 | and give the command @w{@kbd{C-x .}}@: (@code{set-fill-prefix}). | 592 | and type @w{@kbd{C-x .}}@: (@code{set-fill-prefix}). (That's a period |
| 619 | That's a period after the @kbd{C-x}. To turn off the fill prefix, | 593 | after the @kbd{C-x}.) To turn off the fill prefix, specify an empty |
| 620 | specify an empty prefix: type @w{@kbd{C-x .}}@: with point at the | 594 | prefix: type @w{@kbd{C-x .}}@: with point at the beginning of a line. |
| 621 | beginning of a line.@refill | ||
| 622 | 595 | ||
| 623 | When a fill prefix is in effect, the fill commands remove the fill | 596 | When a fill prefix is in effect, the fill commands remove the fill |
| 624 | prefix from each line before filling and insert it on each line after | 597 | prefix from each line of the paragraph before filling and insert it on |
| 625 | filling. (The beginning of the first line is left unchanged, since | 598 | each line after filling. (The beginning of the first line of the |
| 626 | often that is intentionally different.) Auto Fill mode also inserts | 599 | paragraph is left unchanged, since often that is intentionally |
| 627 | the fill prefix automatically when it makes a new line. The @kbd{C-o} | 600 | different.) Auto Fill mode also inserts the fill prefix automatically |
| 628 | command inserts the fill prefix on new lines it creates, when you use | 601 | when it makes a new line. The @kbd{C-o} command inserts the fill |
| 629 | it at the beginning of a line (@pxref{Blank Lines}). Conversely, the | 602 | prefix on new lines it creates, when you use it at the beginning of a |
| 630 | command @kbd{M-^} deletes the prefix (if it occurs) after the newline | 603 | line (@pxref{Blank Lines}). Conversely, the command @kbd{M-^} deletes |
| 631 | that it deletes (@pxref{Indentation}). | 604 | the prefix (if it occurs) after the newline that it deletes |
| 605 | (@pxref{Indentation}). | ||
| 632 | 606 | ||
| 633 | For example, if @code{fill-column} is 40 and you set the fill prefix | 607 | For example, if @code{fill-column} is 40 and you set the fill prefix |
| 634 | to @samp{;; }, then @kbd{M-q} in the following text | 608 | to @samp{;; }, then @kbd{M-q} in the following text |
| @@ -749,6 +723,31 @@ line, and it should return the appropriate fill prefix based on that | |||
| 749 | line. If it returns @code{nil}, @code{adaptive-fill-regexp} gets | 723 | line. If it returns @code{nil}, @code{adaptive-fill-regexp} gets |
| 750 | a chance to find a prefix. | 724 | a chance to find a prefix. |
| 751 | 725 | ||
| 726 | @node Refill | ||
| 727 | @subsection Refill Mode | ||
| 728 | @cindex refilling text, word processor style | ||
| 729 | @cindex modes, Refill | ||
| 730 | @cindex Refill minor mode | ||
| 731 | |||
| 732 | Refill minor mode provides support for keeping paragraphs filled as | ||
| 733 | you type or modify them in other ways. It provides an effect similar | ||
| 734 | to typical word processor behavior. This works by running a | ||
| 735 | paragraph-filling command at suitable times. | ||
| 736 | |||
| 737 | To toggle the use of Refill mode in the current buffer, type | ||
| 738 | @kbd{M-x refill-mode}. When you are typing text, only characters | ||
| 739 | which normally trigger auto filling, like the space character, will | ||
| 740 | trigger refilling. This is to avoid making it too slow. Apart from | ||
| 741 | self-inserting characters, other commands which modify the text cause | ||
| 742 | refilling. | ||
| 743 | |||
| 744 | The current implementation is preliminary and not robust. You can | ||
| 745 | get better ``line wrapping'' behavior using Longlines mode. | ||
| 746 | @xref{Longlines}. However, Longlines mode has an important | ||
| 747 | side-effect: the newlines that it inserts for you are not saved to | ||
| 748 | disk, so the files that you make with Longlines mode will appear to be | ||
| 749 | completely unfilled if you edit them without Longlines mode. | ||
| 750 | |||
| 752 | @node Longlines | 751 | @node Longlines |
| 753 | @subsection Long Lines Mode | 752 | @subsection Long Lines Mode |
| 754 | @cindex refilling text, word processor style | 753 | @cindex refilling text, word processor style |
| @@ -786,11 +785,11 @@ line wrapping, with @kbd{C-u M-x longlines-auto-wrap}. To turn | |||
| 786 | automatic line wrapping back on, type @kbd{M-x longlines-auto-wrap}. | 785 | automatic line wrapping back on, type @kbd{M-x longlines-auto-wrap}. |
| 787 | 786 | ||
| 788 | @findex longlines-show-hard-newlines | 787 | @findex longlines-show-hard-newlines |
| 789 | Whenever you type @kbd{RET}, you are inserting a hard newline. If | 788 | Type @kbd{RET} to insert a hard newline, one which automatic |
| 790 | you want to see where all the hard newlines are, type @kbd{M-x | 789 | refilling will not remove. If you want to see where all the hard |
| 791 | longlines-show-hard-newlines}. This will mark each hard newline with | 790 | newlines are, type @kbd{M-x longlines-show-hard-newlines}. This will |
| 792 | a special symbol. The same command with a prefix argument turns this | 791 | mark each hard newline with a special symbol. The same command with a |
| 793 | display off. | 792 | prefix argument turns this display off. |
| 794 | 793 | ||
| 795 | Long Lines mode does not change normal text files that are already | 794 | Long Lines mode does not change normal text files that are already |
| 796 | filled, since the existing newlines are considered hard newlines. | 795 | filled, since the existing newlines are considered hard newlines. |
| @@ -845,10 +844,11 @@ to the appropriate number of words before point, but do not move point. | |||
| 845 | This is convenient when you have just typed a word in the wrong case: you | 844 | This is convenient when you have just typed a word in the wrong case: you |
| 846 | can give the case conversion command and continue typing. | 845 | can give the case conversion command and continue typing. |
| 847 | 846 | ||
| 848 | If a word case conversion command is given in the middle of a word, it | 847 | If a word case conversion command is given in the middle of a word, |
| 849 | applies only to the part of the word which follows point. This is just | 848 | it applies only to the part of the word which follows point. (This is |
| 850 | like what @kbd{M-d} (@code{kill-word}) does. With a negative argument, | 849 | comparable to what @kbd{M-d} (@code{kill-word}) does.) With a |
| 851 | case conversion applies only to the part of the word before point. | 850 | negative argument, case conversion applies only to the part of the |
| 851 | word before point. | ||
| 852 | 852 | ||
| 853 | @kindex C-x C-l | 853 | @kindex C-x C-l |
| 854 | @kindex C-x C-u | 854 | @kindex C-x C-u |
| @@ -888,22 +888,23 @@ the previous line. | |||
| 888 | Text mode turns off the features concerned with comments except when | 888 | Text mode turns off the features concerned with comments except when |
| 889 | you explicitly invoke them. It changes the syntax table so that | 889 | you explicitly invoke them. It changes the syntax table so that |
| 890 | single-quotes are considered part of words. However, if a word starts | 890 | single-quotes are considered part of words. However, if a word starts |
| 891 | with single-quotes, then these are treated as a prefix for purposes | 891 | with single-quotes, these are treated as a prefix for purposes such as |
| 892 | such as capitalization. That is, @kbd{M-c} will convert | 892 | capitalization. That is, @kbd{M-c} will convert @samp{'hello'} into |
| 893 | @samp{'hello'} into @samp{'Hello'}, as expected. | 893 | @samp{'Hello'}, as expected. |
| 894 | 894 | ||
| 895 | @cindex Paragraph-Indent Text mode | 895 | @cindex Paragraph-Indent Text mode |
| 896 | @cindex mode, Paragraph-Indent Text | 896 | @cindex mode, Paragraph-Indent Text |
| 897 | @findex paragraph-indent-text-mode | 897 | @findex paragraph-indent-text-mode |
| 898 | @findex paragraph-indent-minor-mode | 898 | @findex paragraph-indent-minor-mode |
| 899 | If you indent the first lines of paragraphs, then you should use | 899 | If you indent the first lines of paragraphs, then you should use |
| 900 | Paragraph-Indent Text mode rather than Text mode. In this mode, you do | 900 | Paragraph-Indent Text mode rather than Text mode. In this mode, you |
| 901 | not need to have blank lines between paragraphs, because the first-line | 901 | do not need to have blank lines between paragraphs, because the |
| 902 | indentation is sufficient to start a paragraph; however paragraphs in | 902 | first-line indentation is sufficient to start a paragraph; however |
| 903 | which every line is indented are not supported. Use @kbd{M-x | 903 | paragraphs in which every line is indented are not supported. Use |
| 904 | paragraph-indent-text-mode} to enter this mode. Use @kbd{M-x | 904 | @kbd{M-x paragraph-indent-text-mode} to enter this mode. Use @kbd{M-x |
| 905 | paragraph-indent-minor-mode} to enter an equivalent minor mode, for | 905 | paragraph-indent-minor-mode} to enable an equivalent minor mode in |
| 906 | instance during mail composition. | 906 | situations where you can't change the major mode---in mail |
| 907 | composition, for instance. | ||
| 907 | 908 | ||
| 908 | @kindex M-TAB @r{(Text mode)} | 909 | @kindex M-TAB @r{(Text mode)} |
| 909 | Text mode, and all the modes based on it, define @kbd{M-@key{TAB}} | 910 | Text mode, and all the modes based on it, define @kbd{M-@key{TAB}} |
| @@ -1083,7 +1084,7 @@ heading line. @kbd{C-c C-p} (@code{outline-previous-visible-heading}) moves | |||
| 1083 | similarly backward. Both accept numeric arguments as repeat counts. The | 1084 | similarly backward. Both accept numeric arguments as repeat counts. The |
| 1084 | names emphasize that invisible headings are skipped, but this is not really | 1085 | names emphasize that invisible headings are skipped, but this is not really |
| 1085 | a special feature. All editing commands that look for lines ignore the | 1086 | a special feature. All editing commands that look for lines ignore the |
| 1086 | invisible lines automatically.@refill | 1087 | invisible lines automatically. |
| 1087 | 1088 | ||
| 1088 | @findex outline-up-heading | 1089 | @findex outline-up-heading |
| 1089 | @findex outline-forward-same-level | 1090 | @findex outline-forward-same-level |
| @@ -1164,7 +1165,7 @@ and @kbd{C-c C-s} (@code{show-subtree}). Both apply to the current | |||
| 1164 | heading line's @dfn{subtree}: its body, all its subheadings, both | 1165 | heading line's @dfn{subtree}: its body, all its subheadings, both |
| 1165 | direct and indirect, and all of their bodies. In other words, the | 1166 | direct and indirect, and all of their bodies. In other words, the |
| 1166 | subtree contains everything following the current heading line, up to | 1167 | subtree contains everything following the current heading line, up to |
| 1167 | and not including the next heading of the same or higher rank.@refill | 1168 | and not including the next heading of the same or higher rank. |
| 1168 | 1169 | ||
| 1169 | @findex hide-leaves | 1170 | @findex hide-leaves |
| 1170 | @findex show-branches | 1171 | @findex show-branches |
| @@ -1181,7 +1182,7 @@ bodies or make the subheadings visible. They are @kbd{C-c C-l} | |||
| 1181 | A little weaker than @code{show-branches} is @kbd{C-c C-i} | 1182 | A little weaker than @code{show-branches} is @kbd{C-c C-i} |
| 1182 | (@code{show-children}). It makes just the direct subheadings | 1183 | (@code{show-children}). It makes just the direct subheadings |
| 1183 | visible---those one level down. Deeper subheadings remain invisible, if | 1184 | visible---those one level down. Deeper subheadings remain invisible, if |
| 1184 | they were invisible.@refill | 1185 | they were invisible. |
| 1185 | 1186 | ||
| 1186 | @findex hide-body | 1187 | @findex hide-body |
| 1187 | @findex show-all | 1188 | @findex show-all |
| @@ -1356,13 +1357,14 @@ automatically by putting this in your @file{.emacs} file: | |||
| 1356 | @findex slitex-mode | 1357 | @findex slitex-mode |
| 1357 | @findex doctex-mode | 1358 | @findex doctex-mode |
| 1358 | 1359 | ||
| 1359 | @TeX{} is a powerful text formatter written by Donald Knuth; it is also | 1360 | @TeX{} is a powerful text formatter written by Donald Knuth; it is |
| 1360 | free, like GNU Emacs. La@TeX{} is a simplified input format for @TeX{}, | 1361 | also free software, like GNU Emacs. La@TeX{} is a simplified input |
| 1361 | implemented by @TeX{} macros; it comes with @TeX{}. Sli@TeX{} is a special | 1362 | format for @TeX{}, implemented by @TeX{} macros; it comes with @TeX{}. |
| 1362 | form of La@TeX{}.@footnote{Sli@TeX{} is obsoleted by the @samp{slides} | 1363 | Sli@TeX{} is a special form of La@TeX{}.@footnote{Sli@TeX{} is |
| 1363 | document class in recent La@TeX{} versions.} Doc@TeX{} (@file{.dtx}) | 1364 | obsoleted by the @samp{slides} document class in recent La@TeX{} |
| 1364 | is a special file format in which the La@TeX{} sources are written, | 1365 | versions.} Doc@TeX{} (@file{.dtx}) is a special file format in which |
| 1365 | combining sources with documentation. | 1366 | the La@TeX{} sources are written, combining sources with |
| 1367 | documentation. | ||
| 1366 | 1368 | ||
| 1367 | Emacs has a special @TeX{} mode for editing @TeX{} input files. | 1369 | Emacs has a special @TeX{} mode for editing @TeX{} input files. |
| 1368 | It provides facilities for checking the balance of delimiters and for | 1370 | It provides facilities for checking the balance of delimiters and for |
| @@ -1611,7 +1613,7 @@ C-l}. | |||
| 1611 | 1613 | ||
| 1612 | Type @kbd{C-c C-k} (@code{tex-kill-job}) to kill the @TeX{} process if | 1614 | Type @kbd{C-c C-k} (@code{tex-kill-job}) to kill the @TeX{} process if |
| 1613 | you see that its output is no longer useful. Using @kbd{C-c C-b} or | 1615 | you see that its output is no longer useful. Using @kbd{C-c C-b} or |
| 1614 | @kbd{C-c C-r} also kills any @TeX{} process still running.@refill | 1616 | @kbd{C-c C-r} also kills any @TeX{} process still running. |
| 1615 | 1617 | ||
| 1616 | @findex tex-region | 1618 | @findex tex-region |
| 1617 | @kindex C-c C-r @r{(@TeX{} mode)} | 1619 | @kindex C-c C-r @r{(@TeX{} mode)} |
| @@ -1838,7 +1840,7 @@ used as a cheap preview. | |||
| 1838 | @vindex sgml-xml-mode | 1840 | @vindex sgml-xml-mode |
| 1839 | SGML mode and HTML mode support XML also. In XML, every opening tag | 1841 | SGML mode and HTML mode support XML also. In XML, every opening tag |
| 1840 | must have an explicit closing tag. When @code{sgml-xml-mode} is | 1842 | must have an explicit closing tag. When @code{sgml-xml-mode} is |
| 1841 | non-@code{nil}, SGML mode (and HTML mode) always insert explicit | 1843 | non-@code{nil}, SGML mode and HTML mode always insert explicit |
| 1842 | closing tags. When you visit a file, these modes determine from the | 1844 | closing tags. When you visit a file, these modes determine from the |
| 1843 | file contents whether it is XML or not, and set @code{sgml-xml-mode} | 1845 | file contents whether it is XML or not, and set @code{sgml-xml-mode} |
| 1844 | accordingly, so that they do the right thing for the file in either | 1846 | accordingly, so that they do the right thing for the file in either |
| @@ -2380,7 +2382,7 @@ appropriate, use @code{format-find-file} with suitable arguments. | |||
| 2380 | @cindex table mode | 2382 | @cindex table mode |
| 2381 | @cindex text-based tables | 2383 | @cindex text-based tables |
| 2382 | 2384 | ||
| 2383 | Table Mode provides an easy and intuitive way to create and edit WYSIWYG | 2385 | Table mode provides an easy and intuitive way to create and edit WYSIWYG |
| 2384 | text-based tables. Here is an example of such a table: | 2386 | text-based tables. Here is an example of such a table: |
| 2385 | 2387 | ||
| 2386 | @smallexample | 2388 | @smallexample |
| @@ -2402,7 +2404,7 @@ text-based tables. Here is an example of such a table: | |||
| 2402 | +-----------------+--------------------------------+-----------------+ | 2404 | +-----------------+--------------------------------+-----------------+ |
| 2403 | @end smallexample | 2405 | @end smallexample |
| 2404 | 2406 | ||
| 2405 | Table Mode allows the contents of the table such as this one to be | 2407 | Table mode allows the contents of the table such as this one to be |
| 2406 | easily manipulated by inserting or deleting characters inside a cell. | 2408 | easily manipulated by inserting or deleting characters inside a cell. |
| 2407 | A cell is effectively a localized rectangular edit region and edits to | 2409 | A cell is effectively a localized rectangular edit region and edits to |
| 2408 | a cell do not affect the contents of the surrounding cells. If the | 2410 | a cell do not affect the contents of the surrounding cells. If the |
| @@ -2428,8 +2430,8 @@ growth of the cell. | |||
| 2428 | @node Table Definition | 2430 | @node Table Definition |
| 2429 | @subsection What is a Text-based Table? | 2431 | @subsection What is a Text-based Table? |
| 2430 | 2432 | ||
| 2431 | Look at the following examples of valid tables as a reference while | 2433 | Keep the following examples of valid tables in mind as a reference |
| 2432 | you read this section: | 2434 | while you read this section: |
| 2433 | 2435 | ||
| 2434 | @example | 2436 | @example |
| 2435 | +--+----+---+ +-+ +--+-----+ | 2437 | +--+----+---+ +-+ +--+-----+ |
| @@ -2441,15 +2443,13 @@ you read this section: | |||
| 2441 | +-----+--+ | 2443 | +-----+--+ |
| 2442 | @end example | 2444 | @end example |
| 2443 | 2445 | ||
| 2444 | A table consists of a rectangular frame and the contents inside the | 2446 | A table consists of a rectangular frame whose inside is divided into |
| 2445 | frame. A table's cells must be at least one character wide and one | 2447 | cells. Each cell must be at least one character wide and one |
| 2446 | character high with two adjacent cells sharing a boarder line. A cell | 2448 | character high, not counting its border lines. A cell can be |
| 2447 | can be subdivided into multiple rectangular cells but cannot nest or | 2449 | subdivided into multiple rectangular cells, but cells cannot overlap. |
| 2448 | overlap. | ||
| 2449 | 2450 | ||
| 2450 | Both the table frame and cell border lines must consist of one of | 2451 | The table frame and cell border lines are made of three special |
| 2451 | three special characters. The variables that hold these characters | 2452 | characters. These variables specify those characters: |
| 2452 | are described below: | ||
| 2453 | 2453 | ||
| 2454 | @table @code | 2454 | @table @code |
| 2455 | @vindex table-cell-vertical-char | 2455 | @vindex table-cell-vertical-char |
| @@ -2487,10 +2487,10 @@ From left to right: | |||
| 2487 | 2487 | ||
| 2488 | @enumerate a | 2488 | @enumerate a |
| 2489 | @item | 2489 | @item |
| 2490 | Nested cells are not allowed. | ||
| 2491 | @item | ||
| 2492 | Overlapped cells or non-rectangular cells are not allowed. | 2490 | Overlapped cells or non-rectangular cells are not allowed. |
| 2493 | @item | 2491 | @item |
| 2492 | Same as a. | ||
| 2493 | @item | ||
| 2494 | The border must be rectangular. | 2494 | The border must be rectangular. |
| 2495 | @item | 2495 | @item |
| 2496 | Cells must have a minimum width/height of one character. | 2496 | Cells must have a minimum width/height of one character. |
| @@ -2506,16 +2506,15 @@ Same as d. | |||
| 2506 | @findex table-insert | 2506 | @findex table-insert |
| 2507 | The command to create a table is @code{table-insert}. When called | 2507 | The command to create a table is @code{table-insert}. When called |
| 2508 | interactively, it asks for the number of columns, number of rows, cell | 2508 | interactively, it asks for the number of columns, number of rows, cell |
| 2509 | width and cell height. The number of columns is a number of cells | 2509 | width and cell height. The number of columns is the number of cells |
| 2510 | within the table's width. The number of rows is the number of cells | 2510 | horizontally side by side. The number of rows is the number of cells |
| 2511 | within the table's height. The cell width is a number of characters | 2511 | vertically within the table's height. The cell width is a number of |
| 2512 | that fit within a cell width. The cell height is a number of lines | 2512 | characters that each cell holds, left to right. The cell height is a |
| 2513 | within cell height. While the number of columns and number of rows | 2513 | number of lines each cell holds. The cell width and the cell height |
| 2514 | must be an integer number, the cell width and the cell height can be | 2514 | can be either an integer (when the value is constant across the table) |
| 2515 | either an integer number (when the value is constant across the table) | 2515 | or a series of integer, separated by spaces or commas, where each |
| 2516 | or a series of integer numbers, separated by spaces or commas, where | 2516 | number corresponds to the next cell within a row from left to right, |
| 2517 | each number corresponds to each cell width within a row from left to | 2517 | or the next cell within a column from top to bottom. |
| 2518 | right or each cell height within a column from top to bottom. | ||
| 2519 | 2518 | ||
| 2520 | @node Table Recognition | 2519 | @node Table Recognition |
| 2521 | @subsection Table Recognition | 2520 | @subsection Table Recognition |
| @@ -2523,7 +2522,7 @@ right or each cell height within a column from top to bottom. | |||
| 2523 | 2522 | ||
| 2524 | @findex table-recognize | 2523 | @findex table-recognize |
| 2525 | @findex table-unrecognize | 2524 | @findex table-unrecognize |
| 2526 | Table Mode maintains special text properties in the buffer to allow | 2525 | Table mode maintains special text properties in the buffer to allow |
| 2527 | editing in a convenient fashion. When a buffer with tables is saved | 2526 | editing in a convenient fashion. When a buffer with tables is saved |
| 2528 | to its file, these text properties are lost, so when you visit this | 2527 | to its file, these text properties are lost, so when you visit this |
| 2529 | file again later, Emacs does not see a table, but just formatted text. | 2528 | file again later, Emacs does not see a table, but just formatted text. |
| @@ -2531,15 +2530,10 @@ To resurrect the table text properties, issue the @kbd{M-x | |||
| 2531 | table-recognize} command. It scans the current buffer, recognizes | 2530 | table-recognize} command. It scans the current buffer, recognizes |
| 2532 | valid table cells, and attaches appropriate text properties to allow | 2531 | valid table cells, and attaches appropriate text properties to allow |
| 2533 | for table editing. The converse command, @code{table-unrecognize}, is | 2532 | for table editing. The converse command, @code{table-unrecognize}, is |
| 2534 | used to remove the special text properties and revert the buffer back | 2533 | used to remove the special text properties and convert the buffer back |
| 2535 | to plain text. | 2534 | to plain text. |
| 2536 | 2535 | ||
| 2537 | An optional numeric prefix argument can precede the | 2536 | Special commands exist to enable or disable tables within a region, |
| 2538 | @code{table-recognize} command. If the argument is negative, tables | ||
| 2539 | in the buffer become inactive. This is equivalent to invoking | ||
| 2540 | @code{table-unrecognize}. | ||
| 2541 | |||
| 2542 | Similar functions exist to enable or disable tables within a region, | ||
| 2543 | enable or disable individual tables, and enable/disable individual | 2537 | enable or disable individual tables, and enable/disable individual |
| 2544 | cells. These commands are: | 2538 | cells. These commands are: |
| 2545 | 2539 | ||
| @@ -2575,10 +2569,10 @@ Conversion}. | |||
| 2575 | The commands @code{table-forward-cell} and | 2569 | The commands @code{table-forward-cell} and |
| 2576 | @code{table-backward-cell} move point from the current cell to an | 2570 | @code{table-backward-cell} move point from the current cell to an |
| 2577 | adjacent cell forward and backward respectively. The order of the | 2571 | adjacent cell forward and backward respectively. The order of the |
| 2578 | cell is wrapped. When point is positioned in the last cell of a | 2572 | cells is cyclic: when point is in the last cell of a table, typing |
| 2579 | table, typing @kbd{M-x table-forward-cell} moves point to the first | 2573 | @kbd{M-x table-forward-cell} moves to the first cell in the table. |
| 2580 | cell in the table. Likewise @kbd{M-x table-backward-cell} from the | 2574 | Likewise @kbd{M-x table-backward-cell} from the first cell in a table |
| 2581 | first cell in a table moves point to the last cell in the table. | 2575 | moves to the last cell. |
| 2582 | 2576 | ||
| 2583 | @findex table-span-cell | 2577 | @findex table-span-cell |
| 2584 | The command @code{table-span-cell} spans the current cell into one | 2578 | The command @code{table-span-cell} spans the current cell into one |
| @@ -2602,18 +2596,17 @@ point is located. The content in the original cell is split as well. | |||
| 2602 | @findex table-split-cell-horizontally | 2596 | @findex table-split-cell-horizontally |
| 2603 | The command @code{table-split-cell-horizontally} splits the current | 2597 | The command @code{table-split-cell-horizontally} splits the current |
| 2604 | cell horizontally and creates a pair of cells right and left of where | 2598 | cell horizontally and creates a pair of cells right and left of where |
| 2605 | point is located. If the subject cell to split is not empty the user | 2599 | point is located. If the cell being split is not empty, this asks you |
| 2606 | is asked how to handle the cell contents. The three options are: | 2600 | how to handle the cell contents. The three options are: @code{split}, |
| 2607 | @code{split}, @code{left}, or @code{right}. @code{split} splits the | 2601 | @code{left}, or @code{right}. @code{split} splits the contents at |
| 2608 | contents at point literally while the @code{left} and @code{right} | 2602 | point literally, while the @code{left} and @code{right} options move |
| 2609 | options move the entire contents into the left or right cell | 2603 | the entire contents into the left or right cell respectively. |
| 2610 | respectively. | ||
| 2611 | 2604 | ||
| 2612 | @cindex enlarge a table cell | 2605 | @cindex enlarge a table cell |
| 2613 | @cindex shrink a table cell | 2606 | @cindex shrink a table cell |
| 2614 | The next four commands enlarge or shrink a cell. These commands | 2607 | The next four commands enlarge or shrink a cell. They use numeric |
| 2615 | accept numeric arguments (@pxref{Arguments}) to specify how many | 2608 | arguments (@pxref{Arguments}) to specify how many columns or rows to |
| 2616 | columns or rows to enlarge or shrink a particular table. | 2609 | enlarge or shrink a particular table. |
| 2617 | 2610 | ||
| 2618 | @table @kbd | 2611 | @table @kbd |
| 2619 | @findex table-heighten-cell | 2612 | @findex table-heighten-cell |
| @@ -2639,21 +2632,20 @@ is remembered independently for each cell and the subsequent editing | |||
| 2639 | of cell contents is subject to the specified justification. | 2632 | of cell contents is subject to the specified justification. |
| 2640 | 2633 | ||
| 2641 | @findex table-justify | 2634 | @findex table-justify |
| 2642 | The command @code{table-justify} requests the user to specify what | 2635 | The command @code{table-justify} ask you to specify what to justify: |
| 2643 | to justify: a cell,a column, or a row. If you select cell | 2636 | a cell, a column, or a row. If you select cell justification, this |
| 2644 | justification, this command sets the justification only to the current | 2637 | command sets the justification only for the current cell. Selecting |
| 2645 | cell. Selecting column or row justification set the justification to | 2638 | column or row justification sets the justification for all the cells |
| 2646 | all the cells within a column or row respectively. The command then | 2639 | within a column or row respectively. The command then ask you which |
| 2647 | requests the user to enter which justification to apply: @code{left}, | 2640 | kind of justification to apply: @code{left}, @code{center}, |
| 2648 | @code{center}, @code{right}, @code{top}, @code{middle}, @code{bottom}, | 2641 | @code{right}, @code{top}, @code{middle}, @code{bottom}, or |
| 2649 | or @code{none}. The options @code{left}, @code{center}, and | 2642 | @code{none}. Horizontal justification and vertical justification are |
| 2643 | specified independently. The options @code{left}, @code{center}, and | ||
| 2650 | @code{right} specify horizontal justification while the options | 2644 | @code{right} specify horizontal justification while the options |
| 2651 | @code{top}, @code{middle}, @code{bottom}, and @code{none} specify | 2645 | @code{top}, @code{middle}, @code{bottom}, and @code{none} specify |
| 2652 | vertical justification. The vertical justification @code{none} | 2646 | vertical justification. The vertical justification @code{none} |
| 2653 | effectively removes vertical justification while horizontal | 2647 | effectively removes vertical justification. Horizontal justification |
| 2654 | justification must be one of @code{left}, @code{center}, or | 2648 | must be one of @code{left}, @code{center}, or @code{right}. |
| 2655 | @code{right}. Horizontal justification and vertical justification are | ||
| 2656 | specified independently. | ||
| 2657 | 2649 | ||
| 2658 | @vindex table-detect-cell-alignment | 2650 | @vindex table-detect-cell-alignment |
| 2659 | Justification information is stored in the buffer as a part of text | 2651 | Justification information is stored in the buffer as a part of text |
| @@ -2667,8 +2659,8 @@ the contents of a cell are examined to determine which justification | |||
| 2667 | was originally applied to the cell and then applies this justification | 2659 | was originally applied to the cell and then applies this justification |
| 2668 | to the cell. This is a speculative algorithm and is therefore not | 2660 | to the cell. This is a speculative algorithm and is therefore not |
| 2669 | perfect, however, the justification is deduced correctly most of the | 2661 | perfect, however, the justification is deduced correctly most of the |
| 2670 | time. If you desire to disable this feature, customize the variable | 2662 | time. To disable this feature, customize the variable |
| 2671 | @code{table-detect-cell-alignment} to set it to @code{nil}. | 2663 | @code{table-detect-cell-alignment} and set it to @code{nil}. |
| 2672 | 2664 | ||
| 2673 | @node Row Commands | 2665 | @node Row Commands |
| 2674 | @subsection Commands for Table Rows | 2666 | @subsection Commands for Table Rows |
| @@ -2681,7 +2673,7 @@ the current row in a table. The current row where point is located is | |||
| 2681 | pushed down after the newly inserted row. A numeric prefix argument | 2673 | pushed down after the newly inserted row. A numeric prefix argument |
| 2682 | specifies the number of rows to insert. Note that in order to insert | 2674 | specifies the number of rows to insert. Note that in order to insert |
| 2683 | rows @emph{after} the last row at the bottom of a table, you must | 2675 | rows @emph{after} the last row at the bottom of a table, you must |
| 2684 | place point below the table, i.e.@: outside the table, prior to | 2676 | place point below the table---that is, outside the table---prior to |
| 2685 | invoking this command. | 2677 | invoking this command. |
| 2686 | 2678 | ||
| 2687 | @cindex delete row in table | 2679 | @cindex delete row in table |
| @@ -2696,12 +2688,11 @@ A numeric prefix argument specifies the number of rows to delete. | |||
| 2696 | @cindex insert column in table | 2688 | @cindex insert column in table |
| 2697 | @findex table-insert-column | 2689 | @findex table-insert-column |
| 2698 | The command @code{table-insert-column} inserts a column of cells to | 2690 | The command @code{table-insert-column} inserts a column of cells to |
| 2699 | the left of the current row in a table. The current column where | 2691 | the left of the current row in a table. This pushes the current |
| 2700 | point is located at is pushed right of the newly inserted column. To | 2692 | column to the right. To insert a column to the right side of the |
| 2701 | insert a column to the right side of the right most column, place | 2693 | rightmost column, place point to the right of the rightmost column, |
| 2702 | point to the right of the rightmost column, which is outside of the | 2694 | which is outside of the table, prior to invoking this command. A |
| 2703 | table, prior to invoking this command. A numeric prefix argument | 2695 | numeric prefix argument specifies the number of columns to insert. |
| 2704 | specifies the number of columns to insert. | ||
| 2705 | 2696 | ||
| 2706 | @cindex delete column in table | 2697 | @cindex delete column in table |
| 2707 | A command @code{table-delete-column} deletes a column of cells at | 2698 | A command @code{table-delete-column} deletes a column of cells at |
| @@ -2714,11 +2705,10 @@ delete. | |||
| 2714 | 2705 | ||
| 2715 | @findex table-fixed-width-mode | 2706 | @findex table-fixed-width-mode |
| 2716 | The command @code{table-fixed-width-mode} toggles fixed width mode | 2707 | The command @code{table-fixed-width-mode} toggles fixed width mode |
| 2717 | on and off. When the fixed width mode is turned on, editing inside a | 2708 | on and off. When fixed width mode is turned on, editing inside a |
| 2718 | cell never changes the cell width; when it is off, the cell width | 2709 | cell never changes the cell width; when it is off, the cell width |
| 2719 | expands automatically in order to prevent a word from being folded | 2710 | expands automatically in order to prevent a word from being folded |
| 2720 | into multiple lines. By default, the fixed width mode is turned off. | 2711 | into multiple lines. By default, fixed width mode is disabled. |
| 2721 | |||
| 2722 | 2712 | ||
| 2723 | @node Table Conversion | 2713 | @node Table Conversion |
| 2724 | @subsection Conversion Between Plain Text and Tables | 2714 | @subsection Conversion Between Plain Text and Tables |
| @@ -2731,9 +2721,11 @@ turns it into a table. Unlike @code{table-recognize} (@pxref{Table | |||
| 2731 | Recognition}), the original text does not have a table appearance but | 2721 | Recognition}), the original text does not have a table appearance but |
| 2732 | may hold a logical table structure. For example, some elements | 2722 | may hold a logical table structure. For example, some elements |
| 2733 | separated by known patterns form a two dimensional structure which can | 2723 | separated by known patterns form a two dimensional structure which can |
| 2734 | be turned into a table. Look at the numbers below. The numbers are | 2724 | be turned into a table. |
| 2735 | horizontally separated by a comma and vertically separated by a | 2725 | |
| 2736 | newline character. | 2726 | Here's an example of data that @code{table-capture} can operate on. |
| 2727 | The numbers are horizontally separated by a comma and vertically | ||
| 2728 | separated by a newline character. | ||
| 2737 | 2729 | ||
| 2738 | @example | 2730 | @example |
| 2739 | 1, 2, 3, 4 | 2731 | 1, 2, 3, 4 |
| @@ -2742,8 +2734,7 @@ newline character. | |||
| 2742 | @end example | 2734 | @end example |
| 2743 | 2735 | ||
| 2744 | @noindent | 2736 | @noindent |
| 2745 | When you invoke @kbd{M-x table-capture} on the above three-line | 2737 | Invoking @kbd{M-x table-capture} on that text produces this table: |
| 2746 | region, the region can be turned into the next table: | ||
| 2747 | 2738 | ||
| 2748 | @example | 2739 | @example |
| 2749 | +-----+-----+-----+-----+ | 2740 | +-----+-----+-----+-----+ |
| @@ -2756,9 +2747,9 @@ region, the region can be turned into the next table: | |||
| 2756 | @end example | 2747 | @end example |
| 2757 | 2748 | ||
| 2758 | @noindent | 2749 | @noindent |
| 2759 | where @samp{,} is used for a column delimiter regexp, a newline is | 2750 | The conversion uses @samp{,} for the column delimiter and newline for |
| 2760 | used for a row delimiter regexp, cells are left justified, and minimum | 2751 | a row delimiter, cells are left justified, and minimum cell width is |
| 2761 | cell width is 5. | 2752 | 5. |
| 2762 | 2753 | ||
| 2763 | @findex table-release | 2754 | @findex table-release |
| 2764 | The command @code{table-release} does the opposite of | 2755 | The command @code{table-release} does the opposite of |
| @@ -2771,7 +2762,7 @@ lines): | |||
| 2771 | 2762 | ||
| 2772 | @example | 2763 | @example |
| 2773 | @samp{table-capture} is a powerful command however mastering its power | 2764 | @samp{table-capture} is a powerful command however mastering its power |
| 2774 | requires some practice. Here is a list of items what it can do. | 2765 | requires some practice. Here are some things it can do: |
| 2775 | 2766 | ||
| 2776 | Parse Cell Items By using column delimiter regular | 2767 | Parse Cell Items By using column delimiter regular |
| 2777 | expression and raw delimiter regular | 2768 | expression and raw delimiter regular |
| @@ -2797,9 +2788,8 @@ following one. | |||
| 2797 | @c produced output!! | 2788 | @c produced output!! |
| 2798 | @example | 2789 | @example |
| 2799 | +-----------------------------------------------------------------+ | 2790 | +-----------------------------------------------------------------+ |
| 2800 | |@samp{table-capture} is a powerful command however mastering its | | 2791 | |@samp{table-capture} is a powerful command, but mastering its | |
| 2801 | |power requires some practice. Here is a list of items what it | | 2792 | |power requires some practice. Here are some things it can do: | |
| 2802 | |can do. | | ||
| 2803 | | | | 2793 | | | |
| 2804 | |Parse Cell Items By using column delimiter regular | | 2794 | |Parse Cell Items By using column delimiter regular | |
| 2805 | | expression and raw delimiter regular | | 2795 | | expression and raw delimiter regular | |
| @@ -2822,9 +2812,8 @@ independently without affecting the layout of other cells. | |||
| 2822 | 2812 | ||
| 2823 | @example | 2813 | @example |
| 2824 | +-----------------------------------------------------------------+ | 2814 | +-----------------------------------------------------------------+ |
| 2825 | |@samp{table-capture} is a powerful command however mastering its | | 2815 | |@samp{table-capture} is a powerful command, but mastering its | |
| 2826 | |power requires some practice. Here is a list of items what it | | 2816 | |power requires some practice. Here are some things it can do: | |
| 2827 | |can do. | | ||
| 2828 | +---------------------+-------------------------------------------+ | 2817 | +---------------------+-------------------------------------------+ |
| 2829 | |Parse Cell Items |By using column delimiter regular | | 2818 | |Parse Cell Items |By using column delimiter regular | |
| 2830 | | |expression and raw delimiter regular | | 2819 | | |expression and raw delimiter regular | |
| @@ -2877,7 +2866,7 @@ increasing integer numbers. | |||
| 2877 | @cindex table in language format | 2866 | @cindex table in language format |
| 2878 | @cindex table for HTML and LaTeX | 2867 | @cindex table for HTML and LaTeX |
| 2879 | @findex table-generate-source | 2868 | @findex table-generate-source |
| 2880 | The command @code{table-generate-source} generates a table formatted | 2869 | The command @code{table-generate-source} generates a table formatted |
| 2881 | for a specific markup language. It asks for a language (which must be | 2870 | for a specific markup language. It asks for a language (which must be |
| 2882 | one of @code{html}, @code{latex}, or @code{cals}), a destination | 2871 | one of @code{html}, @code{latex}, or @code{cals}), a destination |
| 2883 | buffer where to put the result, and the table caption (a string), and | 2872 | buffer where to put the result, and the table caption (a string), and |