From f404f8bc6354c41f96f23ef6cf00c72d00cd798b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 25 Aug 2011 12:13:59 -0400 Subject: Relocate some additional Emacs manual nodes. * doc/emacs/display.texi (Narrowing): Move into display chapter. * doc/emacs/picture-xtra.texi (Picture Mode): Group with Editing Binary Files section. Convert from chapter into section. * doc/emacs/text.texi (Two-Column): Move into Text chapter. --- doc/emacs/ChangeLog | 7 ++ doc/emacs/display.texi | 68 ++++++++++++++++++ doc/emacs/emacs.texi | 25 +++---- doc/emacs/misc.texi | 170 +++----------------------------------------- doc/emacs/picture-xtra.texi | 10 +-- doc/emacs/text.texi | 91 ++++++++++++++++++++++++ 6 files changed, 190 insertions(+), 181 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 0cdf29d7fc..bf600a4269 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,5 +1,12 @@ 2011-08-25 Chong Yidong + * text.texi (Two-Column): Move into Text chapter. + + * picture-xtra.texi (Picture Mode): Group with Editing Binary + Files section. Convert from chapter into section. + + * display.texi (Narrowing): Move into display chapter. + * sending.texi (Sending Mail): * rmail.texi (Rmail): * misc.texi (Gnus, Document View): diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index bfbfb355c9..cc7f70cf57 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -15,6 +15,8 @@ want to see, and how to display it. * Scrolling:: Commands to move text up and down in a window. * Auto Scrolling:: Redisplay scrolls text automatically when needed. * Horizontal Scrolling:: Moving text left and right in a window. +* Narrowing:: Restricting display and editing to a portion + of the buffer. * Follow Mode:: Follow mode lets two windows scroll as one. * Faces:: How to change the display style using faces. * Standard Faces:: Emacs' predefined faces. @@ -300,6 +302,72 @@ a lower bound for automatic horizontal scrolling. Automatic scrolling will continue to scroll the window, but never farther to the right than the amount you previously set by @code{scroll-left}. +@node Narrowing +@section Narrowing +@cindex widening +@cindex restriction +@cindex narrowing +@cindex accessible portion + + @dfn{Narrowing} means focusing in on some portion of the buffer, +making the rest temporarily inaccessible. The portion which you can +still get to is called the @dfn{accessible portion}. Canceling the +narrowing, which makes the entire buffer once again accessible, is +called @dfn{widening}. The bounds of narrowing in effect in a buffer +are called the buffer's @dfn{restriction}. + + Narrowing can make it easier to concentrate on a single subroutine or +paragraph by eliminating clutter. It can also be used to limit the +range of operation of a replace command or repeating keyboard macro. + +@table @kbd +@item C-x n n +Narrow down to between point and mark (@code{narrow-to-region}). +@item C-x n w +Widen to make the entire buffer accessible again (@code{widen}). +@item C-x n p +Narrow down to the current page (@code{narrow-to-page}). +@item C-x n d +Narrow down to the current defun (@code{narrow-to-defun}). +@end table + + When you have narrowed down to a part of the buffer, that part appears +to be all there is. You can't see the rest, you can't move into it +(motion commands won't go outside the accessible part), you can't change +it in any way. However, it is not gone, and if you save the file all +the inaccessible text will be saved. The word @samp{Narrow} appears in +the mode line whenever narrowing is in effect. + +@kindex C-x n n +@findex narrow-to-region + The primary narrowing command is @kbd{C-x n n} (@code{narrow-to-region}). +It sets the current buffer's restrictions so that the text in the current +region remains accessible, but all text before the region or after the +region is inaccessible. Point and mark do not change. + +@kindex C-x n p +@findex narrow-to-page +@kindex C-x n d +@findex narrow-to-defun + Alternatively, use @kbd{C-x n p} (@code{narrow-to-page}) to narrow +down to the current page. @xref{Pages}, for the definition of a page. +@kbd{C-x n d} (@code{narrow-to-defun}) narrows down to the defun +containing point (@pxref{Defuns}). + +@kindex C-x n w +@findex widen + The way to cancel narrowing is to widen with @kbd{C-x n w} +(@code{widen}). This makes all text in the buffer accessible again. + + You can get information on what part of the buffer you are narrowed down +to using the @kbd{C-x =} command. @xref{Position Info}. + + Because narrowing can easily confuse users who do not understand it, +@code{narrow-to-region} is normally a disabled command. Attempting to use +this command asks for confirmation and gives you the option of enabling it; +if you enable the command, confirmation will no longer be required for +it. @xref{Disabling}. + @node Follow Mode @section Follow Mode @cindex Follow mode diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 533c290cea..1b5ae41598 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -187,16 +187,12 @@ Major Structures of Emacs Advanced Features * Modes:: Major and minor modes alter Emacs' basic behavior. * Indentation:: Editing the white space at the beginnings of lines. -* Text:: Commands and modes for editing English. +* Text:: Commands and modes for editing human languages. * Programs:: Commands and modes for editing programs. * Building:: Compiling, running and debugging programs. * Maintaining:: Features for maintaining large programs. * Abbrevs:: Defining text abbreviations to reduce the number of characters you must type. -@c AFAICS, the tex stuff generates its own index and does not use this one. -@ifnottex -* Picture Mode:: Editing pictures made up of text characters. -@end ifnottex * Dired:: Directory and file manager. * Calendar/Diary:: Calendar and diary facilities. * Document View:: Viewing PDF, PS and DVI files. @@ -207,15 +203,12 @@ Advanced Features * Emacs Server:: Using Emacs as an editing server. * Printing:: Printing hardcopies of buffers or regions. * Sorting:: Sorting lines, paragraphs or pages within Emacs. -* Narrowing:: Restricting display and editing to a portion - of the buffer. -* Two-Column:: Splitting apart columns to edit them - in side-by-side windows. -* Editing Binary Files::Using Hexl mode to edit binary files. +@ifnottex +* Picture Mode:: Editing pictures made up of text characters. +@end ifnottex +* Editing Binary Files:: Editing binary files with Hexl mode. * Saving Emacs Sessions:: Saving Emacs state from one session to the next. -* Recursive Edit:: A command can allow you to do editing - "within the command". This is called a - "recursive editing level". +* Recursive Edit:: Performing edits while "within another command". * Emulation:: Emulating some other editors with Emacs. * Hyperlinking:: Following links in buffers. * Amusements:: Various games and hacks. @@ -349,6 +342,8 @@ Controlling the Display * Scrolling:: Commands to move text up and down in a window. * Auto Scrolling:: Redisplay scrolls text automatically when needed. * Horizontal Scrolling:: Moving text left and right in a window. +* Narrowing:: Restricting display and editing to a portion + of the buffer. * Follow Mode:: Follow mode lets two windows scroll as one. * Faces:: How to change the display style using faces. * Standard Faces:: Emacs' predefined faces. @@ -576,6 +571,7 @@ Commands for Human Languages * Nroff Mode:: Editing input to the formatter nroff. * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. +* Two-Column:: Splitting text columns into separate windows. Filling Text @@ -1493,9 +1489,6 @@ Lisp programming. @c Includes vc1-xtra, emerge-xtra. @include maintaining.texi @include abbrevs.texi -@ifnottex -@include picture-xtra.texi -@end ifnottex @include sending.texi @include rmail.texi @c Includes dired-xtra. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 16b5b0bd6e..d49c5c034d 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -10,9 +10,9 @@ else: viewing ``document files'', reading netnews, running shell commands and shell subprocesses, using a single shared Emacs for utilities that expect to run an editor as a subprocess, printing hardcopy, sorting text, narrowing display to part of the buffer, -editing double-column files and binary files, saving an Emacs session -for later resumption, following hyperlinks, browsing images, emulating -other editors, and various diversions and amusements. +editing binary files, saving an Emacs session for later resumption, +following hyperlinks, browsing images, emulating other editors, and +various diversions and amusements. @end iftex @@ -166,7 +166,7 @@ look at. (@code{doc-view-set-slice}); then enter the top left pixel position and the slice's width and height. @c ??? how does this work? - + A more convenient graphical way to specify the slice is with @kbd{s m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to select the slice. @@ -1999,7 +1999,7 @@ to print, you start the print job using the @samp{Print} button (click further information on the various options, use the @samp{Interface Help} button. -@node Sorting, Narrowing, Printing, Top +@node Sorting @section Sorting Text @cindex sorting @@ -2134,163 +2134,13 @@ rectangle moves along with the text inside the rectangle. Many of the sort commands ignore case differences when comparing, if @code{sort-fold-case} is non-@code{nil}. -@node Narrowing, Two-Column, Sorting, Top -@section Narrowing -@cindex widening -@cindex restriction -@cindex narrowing -@cindex accessible portion - - @dfn{Narrowing} means focusing in on some portion of the buffer, -making the rest temporarily inaccessible. The portion which you can -still get to is called the @dfn{accessible portion}. Canceling the -narrowing, which makes the entire buffer once again accessible, is -called @dfn{widening}. The bounds of narrowing in effect in a buffer -are called the buffer's @dfn{restriction}. - - Narrowing can make it easier to concentrate on a single subroutine or -paragraph by eliminating clutter. It can also be used to limit the -range of operation of a replace command or repeating keyboard macro. - -@table @kbd -@item C-x n n -Narrow down to between point and mark (@code{narrow-to-region}). -@item C-x n w -Widen to make the entire buffer accessible again (@code{widen}). -@item C-x n p -Narrow down to the current page (@code{narrow-to-page}). -@item C-x n d -Narrow down to the current defun (@code{narrow-to-defun}). -@end table - - When you have narrowed down to a part of the buffer, that part appears -to be all there is. You can't see the rest, you can't move into it -(motion commands won't go outside the accessible part), you can't change -it in any way. However, it is not gone, and if you save the file all -the inaccessible text will be saved. The word @samp{Narrow} appears in -the mode line whenever narrowing is in effect. - -@kindex C-x n n -@findex narrow-to-region - The primary narrowing command is @kbd{C-x n n} (@code{narrow-to-region}). -It sets the current buffer's restrictions so that the text in the current -region remains accessible, but all text before the region or after the -region is inaccessible. Point and mark do not change. - -@kindex C-x n p -@findex narrow-to-page -@kindex C-x n d -@findex narrow-to-defun - Alternatively, use @kbd{C-x n p} (@code{narrow-to-page}) to narrow -down to the current page. @xref{Pages}, for the definition of a page. -@kbd{C-x n d} (@code{narrow-to-defun}) narrows down to the defun -containing point (@pxref{Defuns}). - -@kindex C-x n w -@findex widen - The way to cancel narrowing is to widen with @kbd{C-x n w} -(@code{widen}). This makes all text in the buffer accessible again. - - You can get information on what part of the buffer you are narrowed down -to using the @kbd{C-x =} command. @xref{Position Info}. - - Because narrowing can easily confuse users who do not understand it, -@code{narrow-to-region} is normally a disabled command. Attempting to use -this command asks for confirmation and gives you the option of enabling it; -if you enable the command, confirmation will no longer be required for -it. @xref{Disabling}. - -@node Two-Column, Editing Binary Files, Narrowing, Top -@section Two-Column Editing -@cindex two-column editing -@cindex splitting columns -@cindex columns, splitting - - Two-column mode lets you conveniently edit two side-by-side columns of -text. It uses two side-by-side windows, each showing its own -buffer. - - There are three ways to enter two-column mode: +@c Picture Mode documentation +@ifnottex +@include picture-xtra.texi +@end ifnottex -@table @asis -@item @kbd{@key{F2} 2} or @kbd{C-x 6 2} -@kindex F2 2 -@kindex C-x 6 2 -@findex 2C-two-columns -Enter two-column mode with the current buffer on the left, and on the -right, a buffer whose name is based on the current buffer's name -(@code{2C-two-columns}). If the right-hand buffer doesn't already -exist, it starts out empty; the current buffer's contents are not -changed. - -This command is appropriate when the current buffer is empty or contains -just one column and you want to add another column. - -@item @kbd{@key{F2} s} or @kbd{C-x 6 s} -@kindex F2 s -@kindex C-x 6 s -@findex 2C-split -Split the current buffer, which contains two-column text, into two -buffers, and display them side by side (@code{2C-split}). The current -buffer becomes the left-hand buffer, but the text in the right-hand -column is moved into the right-hand buffer. The current column -specifies the split point. Splitting starts with the current line and -continues to the end of the buffer. - -This command is appropriate when you have a buffer that already contains -two-column text, and you wish to separate the columns temporarily. - -@item @kbd{@key{F2} b @var{buffer} @key{RET}} -@itemx @kbd{C-x 6 b @var{buffer} @key{RET}} -@kindex F2 b -@kindex C-x 6 b -@findex 2C-associate-buffer -Enter two-column mode using the current buffer as the left-hand buffer, -and using buffer @var{buffer} as the right-hand buffer -(@code{2C-associate-buffer}). -@end table - @kbd{@key{F2} s} or @kbd{C-x 6 s} looks for a column separator, which -is a string that appears on each line between the two columns. You can -specify the width of the separator with a numeric argument to -@kbd{@key{F2} s}; that many characters, before point, constitute the -separator string. By default, the width is 1, so the column separator -is the character before point. - - When a line has the separator at the proper place, @kbd{@key{F2} s} -puts the text after the separator into the right-hand buffer, and -deletes the separator. Lines that don't have the column separator at -the proper place remain unsplit; they stay in the left-hand buffer, and -the right-hand buffer gets an empty line to correspond. (This is the -way to write a line that ``spans both columns while in two-column -mode'': write it in the left-hand buffer, and put an empty line in the -right-hand buffer.) - -@kindex F2 RET -@kindex C-x 6 RET -@findex 2C-newline - The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}} -(@code{2C-newline}) inserts a newline in each of the two buffers at -corresponding positions. This is the easiest way to add a new line to -the two-column text while editing it in split buffers. - -@kindex F2 1 -@kindex C-x 6 1 -@findex 2C-merge - When you have edited both buffers as you wish, merge them with -@kbd{@key{F2} 1} or @kbd{C-x 6 1} (@code{2C-merge}). This copies the -text from the right-hand buffer as a second column in the other buffer. -To go back to two-column editing, use @kbd{@key{F2} s}. - -@kindex F2 d -@kindex C-x 6 d -@findex 2C-dissociate - Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers, -leaving each as it stands (@code{2C-dissociate}). If the other buffer, -the one not current when you type @kbd{@key{F2} d}, is empty, -@kbd{@key{F2} d} kills it. - -@node Editing Binary Files, Saving Emacs Sessions, Two-Column, Top +@node Editing Binary Files @section Editing Binary Files @cindex Hexl mode diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi index 0dcfc7a962..43a2dbc470 100644 --- a/doc/emacs/picture-xtra.texi +++ b/doc/emacs/picture-xtra.texi @@ -5,7 +5,7 @@ @c This file is included either in emacs-xtra.texi (when producing the @c printed version) or in the main Emacs manual (for the on-line version). @node Picture Mode -@chapter Editing Pictures +@section Editing Pictures @cindex pictures @cindex making pictures out of text characters @findex picture-mode @@ -59,7 +59,7 @@ Additional extensions to Picture mode can be found in @end menu @node Basic Picture -@section Basic Editing in Picture Mode +@subsection Basic Editing in Picture Mode @findex picture-forward-column @findex picture-backward-column @@ -124,7 +124,7 @@ modes), or one of the picture rectangle commands (@pxref{Rectangles in Picture}). @node Insert in Picture -@section Controlling Motion after Insert +@subsection Controlling Motion after Insert @findex picture-movement-up @findex picture-movement-down @@ -188,7 +188,7 @@ same direction as motion after ``insertion'' currently does, while @kbd{C-c C-b} (@code{picture-motion-reverse}) moves in the opposite direction. @node Tabs in Picture -@section Picture Mode Tabs +@subsection Picture Mode Tabs @kindex M-TAB @r{(Picture mode)} @findex picture-tab-search @@ -228,7 +228,7 @@ up the picture. You can do this by setting the variable @code{indent-tabs-mode} to @code{nil}. @node Rectangles in Picture -@section Picture Mode Rectangle Commands +@subsection Picture Mode Rectangle Commands @cindex rectangles and Picture mode @cindex Picture mode and rectangles diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index e3f5c05d8d..0b0e4867ae 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -70,6 +70,7 @@ for editing such pictures. * Nroff Mode:: Editing input to the formatter nroff. * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. +* Two-Column:: Splitting text columns into separate windows. @end menu @node Words @@ -2837,3 +2838,93 @@ then inserts the generated table in the proper syntax into the destination buffer. The default destination buffer is @code{table.@var{lang}}, where @var{lang} is the language you specified. + +@node Two-Column +@section Two-Column Editing +@cindex two-column editing +@cindex splitting columns +@cindex columns, splitting + + Two-column mode lets you conveniently edit two side-by-side columns of +text. It uses two side-by-side windows, each showing its own +buffer. + + There are three ways to enter two-column mode: + +@table @asis +@item @kbd{@key{F2} 2} or @kbd{C-x 6 2} +@kindex F2 2 +@kindex C-x 6 2 +@findex 2C-two-columns +Enter two-column mode with the current buffer on the left, and on the +right, a buffer whose name is based on the current buffer's name +(@code{2C-two-columns}). If the right-hand buffer doesn't already +exist, it starts out empty; the current buffer's contents are not +changed. + +This command is appropriate when the current buffer is empty or contains +just one column and you want to add another column. + +@item @kbd{@key{F2} s} or @kbd{C-x 6 s} +@kindex F2 s +@kindex C-x 6 s +@findex 2C-split +Split the current buffer, which contains two-column text, into two +buffers, and display them side by side (@code{2C-split}). The current +buffer becomes the left-hand buffer, but the text in the right-hand +column is moved into the right-hand buffer. The current column +specifies the split point. Splitting starts with the current line and +continues to the end of the buffer. + +This command is appropriate when you have a buffer that already contains +two-column text, and you wish to separate the columns temporarily. + +@item @kbd{@key{F2} b @var{buffer} @key{RET}} +@itemx @kbd{C-x 6 b @var{buffer} @key{RET}} +@kindex F2 b +@kindex C-x 6 b +@findex 2C-associate-buffer +Enter two-column mode using the current buffer as the left-hand buffer, +and using buffer @var{buffer} as the right-hand buffer +(@code{2C-associate-buffer}). +@end table + + @kbd{@key{F2} s} or @kbd{C-x 6 s} looks for a column separator, which +is a string that appears on each line between the two columns. You can +specify the width of the separator with a numeric argument to +@kbd{@key{F2} s}; that many characters, before point, constitute the +separator string. By default, the width is 1, so the column separator +is the character before point. + + When a line has the separator at the proper place, @kbd{@key{F2} s} +puts the text after the separator into the right-hand buffer, and +deletes the separator. Lines that don't have the column separator at +the proper place remain unsplit; they stay in the left-hand buffer, and +the right-hand buffer gets an empty line to correspond. (This is the +way to write a line that ``spans both columns while in two-column +mode'': write it in the left-hand buffer, and put an empty line in the +right-hand buffer.) + +@kindex F2 RET +@kindex C-x 6 RET +@findex 2C-newline + The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}} +(@code{2C-newline}) inserts a newline in each of the two buffers at +corresponding positions. This is the easiest way to add a new line to +the two-column text while editing it in split buffers. + +@kindex F2 1 +@kindex C-x 6 1 +@findex 2C-merge + When you have edited both buffers as you wish, merge them with +@kbd{@key{F2} 1} or @kbd{C-x 6 1} (@code{2C-merge}). This copies the +text from the right-hand buffer as a second column in the other buffer. +To go back to two-column editing, use @kbd{@key{F2} s}. + +@kindex F2 d +@kindex C-x 6 d +@findex 2C-dissociate + Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers, +leaving each as it stands (@code{2C-dissociate}). If the other buffer, +the one not current when you type @kbd{@key{F2} d}, is empty, +@kbd{@key{F2} d} kills it. -- cgit v1.2.3