Normally, the first character of each continuation line is
positioned at the beginning of the screen line where it is displayed.
The minor mode @code{visual-wrap-prefix-mode} and its global
-(@pxref{Minor Modes}) counterpart
-@code{global-visual-wrap-prefix-mode} arranges that continuation lines
-be prefixed by slightly adjusted versions of the fill prefixes
-(@pxref{Fill Prefix}) of their respective logical lines, so that
-indentation characters or the prefixes of source code comments are
-replicated across every continuation line, and the appearance of such
-comments or indentation is not broken. These prefixes are only shown
-on display, and does not change the buffer text in any way.
+counterpart (@pxref{Minor Modes}) @code{global-visual-wrap-prefix-mode}
+arranges for continuation lines to be indented on display using a fill
+prefix (@pxref{Fill Prefix}) automatically computed from each line's
+surrounding context. These prefixes are display-only feature, and do
+not change the buffer text in any way.
Sometimes, you may need to edit files containing many long logical
lines, and it may not be practical to break them all up by adding
non-@code{nil} value means that all buffers should be saved without
asking. The default is @code{ask}.
+@vindex grep-use-headings
+@vindex grep-heading@r{ face}
+ By default, grep matches are shown with the file names prefixed to
+each line. But if the variable @code{grep-use-headings} is customized
+to a non-@code{nil} value, the matches are split into sections, one
+section for each file with matches, and the file names are shown in the
+section headings using a special face @code{grep-heading}.
+
@findex grep-find
@findex find-grep
The command @kbd{M-x grep-find} (also available as @kbd{M-x
from interaction with GDB. Use the command @w{@kbd{M-x
gdb-display-io-buffer}} to show a window with a buffer to which Emacs
redirects the input and output from the program you are debugging.
+However, if the variable @code{gdb-display-io-buffer} is @code{nil},
+Emacs will not create nor display a separate I/O buffer, but will
+instead redirect the program's interaction to the GUD interaction
+buffer.
@findex gdb-display-registers-buffer
@item Registers Buffer
command handles file marking. The default is to mark all new copies
of files with a @samp{C} mark.
-@item D
@findex dired-do-delete
@kindex D @r{(Dired)}
+@item D
Delete the specified files (@code{dired-do-delete}). This is like the
shell command @code{rm}.
@emph{marked} files, or the next @var{n} files. By contrast, @kbd{x}
(@code{dired-do-flagged-delete}) deletes all @dfn{flagged} files.
+@findex dired-do-open
+@kindex E @r{(Dired)}
+@item E
+``Open'' the specified files using an external program. The program is
+selected according to the system conventions, as determined by the
+variable @code{shell-command-guess-open}.
+
@findex dired-do-rename
@kindex R @r{(Dired)}
@cindex renaming files (in Dired)
manipulate and apply parts of patches:
@table @kbd
-@item M-n
@findex diff-hunk-next
+@item M-n
Move to the next hunk-start (@code{diff-hunk-next}). With prefix
argument @var{n}, move forward to the @var{n}th next hunk.
only refines the hunk you move to with this command or with
@code{diff-hunk-prev}.
-@item M-p
@findex diff-hunk-prev
+@item M-p
Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix
argument @var{n}, move back to the @var{n}th previous hunk. Like
@kbd{M-n}, this command refines the hunk you move to if you set
@code{diff-refine} to the symbol @code{navigation}.
-@item M-@}
@findex diff-file-next
+@item M-@}
Move to the next file-start, in a multi-file patch
(@code{diff-file-next}). With prefix argument @var{n}, move forward
to the start of the @var{n}th next file.
-@item M-@{
@findex diff-file-prev
+@item M-@{
Move to the previous file-start, in a multi-file patch
(@code{diff-file-prev}). With prefix argument @var{n}, move back to
the start of the @var{n}th previous file.
-@item M-k
@findex diff-hunk-kill
+@item M-k
Kill the hunk at point (@code{diff-hunk-kill}).
-@item M-K
@findex diff-file-kill
+@item M-K
In a multi-file patch, kill the current file part.
(@code{diff-file-kill}).
-@item C-c C-a
@findex diff-apply-hunk
@cindex patches, applying
+@item C-c C-a
Apply this hunk to its target file (@code{diff-apply-hunk}). With a
prefix argument of @kbd{C-u}, revert this hunk, i.e.@: apply the
reverse of the hunk, which changes the ``new'' version into the ``old''
version. If @code{diff-jump-to-old-file} is non-@code{nil}, apply the
hunk to the ``old'' version of the file instead.
-@item C-c C-b
+@findex diff-apply-buffer
+@item C-c @key{RET} a
+Apply all the hunks in the buffer (@code{diff-apply-buffer}). If the
+diffs were applied successfully, save the changed buffers.
+
@findex diff-refine-hunk
+@item C-c C-b
Highlight the changes of the hunk at point with a finer granularity
(@code{diff-refine-hunk}). This allows you to see exactly which parts
of each changed line were actually changed.
find this command useful if you customize @code{diff-refine} to a
non-default value.
-@item C-c C-c
@findex diff-goto-source
@vindex diff-jump-to-old-file
+@item C-c C-c
Go to the source file and line corresponding to this hunk
(@code{diff-goto-source}). By default, this jumps to the ``new''
version of the file, the one shown first on the file header.
to the ``old'' revision of the file (@pxref{Old Revisions}), when
point is on the old line, or otherwise jump to the ``new'' revision.
-@item C-c C-e
@findex diff-ediff-patch
+@item C-c C-e
Start an Ediff session with the patch (@code{diff-ediff-patch}).
@xref{Top, Ediff, Ediff, ediff, The Ediff Manual}.
-@item C-c C-n
@findex diff-restrict-view
+@item C-c C-n
Restrict the view to the current hunk (@code{diff-restrict-view}).
@xref{Narrowing}. With a prefix argument, restrict the
view to the current file of a multiple-file patch. To widen again,
use @kbd{C-x n w} (@code{widen}).
-@item C-c C-r
@findex diff-reverse-direction
+@item C-c C-r
Reverse the direction of comparison for the entire buffer
(@code{diff-reverse-direction}). With a prefix argument, reverse the
direction only inside the current region (@pxref{Mark}). Reversing
produce a patch that would change the ``new'' version into the ``old''
one.
-@item C-c C-s
@findex diff-split-hunk
+@item C-c C-s
Split the hunk at point (@code{diff-split-hunk}) into two separate
hunks. This inserts a hunk header and modifies the header of the
current hunk. This command is useful for manually editing patches,
@command{diff}, first convert the buffer to the unified diff format
with @kbd{C-c C-u}.
-@item C-c C-d
@findex diff-unified->context
+@item C-c C-d
Convert the entire buffer to the @dfn{context diff format}
(@code{diff-unified->context}). With a prefix argument, convert only
the hunks within the region.
-@item C-c C-u
@findex diff-context->unified
+@item C-c C-u
Convert the entire buffer to unified diff format
(@code{diff-context->unified}). With a prefix argument, convert
unified format to context format. When the mark is active, convert
only the hunks within the region.
-@item C-c C-l
@findex diff-refresh-hunk
+@item C-c C-l
Re-generate the current hunk (@code{diff-refresh-hunk}).
-@item C-c C-w
@vindex diff-ignore-whitespace-switches
@findex diff-ignore-whitespace-hunk
+@item C-c C-w
Re-generate the current hunk, disregarding changes in whitespace.
With a non-@code{nil} prefix arg, re-generate all the hunks
(@code{diff-ignore-whitespace-hunk}). This calls @code{diff-command}
with @code{diff-ignore-whitespace-switches}, which defaults to
@samp{-b}, meaning ignore changes in whitespace only.
-@item C-x 4 A
@findex diff-add-change-log-entries-other-window
@findex add-change-log-entry-other-window@r{, in Diff mode}
+@item C-x 4 A
Generate a ChangeLog entry, like @kbd{C-x 4 a} does (@pxref{Change
Log}), for each one of the hunks
(@code{diff-add-change-log-entries-other-window}). This creates a
non-@code{nil} value, identical subsequent kills yield a single
kill-ring entry, without duplication.
+@findex kill-ring-deindent-mode
+ If you enable the minor mode @code{kill-ring-deindent-mode}, text
+saved to the kill-ring will have its indentation decreased by the amount
+of indentation of the first saved line. That is, if the first line of
+the saved text was indented @var{n} columns, this mode will remove that
+number of columns from the indentation of each saved line.
+
@node Yanking
@section Yanking
@cindex moving text
@item C-x p &
Run shell command asynchronously in the current project's root
directory (@code{project-async-shell-command}).
+@item C-x p o
+Run the next command in the current project
+(@code{project-any-command}).
@end table
Emacs provides commands for handling project files conveniently.
The command @kbd{C-x p &} (@code{project-async-shell-command}) runs
@code{async-shell-command} in the current project's root directory.
+@findex project-any-command
+ Finally, the command @kbd{C-x p o} (@code{project-any-command}) will
+run the next command you type, whether related to files or not, in the
+current project.
+
@node Project Buffer Commands
@subsection Project Commands That Operate on Buffers
@item C-x p k
Kill all live buffers that belong to the current project
(@code{project-kill-buffers}).
+@item C-x p o
+Run the next command in the current project
+(@code{project-any-command}).
@end table
@findex project-switch-to-buffer
@code{project-kill-buffers-display-buffer-list} is non-@code{nil}, the
buffers to be killed will be displayed first.
+ Finally, the command @kbd{C-x p o} (@code{project-any-command}) will
+run the next command you type, whether related to buffers or not, in the
+current project.
+
@node Switching Projects
@subsection Switching Projects
Hide everything except for the heading or body that point is in, plus
the headings leading up from there to the top level of the outline
(@code{outline-hide-other}).
+@item C-c / h @var{regexp} @key{RET}
+Hide bodies of headings that match @var{regexp}
+(@code{outline-hide-by-heading-regexp}).
+@item C-c / s @var{regexp} @key{RET}
+Show bodies of headings that match @var{regexp}
+(@code{outline-show-by-heading-regexp}).
@end table
@findex outline-hide-entry
level headings. It also reveals body lines preceding the first
heading in the buffer.
+@findex outline-hide-by-heading-regexp
+@findex outline-show-by-heading-regexp
+@kindex C-c / h @r{(Outline mode)}
+@kindex C-c / s @r{(Outline mode)}
+ The command @kbd{C-c / h} (@code{outline-hide-by-heading-regexp})
+prompts for a regular expression, and hides all the body lines of
+headings which match the regular expression. The command @kbd{C-c / s}
+likewise prompts for a regular expression, and reveals the bodies of
+matching headings.
+
@findex outline-hide-body
@findex outline-show-all
@kindex C-c C-t @r{(Outline mode)}