ae7f65f3f9 Fix obsolete documentation of desktop library
fd5f817882 Improve Tramp's initial warnings
1e865a2f28 Explain, how to suppress Tramp warnings
a096207474 printed manuals: xrefs in and out of "Preparing Patches"
3f9ac99fc7 Fix Tramp's file-attributes cache
* lisp/net/tramp-sh.el (tramp-readlink-file-truename): New defconst.
(tramp-bundle-read-file-names): Use new %m and %q format specifiers.
(tramp-sh-handle-file-truename): Use `tramp-readlink-file-truename'.
(tramp-bundle-read-file-names, tramp-get-remote-readlink): Simplify.
(tramp-expand-script): Add format specifiers %m and %q for test
commands. Addapt readlink call.
Reported by Stacey Marshall <stacey.marshall@gmail.com>.
* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p):
Check also for sticky bit.
(tramp-adb-handle-file-readable-p): Simplify.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p):
Check also for sticky bit. Force `file-attributes' check.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for sticky bit.
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-writable-p): Simplify.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p):
Check also for sticky bit.
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p): Simplify.
* lisp/net/tramp.el (tramp-use-file-attributes): Fix docstring.
(tramp-handle-file-readable-p, tramp-handle-file-writable-p):
Force `file-attributes' check. Use `file-truename' for symbolic links.
(tramp-check-cached-permissions): New optional argument FORCE.
Fix symlink check. Check also for sticky bit. (Bug#77402)
* test/lisp/net/tramp-tests.el
(tramp-test20-file-modes-without-file-attributes)
(tramp-test21-file-links-without-file-attributes): New tests.
* doc/misc/tramp.texi: Use @dots{} where appropriate.
(External methods): Precise remark on rsync speed.
(Customizing Methods): Add incus-tramp.
(Password handling): Mention expiration of cached passwords when a
session timeout happens.
(Predefined connection information): Mention also "androidsu" as
special case of "tmpdir".
(Ad-hoc multi-hops, Frequently Asked Questions):
Improve description how ad-hoc multi-hop file names can be made
persistent. (Bug#65039, Bug#76457)
(Remote processes): Signals are not delivered to remote direct
async processes. Say, that there are restrictions for transfer of
binary data to remote direct async processes.
(Bug Reports): Explain bisecting.
(Frequently Asked Questions): Improve index. Speak about
fingerprint readers. Recommend `small-temporary-file-directory'
for ssh sockets.
(External packages): Rename subsection "Timers, process filters,
process sentinels, redisplay".
(Extension packages): New node.
(Top, Files directories and localnames): Add it to @menu.
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
(tramp-repository-branch, tramp-repository-version):
Remove ;;;###tramp-autoload cookie.
* lisp/net/tramp-adb.el:
* lisp/net/tramp-androidsu.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-container.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-message.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sshfs.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp.el: Use `when-let*', `if-let*' and `and-let*'
consequently. (Bug#73441)
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Move setting of sentinel up.
* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Add ;;;###tramp-autoload cookie.
(tramp-archive-local-file-name): New defun.
* lisp/net/tramp-cache.el (tramp-connection-properties): Add link
to the Tramp manual in the docstring.
(tramp-get-connection-property, tramp-set-connection-property):
Don't raise a debug message for the `tramp-cache-version' key.
(with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Add traces.
(tramp-dump-connection-properties): Don't save connection property
"pw-spec".
* lisp/net/tramp-cmds.el (tramp-repository-branch)
(tramp-repository-version): Declare.
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
(tramp-gvfs-do-copy-or-rename-file): Don't use the truename.
Handle symlinks.
(tramp-gvfs-local-file-name): New defun.
* lisp/net/tramp-message.el (tramp-repository-branch)
(tramp-repository-version): Declare.
(tramp-error-with-buffer, tramp-user-error): Don't redisplay in
`sit-for'. (Bug#73718)
(tramp-warning): Fix `lwarn' call.
* lisp/net/tramp.el (tramp-read-passwd):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command):
Rename connection property "password-vector" to "pw-vector".
* lisp/net/tramp-sh.el (tramp-methods) <pscp, psftp>:
Adapt `tramp-copy-args' argument.
(tramp-get-remote-pipe-buf, tramp-actions-before-shell):
Use `tramp-fingerprint-prompt-regexp'.
(tramp-sh-handle-copy-directory):
Apply `tramp-do-copy-or-rename-file-directly' if possible.
(tramp-do-copy-or-rename-file): Refactor. Handle symlinks.
(Bug#76678)
(tramp-plink-option-exists-p): New defun.
(tramp-ssh-or-plink-options): Rename from
`tramp-ssh-controlmaster-options'. Adapt further plink options.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Adapt calls.
(tramp-sh-handle-make-process): Don't set connection property
"remote-pid", it's unused.
(tramp-sh-handle-process-file): Do proper quoting.
(tramp-vc-file-name-handler): Add `file-directory-p', which is
used in `vc-find-root'. (Bug#74026)
(tramp-maybe-open-connection): Use connection property "hop-vector".
(tramp-get-remote-pipe-buf): Make it more robust.
* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-handle-copy-directory): Don't check existence of
DIRNAME, this is done in `tramp-skeleton-copy-directory' already.
(tramp-smb-handle-copy-file, tramp-smb-handle-rename-file): Refactor.
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
STDERR is not implemented.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Don't use the truename. Handle symlinks.
* lisp/net/tramp.el (tramp-mode): Set to nil on MS-DOS.
(tramp-otp-password-prompt-regexp): Add TACC HPC prompt.
(tramp-wrong-passwd-regexp): Add fingerprint messages.
(tramp-fingerprint-prompt-regexp, tramp-use-fingerprint):
New defcustoms.
(tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-barf-if-file-missing): Accept also symlinks.
(tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.
(tramp-skeleton-process-file): Raise a warning if STDERR is not
implemented.
(tramp-skeleton-set-file-modes-times-uid-gid): Fix typo.
(tramp-compute-multi-hops): Check for
`tramp-sh-file-name-handler-p', it works only for this.
(tramp-handle-shell-command):
Respect `async-shell-command-display-buffer'.
(tramp-action-password, tramp-process-actions): Use connection
property "hop-vector".
(tramp-action-fingerprint, tramp-action-show-message): New defuns.
(tramp-action-show-and-confirm-message): Start check at (point-min).
(tramp-wait-for-regexp): Don't redisplay in `sit-for'. (Bug#73718)
(tramp-convert-file-attributes): Don't cache
"file-attributes-ID-FORMAT".
(tramp-read-passwd, tramp-clear-passwd): Rewrite. (Bug#74105)
* test/lisp/net/tramp-tests.el (auth-source-cache-expiry)
(ert-batch-backtrace-right-margin): Set them to nil.
(vc-handled-backends): Suppress if noninteractive.
(tramp--test-enabled): Cleanup also
`tramp-compat-temporary-file-directory'.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test18-file-attributes, tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls)
(tramp--test-deftest-without-file-attributes)
(tramp-test21-file-links, tramp-test28-process-file)
(tramp-test32-shell-command, tramp-test36-vc-registered)
(tramp-test39-make-lock-file-name, tramp--test-check-files)
(tramp-test42-utf8, tramp-test43-file-system-info)
(tramp-test44-file-user-group-ids, tramp-test47-read-password):
Adapt tests.
(tramp-test47-read-fingerprint): New test.
This replaces open coded versions of the common idiom
(not (eq (gethash key table 'missing) 'missing))
with
(hash-table-contains-p key table)
in files where we can rely on features in Emacs 31.
* lisp/emacs-lisp/map.el (map-contains-key):
* lisp/external-completion.el (external-completion-table):
* lisp/mh-e/mh-utils.el (mh-sub-folders)
(mh-remove-from-sub-folders-cache):
* lisp/net/ange-ftp.el (ange-ftp-hash-entry-exists-p):
* lisp/password-cache.el (password-in-cache-p, password-cache-add):
* lisp/pcmpl-x.el (pcmpl-x-tlmgr-action-options):
* lisp/xdg.el (xdg-mime-apps): Use 'hash-table-contains-p'.
* doc/emacs/dired.texi (Dired Visiting):
* doc/emacs/files.texi (Reverting):
* doc/misc/tramp.texi (Ad-hoc multi-hops):
* etc/NEWS:
* lisp/net/tramp-cmds.el (tramp-revert-buffer-with-sudo)
(tramp-dired-find-file-with-sudo): Touch up documentation of
these features. Add FIXMEs about renaming the two commands.
* lisp/bookmark.el (bookmark-default-file):
* lisp/net/nsm.el (nsm-settings-file):
* lisp/progmodes/project.el (project-list-file):
* lisp/saveplace.el (save-place-file): Rename files to have the file
suffix ".eld". This change is backwards-compatible.
* lisp/net/sieve.el (sieve-manage-mode-map): Bind
`sieve-refersh-scriptlist' to 'g' to refresh buffer.
(sieve-refresh-scriptlist): Highlight in docstring that the function
updates the current sieve buffer. (Bug#75956)
* doc/misc/sieve.texi (Managing Sieve): Document new keybinding and the
existing `sieve-refresh-scriptlist` function.
* lisp/net/rcirc.el (rcirc-buffer-process): Look at BUFFER's
'rcirc-server-buffer's 'rcirc-process' instead. Signal an error if it
has none. (Bug#60191)
* lisp/net/webjump.el (webjump-sample-sites): Don't recommend some
defunct or otherwise non-privacy respecting websites. Prefer HTTPS to
HTTP.
(webjump-to-iwin, webjump-state-to-postal-alist): Make obsolete, as this
functionality seems to no longer work due to broken links.