* doc/lispref/files.texi (Truenames): Explain handling of
targets of `file-truename' and `make-symbolic-link', which
look like a remote file name.
* etc/NEWS: Precise examples for symlinks which look like
remote file names. MUSTBENEW of `write-region' is not
propagated to file name handlers.
I don't find this information to accurately reflect possible use cases
for Eshell; plus, it doesn't offer much in the way of information,
just opinion.
* doc/misc/tramp.texi (Traces and Profiles): Mention the
backtrace when tramp-verbose is greater than or equal to 10.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-add-name-to-file'.
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
`tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.
* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_CONNECTION_DISCONNECTED" and
"NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
(tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
(tramp-smb-do-file-attributes-with-stat): Return non-nil only
if one of the attributes is non-nil.
(tramp-smb-handle-file-local-copy): Use `file-truename'.
(tramp-smb-handle-file-truename): Move to tramp.el.
(tramp-smb-handle-insert-directory): Show symlinks.
(tramp-smb-handle-make-symbolic-link): Improve.
(tramp-smb-read-file-entry): Handle extended file modes in Samba.
* lisp/net/tramp.el (tramp-handle-add-name-to-file)
(tramp-handle-file-truename): New defuns.
* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp--test-check-files): Make check for "smb".
* lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or
corresponding command-line argument, into quote- or space-separated
tokens. If a token starts with a quote, then it naturally is expected
to end with a quote; escaping is not supported. This is enough to cope
with the typical case of requiring the initial path to be quoted,
common on Windows where it may contain spaces.
* etc/NEWS: Document.
* doc/emacs/misc.texi: Likewise.
* doc/man/emacsclient.1: Tweak to remove the implication that only an
editor can be specified (the manual already mentions a “command”).
Fix a small error where “EDITOR” is referred to rather than
“ALTERNATE_EDITOR”.
* test/lib-src/emacsclient-tests.el: Add tests.
* doc/emacs/cmdargs.texi (Initial Options): Document the
'--module-assertions' command-line option.
* doc/lispref/loading.texi (Dynamic Modules): Add a
cross-reference to the description of '--module-assertions'.
* etc/NEWS: Update the NEWS entry for --module-assertions.
This lets Emacs deal with arbitrary local symlinks without
mishandling their contents (Bug#28156). For example,
(progn (shell-command "ln -fs '~' 'x'") (rename-file "x" "/tmp/x"))
now consistently creates a symbolic link from '/tmp/x' to '~'.
Formerly, it did that only if the working directory was on the
same filesystem as /tmp; otherwise, it expanded the '~' to
the user's home directory.
* lisp/dired.el (dired-get-filename): Use files--name-absolute-system-p
instead of rolling our own code.
* lisp/files.el (files--name-absolute-system-p): New function.
(file-truename, file-chase-links): Use it to avoid mishandling
symlink contents that begin with ~.
(copy-directory, move-file-to-trash):
Use concat rather than expand-file-name, to avoid mishandling
symlink contents that begin with ~.
* src/fileio.c (Fmake_symbolic_link): Do not expand leading "~" in the
target unless interactive. Strip leading "/:" if interactive.
(emacs_readlinkat): Do not prepend "/:" to the link target if
it starts with "/" and contains ":" before NUL.
* test/src/fileio-tests.el (try-link): Rename from try-char,
and accept a string instead of a char. All uses changed.
(fileio-tests--symlink-failure): Also test leading ~, and "/:",
to test the new behavior.
* doc/lispref/files.texi (Relative File Names, Directory Names)
(File Name Expansion):
* doc/lispref/minibuf.texi (Reading File Names):
Document expand-file-name behavior with ~ more clearly
and accurately.
* doc/misc/org.texi (Batch execution): Simplify example
script so that it does not need expand-file-name and thus
will not mishandle file names with leading ~.
* doc/lispref/files.texi (File Attributes):
Document file-attributes atomicity.
* etc/NEWS: Document the fix.
* src/dired.c (file_attributes): New args DIRNAME and FILENAME,
for diagnostics. All callers changed. On platforms like
GNU/Linux that support O_PATH, fix a race condition in
file-attributes and similar functions, so that these functions do
not return nonsense if a directory entry is replaced while getting
its attributes. On non-GNU platforms, do a better (though not
perfect) job of detecting the race, and return nil if detected.
* doc/misc/gnus.texi (Non-ASCII Group Names):
* etc/NEWS:
* test/lisp/net/tramp-tests.el (tramp--test-utf8):
Use utf-8-unix, not utf-8, for default-file-name-coding-system, so
that CRLF in file names is left alone.
* lisp/international/mule-cmds.el (set-default-coding-systems):
Do not alter CRLF in file name coding systems.
(prefer-coding-system): Ignore differences in CRLF processing when
checking whether we used the user-specified file name coding system.
* test/src/fileio-tests.el: New file.
* doc/lispref/windows.texi (Preserving Window Sizes)
(Window Parameters): Use the term `window-preserved-size'
instead of `preserved-size' (Bug#27999).
* lisp/window.el (display-buffer-in-side-window): Fix doc-string
typo.
(delete-other-windows): Rename the `no-delete-other-window'
parameter to `no-delete-other-windows' (see the discussion in
Bug#27999 for the rationale of this change).
* doc/lispref/windows.texi (Deleting Windows)
(Frame Layouts with Side Windows, Window Parameters): Rename
`no-delete-other-window' to `no-delete-other-windows'.
* doc/lispref/files.texi (Saving Buffers): Document how functions
like rename-file work with symlinks and directories. This patch
attempts to document the current behavior better, in preparation
for possibly changing it. See Bug#27986.
* lisp/files.el (make-temp-file): Fix initial TEXT parameter.
(files--make-magic-temp-file): Support optional TEXT parameter.
* etc/NEWS: Document it.
* doc/lispref/files.texi: Document it.
* test/lisp/auth-source-tests.el: Minor reformat.
* doc/lispref/variables.texi (Lexical Binding): The future is here.
* doc/emacs/files.texi (Copying and Naming): Use @w{..} around
constructs that could be split between lines, but shouldn't.
* doc/emacs/files.texi (Copying and Naming):
New section, split off from Misc File Ops and containing the
operations that copy, name or rename files. This fixes some
confusion caused by the incorrect phrase "The same rule applies
to all the remaining commands in this section" in the old manual.
This change does not affect the confusion about directories (see
Bug#27986 for ongoing discussion).
* doc/lispref/functions.texi (Function Names):
* doc/lispref/variables.texi (Tips for Defining):
Document naming conventions for internal-use functions and vars.
See Bug#28023#59.
* lisp/faces.el: Define the face.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
* lisp/info.el (Info-fontify-node): Use the new face.
* doc/emacs/display.texi (Standard Faces):
* etc/NEWS: Document the new face. (Bug#28033)
* doc/lispref/files.texi (Unique File Names):
* src/fileio.c (Fmake_temp_name): Document that make-temp-name
does not guarantee uniqueness on magic file names.
Bug#25354
* lisp/progmodes/compile.el (compilation-num-errors-found): Provide
default value.
(compilation-num-warnings-found, compilation-num-infos-found): New
defvars.
(compilation-mode-line-errors): New defconst.
(compilation-face): Remove.
(compilation-type, compilation--note-type): New functions.
(compilation-parse-errors): Call compilation--note-type.
(compilation-start): Include compilation-mode-line-errors in
mode-line-process.
(compilation-setup): Initialize compilation-num-* variables to 0.
(compilation-handle-exit): Include compilation-mode-line-errors in
mode-line-process.
* doc/emacs/building.texi (Compilation): Document new feature.
* lisp/simple.el (async-shell-command-display-buffer): Add
defcustom.
(shell-command): Use the new defcustom to determine whether to show
the buffer immediately, or add a process filter that shows it only
when there is some output.
* etc/NEWS: Document the new variable.
* doc/emacs/misc.texi: Likewise.
Thanks to Juri Linkov and Eli Zaretskii for advice and guidance.
* lisp/dired.el (dired-delete-file): Accept 2 additional answers:
'all', to delete all directories recursively and no prompt anymore.
'quit', to cancel directory deletions (Bug#27940).
Show help message when user inputs 'help'.
(dired-do-flagged-delete): Bind locally dired-recursive-deletes
so that we can overwrite its global value.
Wrapp the loop within a catch '--delete-cancel to catch when
the user abort the directtry deletion.
* doc/emacs/dired.texi (Dired Deletion): Update manual.
* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.1):
Announce this change.
Allow Dired to handle calls like
\(dired \"~/foo/*/*.el\"), that is, with wildcards within
the directory part of the file argument (Bug#27631).
* lisp/files.el (insert-directory-wildcard-in-dir-p): New predicate.
(insert-directory-clean): New defun extracted from insert-directory.
(insert-directory)
* lisp/dired.el (dired-internal-noselect)
(dired-insert-directory): Use the new predicate; when it's true,
handle the directory wildcards with a shell call.
* lisp/eshell/em-ls.el (eshell-ls-use-in-dired): Add/remove both advices.
(eshell-ls-unload-hook): New defun. Use it in
eshell-ls-unload-hook instead of an anonymous function.
(eshell-ls--dired)
* lisp/ls-lisp.el (ls-lisp--dired):
Advice dired to handle wildcards in the directory part with both
eshell-ls and ls-lisp.
* etc/NEWS: Announce it.
* doc/emacs/dired.texi (Dired Enter): Update manual.
* test/lisp/dired-tests.el (dired-test-bug27631): Add test.
* doc/emacs/search.texi (Other Repeating Search):
* lisp/replace.el (occur): Make the documentation of 'occur' be
more accurate when matches overlap. (Bug#27818)
* lisp/apropos.el (apropos-local-variable, apropos-local-value):
New functions. (Bug#27424)
* doc/emacs/help.texi (Apropos): Document 'apropos-local-variable'
and 'apropos-local-value'.
* etc/NEWS: Mention the new commands.
* lisp/cus-start.el: Use the new display-line-numbers group.
* lisp/display-line-numbers.el: New file.
* doc/emacs/custom.texi (Init Rebinding): Re-add entry that used to
belong to linum-mode.
* doc/emacs/modes.texi (Minor Modes): Summarize the mode.
* etc/NEWS: Document display-line-numbers-mode and its customization
variables, and mention that display-line-numbers-width is
buffer-local.
* src/xdisp.c (syms_of_xdisp) <display-line-numbers-width>: Fix a
typo.
* doc/emacs/search.texi (Word Search):
Include the key binding for eww-search-words in the manual.
Fix the spelling of the 'eww-search-words' command.
Copyright-paperwork-exempt: yes