* etc/NEWS: Mark entries and improve wording.
* doc/emacs/dired.texi (Operating on Files): Document
'dired-do-open'. Fix indexing.
* doc/emacs/files.texi (Diff Mode): Document 'diff-apply-buffer'.
Fix indexing.
* doc/emacs/maintaining.texi (Project File Commands)
(Project Buffer Commands): Document 'project-any-command'.
* doc/emacs/building.texi (Other GDB Buffers): Document the user
option 'gdb-display-io-buffer'.
(Grep Searching): Document 'grep-use-headings'.
* doc/emacs/text.texi (Outline Visibility): Document Outline
commands that hide/show by heading regexp.
* doc/emacs/killing.texi (Kill Options): Document
'kill-ring-deindent-mode'.
* doc/emacs/basic.texi (Continuation Lines): Improve wording.
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)}
(This minor mode is the 'adaptive-wrap' ELPA package renamed and
lightly edited for inclusion in Emacs.)
----
++++
** New global minor mode 'kill-ring-deindent-mode'.
When enabled, text being saved to the kill ring will be de-indented by
the column number at its start. For example, saving the entire
-function call within:
+function call within an indented block:
foo ()
{
argument_3_compute ());
}
-will save:
+will save this to the kill ring:
long_function_with_several_arguments (argument_1_compute (),
argument_2_compute (),
argument_3_compute ())
-to the kill ring, omitting the two columns of extra indentation that
-would otherwise be present in the second and third lines of the
-function call.
+This omits the two columns of extra indentation that would otherwise be
+copied from the second and third lines and saved to the kill ring.
+---
** New command 'replace-regexp-as-diff'.
It reads a regexp to search for and a string to replace with, then
displays a buffer with replacements as diffs. After reviewing the
will be put in front the buffer position corresponding to that glyph.
By default this is disabled.
+---
** New pre-defined values for 'electric-quote-chars'.
The available customization options for 'electric-quote-chars' have been
updated with common pairs of quotation characters, including "‘", "’",
The default is unchanged.
+++
-** 'M-TAB' now invokes 'completion-at-point' also in Text mode.
+** 'M-TAB' now invokes 'completion-at-point' in Text mode.
By default, Text mode no longer binds 'M-TAB' to 'ispell-complete-word'.
Instead, this mode arranges for 'completion-at-point', globally bound to
'M-TAB', to perform word completion as well. You can have Text mode
*** New input method "english-colemak".
This input method supports the Colemak keyboard layout.
+---
*** Additional 'C-x 8' key translations for "æ" and "Æ".
These characters can now be input with 'C-x 8 a e' and 'C-x 8 A E',
respectively, in addition to the existing translations 'C-x 8 / e' and
'C-x 8 / E'.
+---
*** New 'C-x 8' key translations for "low" quotes "„", and "‚".
These can now be entered with 'C-x , "' and 'C-x , ''.
+---
*** New German language 'C-x 8' key translations for quotation marks.
The characters "„", "“", and "”" can now be entered with 'C-x 8 v',
'C-x 8 b' and 'C-x 8 n'. The single versions "‚", "‘", and "’" can now
are used for the official German quoting style. Using them requires
activating German language support via 'iso-transl-set-language'.
+---
*** "latin-prefix" and "latin-postfix" quotation marks additions.
These input methods can now produce single, double and "low" left and
right quotation marks:
by using "[", "]", and "," for "left", "right", and "low" respectively
to modify "'" and """.
+---
*** "latin-prefix" and "latin-postfix" guillemets support.
These input methods can now produce single guillemets "‹" and "›". For
"latin-prefix" use "~~<" and "~~>", for "latin-postfix" use "<~" and
">~". Double guillemets ("«" and "»") were already supported.
+---
*** New French language 'C-x 8' key translations for "‹" and "›".
These characters can now be entered using 'C-x 8 ~ <' and 'C-x 8 ~ >'
respectively, after activating French language support via
'iso-transl-set-language'. Double guillemets were already supported via
'C-x 8 <' and 'C-x 8 >'
+---
*** Additional 'C-x 8' key translation for Euro "€" currency symbol.
This can now be entered using 'C-x 8 E' in addition to the existing
'C-x 8 * E' translation.
** Outline mode
++++
*** New commands to show/hide outlines by regexp.
-'/ h' ('outline-hide-by-heading-regexp') asks for a regexp and then
+'C-c / h' ('outline-hide-by-heading-regexp') asks for a regexp and then
hides the body lines of all outlines whose heading lines match the
-regexp. '/ s' ('outline-show-by-heading-regexp') does the same but
-shows the matched outlines.
+regexp. 'C-c / s' ('outline-show-by-heading-regexp') does the inverse:
+it shows the bodies of outlines that matched a regexp.
+++
*** 'outline-minor-mode' is supported in tree-sitter major modes.
Emacs-included manuals are set. Further associations can be added for
arbitrary Info manuals.
+---
*** Emacs can now display Info manuals compressed with 'lzip'.
This requires the 'lzip' program to be installed on your system.
(setopt gdb-locals-table-row-config
`((type . 0) (name . 0) (value . ,gdb-locals-value-limit)))
----
++++
*** New user option 'gdb-display-io-buffer'.
If this is nil, 'M-x gdb' will neither create nor display a separate
buffer for the I/O of the program being debugged, but will instead
** Grep
++++
*** New user option 'grep-use-headings'.
When non-nil, the output of Grep is split into sections, one for each
file, instead of having file names prefixed to each line. It is
equivalent to the "--heading" option of some tools such as 'git grep'
and 'rg'. The headings are displayed using the new 'grep-heading' face.
+The default is nil.
** Compilation mode
occasionally be surprising. It can be re-enabled by adding 'omake' to
'compilation-error-regexp-alist'.
+---
*** Lua errors and stack traces are now recognized.
Compilation mode now recognizes Lua language errors and stack traces.
Every Lua error is recognized as a compilation error, and every Lua
line. Clicking 'mouse-1' on the project name pops up the project
menu. The default value is nil.
+---
*** New user option 'project-file-history-behavior'.
Customizing it to 'relativize' makes commands like 'project-find-file'
and 'project-find-dir' display previous history entries relative to
the current project.
+--
*** New user option 'project-key-prompt-style'.
The look of the key prompt in the project switcher has been changed
slightly. To get the previous one, set this option to 'brackets'.
+---
*** 'project-try-vc' tries harder to find the responsible VCS.
When 'project-vc-extra-root-markers' is non-nil, and causes a
-subdirectory project to be detected which is not a VCS root, we now
-additionally traverse the parent directories until a VCS root is found
+subdirectory project to be detected which is not a VCS root, Project now
+additionally traverses the parent directories until a VCS root is found
(if any), so that the ignore rules for that repository are used, and
the file listing's performance is still optimized.
++++
*** New commands 'project-any-command' and 'project-prefix-or-any-command'.
The former is now bound to 'C-x p o' by default.
The latter is designed primarily for use as a value of
*** Obsolete command 'vc-switch-backend' re-added as 'vc-change-backend'.
The command was previously obsoleted and unbound in Emacs 28.
+---
*** Support for viewing VC change history across renames.
-When a fileset's VC change history ('C-x v l') ends at a rename, we
-now print the old name(s) and a button which jumps to their history.
-Git and Hg are supported. Naturally, 'vc-git-print-log-follow' should
-be nil for this to work (or '--follow' should not be in
-'vc-hg-print-log-switches', in Hg's case). Unlike when the '--follow'
-switch is used, commands to see the diff of the old revision ('d'),
-check out an old file version ('f') or annotate it right away ('a'),
-also work on revisions which precede renames.
+When a fileset's VC change history ends at a rename, ('C-x v l') now
+prints the old name(s) and shows a button which jumps to the history of
+the files under the old names. This feature is supported for Git and
+Hg. Naturally, 'vc-git-print-log-follow' should be nil for this to work
+(or '--follow' should not be in 'vc-hg-print-log-switches', in Hg's
+case). Unlike when the '--follow' switch is used, commands to see the
+diff of the old revision ('d'), to check out an old file version ('f')
+or to annotate it ('a'), also work on revisions which precede renames.
---
*** 'vc-annotate' now abbreviates the Git revision in the buffer name.
revision identifier in its buffer name. To restore the previous
behavior, set 'vc-annotate-use-short-revision' to nil.
+---
*** New option 'vc-git-file-name-changes-switches'.
It allows tweaking the thresholds for rename and copy detection.
regenerating hunks with 'diff-ignore-whitespace-hunk'. Defaults to
the previously hard-coded "-b".
++++
*** New command 'diff-apply-buffer' bound to 'C-c RET a'.
It applies the diff in the entire diff buffer and
saves all modified file buffers.
(e.g., if every line is visible, invoking 'dired-next-line' at
the last line will move to the first line). The default is nil.
+---
*** New user option 'dired-filename-display-length'.
It is an integer representing the maximum display length of filenames.
The middle part of a filename whose length exceeds the restriction is
means using the right edge of window as the display restriction. The
default is nil.
+---
*** New user option 'shell-command-guess-functions'.
It defines how to populate a list of commands available
for 'M-!', 'M-&', '!', '&' and the context menu "Open With"
and a universal command such as "open" or "start"
that delegates to the OS.
++++
*** New command 'dired-do-open'.
This command is bound to 'E' (mnemonics "External"). Also it can be
used by clicking "Open" in the context menu; it "opens" the marked or
clicked on files according to the OS conventions. For example, on
systems supporting XDG, this runs 'xdg-open' on the files.
++++
*** New variable 'dired-guess-shell-alist-optional'.
It contains commands for external viewers and players for various media
formats, moved to this list from 'dired-guess-shell-alist-default'.
+---
*** The default value of 'dired-omit-size-limit' was increased.
After performance improvements to omitting in large directories, the new
default value is 300k, up from 100k. This means 'dired-omit-mode' will