Add REGION-NONCONTIGUOUS-P arg to other replace.el commands
[emacs.git] / etc / NEWS
blobd4024016199275e1043f98039f8053a43cc0164b
1 GNU Emacs NEWS -- history of user-visible changes.
3 Copyright (C) 2017-2018 Free Software Foundation, Inc.
4 See the end of the file for license conditions.
6 Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
7 If possible, use M-x report-emacs-bug.
9 This file is about changes in Emacs version 27.
11 See file HISTORY for a list of GNU Emacs versions and release dates.
12 See files NEWS.26, NEWS.25, ..., NEWS.18, and NEWS.1-17 for changes
13 in older Emacs versions.
15 You can narrow news to a specific version by calling 'view-emacs-news'
16 with a prefix argument or by typing C-u C-h C-n.
18 Temporary note:
19 +++ indicates that all necessary documentation updates are complete.
20     (This means all relevant manuals in doc/ AND lisp doc-strings.)
21 --- means no change in the manuals is needed.
22 When you add a new item, use the appropriate mark if you are sure it applies,
25 * Installation Changes in Emacs 27.1
27 ** The new configure option '--with-json' adds support for JSON using
28 the Jansson library.  It is on by default; use 'configure
29 --with-json=no' to build without Jansson support.  The new JSON
30 functions 'json-serialize', 'json-insert', 'json-parse-string', and
31 'json-parse-buffer' are typically much faster than their Lisp
32 counterparts from json.el.
34 ** Emacs has been ported to the -fcheck-pointer-bounds option of GCC.
35 This causes Emacs to check bounds of some arrays addressed by its
36 internal pointers, which can be helpful when debugging the Emacs
37 interpreter or modules that it uses.  If your platform supports it you
38 can enable it when configuring, e.g., './configure CFLAGS="-g3 -O2
39 -mmpx -fcheck-pointer-bounds"' on Intel MPX platforms.
41 ** Emacs now normally uses a C pointer type instead of a C integer
42 type to implement Lisp_Object, which is the fundamental machine word
43 type internal to the Emacs Lisp interpreter.  This change aims to
44 catch typos and support -fcheck-pointer-bounds.  The 'configure'
45 option --enable-check-lisp-object-type is therefore no longer as
46 useful and so is no longer enabled by default in developer builds,
47 to reduce differences between developer and production builds.
50 * Startup Changes in Emacs 27.1
52 +++
53 ** Emacs can now be configured using an early init file.
54 The file is called 'early-init.el', in 'user-emacs-directory'.  It is
55 loaded very early in the startup process: before graphical elements
56 such as the tool bar are initialized, and before the package manager
57 is initialized.  The primary purpose is to allow customizing how the
58 package system is initialized given that initialization now happens
59 before loading the regular init file (see below).
61 +++
62 ** Installed packages are now activated *before* loading the init file.
63 This is part of a change intended to eliminate the behavior of
64 package.el inserting a call to 'package-initialize' into the init
65 file, which was previously done when Emacs was started.  As a result
66 of this change, it is no longer necessary to call 'package-initialize'
67 in your init file.
69 However, if your init file changes the values of 'package-load-list' or
70 'package-user-dir', or sets 'package-enable-at-startup' to nil then it won't
71 work right without some adjustment:
72 - you can move that code to the early init file (see above), so those settings
73   apply before Emacs tries to activate the packages.
74 - you can use the new 'package-quickstart` so activation of packages does not
75   need to pay attention to 'package-load-list' or 'package-user-dir' any more.
78 * Changes in Emacs 27.1
80 ---
81 ** New variable 'xft-ignore-color-fonts'.
82 Default t means don't try to load color fonts when using Xft, as they
83 often cause crashes.  Set it to nil if you really need those fonts.
84 (Bug#30874)
86 ---
87 ** The new option 'tooltip-resize-echo-area' avoids truncating tooltip text
88 on GUI frames when tooltips are displayed in the echo area.  Instead,
89 it resizes the echo area as needed to accommodate the full tool-tip
90 text.
92 ---
93 ** Show modeline tooltips only if the corresponding action applies.
94 Customize the option 'mode-line-default-help-echo' to restore the old
95 behavior where the tooltip text is also shown when the corresponding
96 action does not apply.
98 +++
99 ** New hook 'server-after-make-frame-hook'.
100 This hook is a convenient place to perform initializations in daemon
101 mode which require GUI features to be available.  One example is
102 restoration of the previous session using the desktop.el package: put
103 the call to 'desktop-read' in this hook, if you want the GUI settings
104 to be restored, or if desktop.el needs to interact with you during
105 restoration of the session.
108 ** New function 'logcount' calculates an integer's Hamming weight.
111 ** New function 'libxml-available-p'.
112 This function returns non-nil if libxml support is both compiled in
113 and available at run time.  Lisp programs should use this function to
114 detect built-in libxml support, instead of testing for that
115 indirectly, e.g., by checking that functions like
116 'libxml-parse-html-region' return nil.
119 ** `libxml-parse-xml-region' and `libxml-parse-html' region take
120 a parameter that's called DISCARD-COMMENTS, but it really only
121 discards the top-level comment.  Therefore this parameter is now
122 obsolete, and the new utility function `xml-remove-comments' can be
123 used to remove comments before calling the libxml functions to parse
124 the data.
127 ** New function 'fill-polish-nobreak-p', to be used in 'fill-nobreak-predicate'.
128 It blocks line breaking after a one-letter word, also in the case when
129 this word is preceded by a non-space, but non-alphanumeric character.
132 ** The limit on repetitions in regexps has been raised to 2^16-1.
133 It was previously limited to 2^15-1.  For example, the following
134 regular expression was previously invalid, but is now accepted:
136    x\{32768\}
139 ** The German prefix and postfix input methods now support Capital sharp S.
142 * Editing Changes in Emacs 27.1
145 ** New isearch bindings.
146 'C-M-w' in isearch changed from isearch-del-char to the new function
147 isearch-yank-symbol-or-char. isearch-del-char is now bound to 'C-M-d'.
150 ** New variable 'x-wait-for-event-timeout'.
151 This controls how long Emacs will wait for updates to the graphical
152 state to take effect (making a frame visible, for example).
155 ** New user option 'electric-quote-replace-double'.
156 This option controls whether '"' is replaced in 'electric-quote-mode',
157 in addition to other quote characters.  If non-nil, ASCII double-quote
158 characters that quote text "like this" are replaced by double
159 typographic quotes, “like this”, in text modes, and in comments in
160 non-text modes.
163 ** 'write-abbrev-file' now includes special properties.
164 'write-abbrev-file' now writes special properties like ':case-fixed'
165 for abbrevs that have them.
168 ** The new functions and commands `text-property-search-forward' and
169 `text-property-search-backward' have been added.  These provide an
170 interface that's more like functions like @code{search-forward}.
173 * Changes in Specialized Modes and Packages in Emacs 27.1
175 ** Browse-url
176 *** The function 'browse-url-emacs' can now visit a URL in selected window.
177 It now treats the optional 2nd argument to mean that the URL should be
178 shown in the currently selected window.
180 ** Package
181 *** New 'package-quickstart' feature
182 When 'package-quickstart' is non-nil, package.el precomputes a big autoloads
183 file so that activation of packages can be done much faster, which can speed up
184 your startup significantly.
185 It also causes variables like package-user-dir and package-load-list to be
186 consulted when 'package-quickstart-refresh' is run rather than at startup so
187 you don't need to set them in your early init file.
189 *** New function 'package-activate-all'.
191 ** Ecomplete
192 *** The ecomplete sorting has changed to a decay-based algorithm.
193 This can be controlled by the new `ecomplete-sort-predicate' variable.
195 *** The 'ecompleterc' file is now placed in ~/.emacs.d/ecompleterc by default
196 Of course it will still find it if you have it in ~/.ecompleterc
198 ** Gnus
201 *** A prefix argument to 'gnus-summary-limit-to-score' will limit reverse
202 Limit to articles with score at below.
204 *** The function 'gnus-score-find-favorite-words' has been renamed
205 from 'gnus-score-find-favourite-words'.
208 *** Gmane has been removed as an nnir backend, since Gmane no longer
209 has a search engine.
212 *** Splitting mail on common mailing list headers has been added.  See
213 the concept index in the Gnus manual for the `match-list' entry.
216 *** nil is no longer an allowed value for `mm-text-html-renderer'.
219 *** A new Gnus summary mode command, `S A'
220 (`gnus-summary-attach-article') can be used to attach the current
221 article(s) to a pre-existing Message buffer, or create a new Message
222 buffer with the article(s) attached.
224 ** erc
227 *** `erc-button-google-url' has been renamed `erc-button-search-url'
228 and its value has been changed to Duck Duck Go.
230 ** eww/shr
232 *** When opening external links in eww/shr (typically with the
233 `C-u RET' keystroke on a link), the link will be flashed with the new
234 `shr-selected-link' face to give the user feedback that the command
235 has been executed.
238 ** Htmlfontify
239 *** The functions 'hfy-color', 'hfy-color-vals' and
240 'hfy-fallback-color-values' and the variables 'hfy-fallback-color-map'
241 and 'hfy-rgb-txt-color-map' have been renamed from names that used
242 'colour' instead of 'color'.
244 ** Smtpmail
245 Authentication mechanisms can be added via external packages, by
246 defining new cl-defmethod of smtpmail-try-auth-method.
248 ** Footnote-mode
249 *** Support Hebrew-style footnotes
250 *** Footnote text lines are now aligned.
251 Can be controlled via the new variable 'footnote-align-to-fn-text'.
253 ** CSS mode
256 *** A new command 'css-cycle-color-format' for cycling between color
257 formats (e.g. "black" => "#000000" => "rgb(0, 0, 0)") has been added,
258 bound to 'C-c C-f'.
260 ** SGML mode
263 *** 'sgml-quote' now handles double quotes and apostrophes
264 when escaping text and in addition all numeric entities when
265 unescaping text.
267 ** Dired
270 *** The new user option 'dired-create-destination-dirs' controls whether
271 'dired-do-copy' and 'dired-rename-file' should create non-existent
272 directories in the destination.
274 ** Help
277 *** Output format of 'C-h l' (view-lossage) has changed.
278 For convenience, 'view-lossage' now displays the last keystrokes
279 and commands in the same format as the edit buffer of
280 'edit-last-kbd-macro'.  This makes it possible to copy the lines from
281 the buffer generated by 'view-lossage' to the "*Edit Macro*" buffer
282 created by 'edit-last-kbd-macro', and to save the macro by 'C-c C-c'.
285 *** The list of help commands produced by 'C-h C-h' ('help-for-help')
286 can now be searched via 'C-s'.
288 ** Ibuffer
291 *** New filter ibuffer-filter-by-process; bound to '/E'.
293 ** Search and Replace
295 *** 'search-exit-option' provides new options 'move' and 'shift-move'
296 to extend the search string by yanking text that ends at the new
297 position after moving point in the current buffer.  'shift-move'
298 extends the search string by motion commands while holding down
299 the shift key.
301 ** Edebug
304 *** The runtime behavior of Edebug's instrumentation can be changed
305 using the new variables 'edebug-behavior-alist',
306 'edebug-after-instrumentation-function' and
307 'edebug-new-definition-function'. Edebug's behavior can be changed
308 globally or for individual definitions.
310 ** Enhanced xterm support
312 *** New variable 'xterm-set-window-title' controls whether Emacs sets
313 the XTerm window title.  This feature is experimental and is disabled
314 by default.
316 ** Gamegrid
318 ** grep
320 *** rgrep, lgrep and zrgrep now hide part of the command line
321 that contains a list of ignored directories and files.
322 Clicking on the button with ellipsis unhides it.
323 The abbreviation can be disabled by the new option
324 'grep-find-abbreviate'.  The new command
325 'grep-find-toggle-abbreviation' toggles it interactively.
327 ** ERT
330 *** New variable 'ert-quiet' allows to make ERT output in batch mode
331 less verbose by removing non-essential information.
334 *** Gamegrid now determines its default glyph size based on display
335 dimensions, instead of always using 16 pixels. As a result, Tetris,
336 Snake and Pong are more playable on HiDPI displays.
338 ** Filecache
341 *** Completing filenames in the minibuffer via 'C-TAB' now uses the
342 styles as configured by the variable 'completion-styles'.
344 ** New macros 'thunk-let' and 'thunk-let*'.
345 These macros are analogue to 'let' and 'let*', but create bindings that
346 are evaluated lazily.
348 ** next-error
350 *** New customizable variable next-error-find-buffer-function
351 defines the logic of finding a next-error capable buffer.
352 It has an option to use a single such buffer on selected frame, or
353 by default use the last buffer that navigated to the current buffer.
356 ** nxml-mode
359 *** The default value of 'nxml-sexp-element-flag' is now t.
360 This means that pressing C-M-SPACE now selects the entire tree by
361 default, and not just the opening element.
364 ** Eshell
367 *** Expansion of history event designators is disabled by default.
368 To restore the old behavior, use
370     (add-hook 'eshell-expand-input-functions
371               #'eshell-expand-history-references)
373 *** The function 'shell-uniquify-list' has been renamed from
374 'eshell-uniqify-list'.
376 *** The function eshell/kill is now able to handle signal switches.
377 Previously eshell/kill would fail if provided a kill signal to send to the
378 process.  It now accepts signals specified either by name or by its number.
381 ** Pcomplete
382 *** The function 'pcomplete-uniquify-list' has been renamed from
383 'pcomplete-uniqify-list'.
385 ** Tramp
388 *** New connection method "owncloud", which allows to access OwnCloud
389 or NextCloud hosted files and directories.
392 ** The options.el library has been removed.
393 It was obsolete since Emacs 22.1, replaced by customize.
396 ** Message
399 *** Messages can now be systematically encrypted
400 when the PGP keyring contains a public key for every recipient.  To
401 achieve this, add 'message-sign-encrypt-if-all-keys-available' to
402 'message-send-hook'.
405 *** When replying a message that have addresses on the form
406 '"foo@bar.com" <foo@bar.com>', Message will elide the repeated "name"
407 from the address field in the response.
409 *** The default of `message-forward-as-mime' has changed from t to nil
410 as it has been reported that many recipients can't read forwards that
411 are formatted as MIME digests.
413 * New Modes and Packages in Emacs 27.1
416 ** Emacs can now visit files in archives as if they were directories.
417 This feature uses Tramp and works only on systems which support GVFS,
418 i.e. GNU/Linux, roughly spoken.  See the chapter "(tramp) Archive file
419 names" in the Tramp manual for full documentation of these facilities.
422 * Incompatible Lisp Changes in Emacs 27.1
424 ** The 'repetitions' argument of 'benchmark-run' can now also be a variable.
425 ** The FILENAME argument to 'file-name-base' is now mandatory and no
426 longer defaults to 'buffer-file-name'.
429 ** The function 'eldoc-message' now accepts a single argument.
430 Programs that called it with multiple arguments before should pass
431 them through 'format' first.  Even that is discouraged: for ElDoc
432 support, you should set 'eldoc-documentation-function' instead of
433 calling 'eldoc-message' directly.
435 ** Old-style backquotes now generate an error.  They have been
436 generating warnings for a decade.  To interpret old-style backquotes
437 as new-style, bind the new variable 'force-new-style-backquotes' to t.
439 ** Defining a Common Lisp structure using 'cl-defstruct' or
440 'cl-struct-define' whose name clashes with a builtin type (e.g.,
441 'integer' or 'hash-table') now signals an error.
443 ** When formatting a floating-point number as an octal or hexadecimal
444 integer, Emacs now signals an error if the number is too large for the
445 implementation to format (Bug#30408).
448 ** The Lisp reader now signals an overflow for plain decimal integers
449 that do not end in '.' and are outside Emacs range.  Formerly the Lisp
450 reader silently converted them to floating-point numbers, and signaled
451 overflow only for integers with a radix that are outside machine range.
452 To get the old behavior, set the new, experimental variable
453 read-integer-overflow-as-float to t and please email
454 30408@debbugs.gnu.org if you need that.  (Bug#30408).
457 ** Some functions and variables obsolete since Emacs 22 have been removed:
458 archive-mouse-extract, assoc-ignore-case, assoc-ignore-representation,
459 backward-text-line, blink-cursor, bookmark-exit-hooks,
460 comint-use-prompt-regexp-instead-of-fields, compilation-finish-function,
461 count-text-lines, cperl-vc-header-alist, custom-face-save-command,
462 cvs-display-full-path, cvs-fileinfo->full-path, delete-frame-hook,
463 derived-mode-class, describe-char-after, describe-project,
464 desktop-basefilename, desktop-buffer-handlers,
465 desktop-buffer-misc-functions, desktop-buffer-modes-to-save,
466 desktop-enable, desktop-load-default, dired-omit-files-p,
467 disabled-command-hook, dungeon-mode-map, electric-nroff-mode,
468 electric-nroff-newline, electric-perl-terminator, focus-frame,
469 forward-text-line, generic-define-mswindows-modes, generic-define-unix-modes,
470 generic-font-lock-defaults, goto-address-at-mouse,
471 highlight-changes-colours, ibuffer-elide-long-columns, ibuffer-hooks,
472 ibuffer-mode-hooks, icalendar-convert-diary-to-ical,
473 icalendar-extract-ical-from-buffer, imenu-always-use-completion-buffer-p,
474 ipconfig-program, ipconfig-program-options, isearch-lazy-highlight-cleanup,
475 isearch-lazy-highlight-cleanup, isearch-lazy-highlight-initial-delay,
476 isearch-lazy-highlight-interval, isearch-lazy-highlight-max-at-a-time,
477 iswitchb-use-fonts, latin1-char-displayable-p, mouse-wheel-click-button,
478 mouse-wheel-down-button, mouse-wheel-up-button, new-frame, pascal-outline,
479 process-kill-without-query, recentf-menu-append-commands-p,
480 rmail-pop-password, rmail-pop-password-required, savehist-load,
481 set-default-font, spam-list-of-processors,
482 speedbar-add-ignored-path-regexp, speedbar-buffers-line-path,
483 speedbar-buffers-line-path, speedbar-ignored-path-expressions,
484 speedbar-ignored-path-regexp, speedbar-line-path, speedbar-path-line,
485 timer-set-time-with-usecs, tooltip-gud-display, tooltip-gud-modes,
486 tooltip-gud-toggle-dereference, unfocus-frame, unload-hook-features-list,
487 update-autoloads-from-directories, vc-comment-ring, vc-comment-ring-index,
488 vc-comment-search-forward, vc-comment-search-reverse, vc-comment-to-change-log,
489 vc-diff-switches-list, vc-next-comment, vc-previous-comment, view-todo,
490 x-lost-selection-hooks, x-sent-selection-hooks
493 * Lisp Changes in Emacs 27.1
496 ** New function assoc-delete-all.
498 ** 'print-quoted' now defaults to t, so if you want to see
499 (quote x) instead of 'x you will have to bind it to nil where applicable.
501 ** To avoid confusion caused by "smart quotes", the reader signals an
502 error when reading Lisp symbols which begin with one of the following
503 quotation characters: ‘’‛“”‟〞"'.  A symbol beginning with such a
504 character can be written by escaping the quotation character with a
505 backslash.  For example:
507     (read "‘smart") => (invalid-read-syntax "strange quote" "‘")
508     (read "\\‘smart") == (intern "‘smart")
511 ** Omitting variables after '&optional' and '&rest' is now allowed.
512 For example (defun foo (&optional)) is no longer an error.  This is
513 sometimes convenient when writing macros.  See the ChangeLog entry
514 titled "Allow `&rest' or `&optional' without following variable" for a
515 full listing of which arglists are accepted across versions.
517 ** Internal parsing commands now use syntax-ppss and disregard
518 open-paren-in-column-0-is-defun-start.  This affects mostly things like
519 forward-comment, scan-sexps, and forward-sexp when parsing backward.
520 The new variable 'comment-use-syntax-ppss' can be set to nil to recover the old
521 behavior if needed.
523 ** The `server-name' and `server-socket-dir' variables are set when a
524 socket has been pased to Emacs (Bug#24218).
527 ** The 'file-system-info' function is now available on all platforms.
528 instead of just Microsoft platforms.  This fixes a 'get-free-disk-space'
529 bug on OS X 10.8 and later (Bug#28639).
532 ** New macro combine-change-calls arranges to call the change hooks
533 ('before-change-functions' and 'after-change-functions') just once
534 each around a sequence of lisp forms, given a region.  This is
535 useful when a function makes a possibly large number of repetitive
536 changes and the change hooks are time consuming.
539 ** The function 'get-free-disk-space' returns now a non-nil value for
540 remote systems, which support this check.
543 ** The function 'make-string' accepts an additional optional argument.
544 If the optional third argument is non-nil, 'make-string' will produce
545 a multibyte string even if its second argument is an ASCII character.
547 ** (format "%d" X) no longer mishandles a floating-point number X that
548 does not fit in a machine integer (Bug#30408).
550 ** New JSON parsing and serialization functions 'json-serialize',
551 'json-insert', 'json-parse-string', and 'json-parse-buffer'.  These
552 are implemented in C using the Jansson library.
554 ** Mailcap
557 *** The new function `mailcap-file-name-to-mime-type' has been added.
558 It's a simple convenience function for looking up MIME types based on
559 file name extensions.
561 *** The default way the list of possible external viewers for MIME
562 types is sorted and chosen has changed.  Earlier, the most specific
563 viewer was chosen, even if there was a general override in ~/.mailcap.
564 For instance, if /etc/mailcap has an entry for image/gif, that one
565 will be chosen even if you have an entry for image/* in your
566 ~/.mailcap file.  But with the new method, entries from ~/.mailcap
567 overrides all system and Emacs-provided defaults.  To get the old
568 method back, set `mailcap-prefer-mailcap-viewers' to nil.
571 ** URL
573 *** The file: handler no longer looks for index.html in directories if
574 you ask it for a file:///dir URL.  Since this is a low-level library,
575 such decisions (if they are to be made at all) are left to
576 higher-level functions.
579 ** image-mode
581 *** image-mode started using ImageMagick by default for all images
582 some years back.  It now respects `imagemagick-types-inhibit' as a way
583 to disable that.
587 ** The new function 'read-answer' accepts either long or short answers
588 depending on the new customizable variable 'read-answer-short'.
590 ** The function 'load' now behaves correctly when loading modules.
591 Specifically, it puts the module name into 'load-history', prints
592 loading messages if requested, and protects against recursive loads.
595 ** The function 'read-variable' now uses its own history list.
596 The history of variable names read by 'read-variable' is recorded in
597 the new variable 'custom-variable-history'.
600 * Changes in Emacs 27.1 on Non-Free Operating Systems
603 ** Battery status is now supported in all Cygwin builds.
604 Previously it was supported only in the Cygwin-w32 build.
606 ** Emacs now handles key combinations involving the macOS "command"
607 and "option" modifier keys more correctly.
609 ** The special handling of `frame-title-format' on NS where setting it
610 to `t' would enable the macOS proxy icon has been replaced with a
611 separate variable, `ns-use-proxy-icon'. `frame-title-format' will now
612 work as on other platforms.
615 ----------------------------------------------------------------------
616 This file is part of GNU Emacs.
618 GNU Emacs is free software: you can redistribute it and/or modify
619 it under the terms of the GNU General Public License as published by
620 the Free Software Foundation, either version 3 of the License, or
621 (at your option) any later version.
623 GNU Emacs is distributed in the hope that it will be useful,
624 but WITHOUT ANY WARRANTY; without even the implied warranty of
625 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
626 GNU General Public License for more details.
628 You should have received a copy of the GNU General Public License
629 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
632 Local variables:
633 coding: utf-8
634 mode: outline
635 paragraph-separate: "[  \f]*$"
636 end: