1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

650 commits

Author SHA1 Message Date
Michael Albinus
1b31023dab Finish process error buffer support in tramp-smb.el
* doc/misc/tramp.texi (Remote processes): Provide more details in
"Running remote processes on MS Windows hosts".

* lisp/net/tramp-smb.el (tramp-smb-handle-make-process):
Suppress lock files.

* test/lisp/net/tramp-tests.el (auto-revert-notify-watch-descriptor)
(auto-revert-remote-files, auto-revert-use-notify): Declare.  Set
proper values.
(tramp-test30-make-process): Adapt test.
2025-12-15 15:20:29 +01:00
Michael Albinus
dbdae1b9a2 Implement process error buffer in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-make-process):
Handle error buffer.

* test/lisp/net/tramp-tests.el (tramp-test30-make-process): Adapt test.
2025-12-14 16:55:38 +01:00
Michael Albinus
7089c1fd69 Implement process STDERR file in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-make-process)
(tramp-smb-handle-process-file): Handle STDERR file.
(tramp-smb-call-winexe): Regroup sent commands.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp-test30-make-process): Adapt tests.
2025-12-13 17:58:03 +01:00
Michael Albinus
b1882857ee Rework remote process support for Tramp's "smb" method
* doc/misc/tramp.texi (Remote processes): Rewrite subsection
"Running remote processes on MS Windows hosts".

* etc/NEWS: Mention remote process support for Tramp's "smb" method.
Presentational fixes and improvements.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-smb-handle-make-process', `tramp-smb-handle-shell-command'
and `tramp-handle-start-file-process'.
(tramp-smb-matching-line): New defvar.
(tramp-smb-handle-make-process, tramp-smb-handle-shell-command)
(tramp-smb-shell-prompt): New defuns.
(tramp-smb-handle-process-file): Rewrite.
(tramp-smb-handle-start-file-process): Remove.
(tramp-smb-get-localname, tramp-smb-shell-quote-localname):
New optional argument SHARE.
(tramp-smb-send-command): Remove echoed command string.
(tramp-smb-maybe-open-connection): Initialize variables.
(tramp-smb-wait-for-output): Wait more robust.
(tramp-smb-call-winexe): Check for share.  Goto current directory.
(tramp-smb-connection-local-powershell-variables): New defconst.
Set it as connection local variables.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp-test29-start-file-process, tramp-test30-make-process)
(tramp-test32-shell-command, tramp--test-async-shell-command)
(tramp--test-supports-processes-p): Adapt for "smb" method.
(tramp-test34-explicit-shell-file-name)
(tramp-test45-asynchronous-requests): Skip for "smb" method.
(tramp--test-check-files): Skip shell test for some special
characters in the "smb" case.
(tramp-test52-unload): Disable further tests.
2025-12-06 13:26:52 +01:00
Michael Albinus
6346f5b053 Sync with Tramp 2.8.0.5
* doc/misc/tramp.texi (Remote processes): Improve description
where direct asyn processes won't work.

* lisp/net/tramp-cache.el (with-tramp-saved-connection-properties):
Adapt `tramp-verbose' less aggressive.

* lisp/net/tramp-container.el (tramp-kubernetes--context-namespace):
Use `string-join'.

* lisp/net/tramp-message.el (tramp-get-debug-file-name):
Modify debug file name.
(tramp-debug-message): Simplify.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band):
Add `tramp-keyboard-interactive-authentication-prompt-regexp'.

* lisp/net/tramp.el (tramp-encoding-shell): Fix docstring.
(tramp-keyboard-interactive-authentication-prompt-regexp): New defcustom.
(tramp-action-ignore-message): New defun.

* test/lisp/net/tramp-tests.el (tramp-test10-write-region)
(tramp-test10-write-region-file-precious-flag)
(tramp-test10-write-region-other-file-name-handler)
(tramp-test27-load, tramp-test32-shell-command)
(tramp-test32-shell-command-dont-erase-buffer)
(tramp-test34-connection-local-variables)
(tramp-test36-vc-registered, tramp-test39-make-lock-file-name)
(tramp-test39-detect-external-change)
(tramp-test45-asynchronous-requests): Adapt tests.
2025-11-28 17:38:36 +01:00
Michael Albinus
8c7b4391a5 Adapt `tramp-test49-external-backend-function'
* test/lisp/net/tramp-tests.el (tramp-test49-external-backend-function):
Extend test.
2025-10-29 09:19:58 +01:00
Michael Albinus
c024b9c661 Tramp cleanup
* doc/misc/tramp.texi (Configuration): Extend example.

* lisp/net/tramp.el (tramp-skeleton-write-region):
* lisp/net/tramp-cache.el (tramp-flush-file-upper-properties):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `when-let*'	consequently.

* lisp/net/tramp-cmds.el (tramp-file-name-with-method):
Add :initialize and :set functions.
(tramp-set-file-name-with-method): New defun.
(with-tramp-file-name-with-method): Filter out enabled methods.

* lisp/net/tramp-compat.el: Add TODO.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-cascaded-file-archive): Use "foo.zip".

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case-p):
Extend check.
(tramp-test48-session-timeout): Adapt test.

* test/lisp/net/tramp-archive-resources/foo.zip: Renamed from outer.zip.
2025-10-20 14:42:12 +02:00
Michael Albinus
3536f1aa33 Adapt tramp-tests.el
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Adapt test.
2025-09-25 15:02:50 +02:00
Michael Albinus
d6a7b0cd33 Tramp code cleanup
* lisp/net/tramp.el (tramp-use-absolute-autoload-file-names)
(tramp-skeleton-file-name-all-completions)
(tramp-parse-auth-sources, tramp-parse-file, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `seq-uniq'.

* lisp/net/tramp.el (tramp-register-foreign-file-name-handler):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files):
Use `seq-union'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test17-insert-directory):
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Use `seq-union'.
(tramp-test42-utf8): Use `seq-uniq' and `tramp-compat-seq-keep'.
2025-09-15 18:26:50 +02:00
Mattias Engdegård
c2a20f65d3 ; * test/lisp/net/tramp-tests.el: silence function-quoting warning 2025-09-14 11:31:53 +02:00
Michael Albinus
43f507f430 Minor edits in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test16-file-expand-wildcards)
(tramp-test26-interactive-file-name-completion):
Prefer #'string-lessp over 'string<.
(tramp--test-ange-ftp-p, tramp-test47-read-password)
(tramp-test47-read-otp-password): Use function read syntax.
2025-09-12 12:21:48 +02:00
Michael Albinus
6ad8745833 Extend tramp-test26-interactive-file-name-completion
* lisp/net/tramp.el (tramp-get-completion-methods):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (completions-max-height): Declare.
(tramp-test26-interactive-file-name-completion): Extend test.
2025-09-02 12:09:17 +02:00
Michael Albinus
95232f556e `Fix read-directory-name' for Tramp files
* lisp/minibuffer.el (completion-file-name-table): Improve bypass
for directory checking.  (Bug#79236)

* lisp/net/tramp.el (tramp-user-regexp): Exclude "[" and "]".
(tramp-completion-make-tramp-file-name): Handle port for IPv6 hosts.
(tramp-completion-handle-file-directory-p)
(tramp-completion-handle-file-exists-p): Simplify.
(tramp-completion-handle-file-name-completion): Ignore PREDICATE.
(tramp-completion-dissect-file-name): Handle ports.
(tramp-parse-default-user-host): Suppress '(nil nil) result.
(tramp-parse-file): Delete duplicates.
(tramp-parse-shosts-group): Accept also IPv6 addresses.
(tramp-handle-file-directory-p): Return t for filenames
"/method:foo:".
(tramp-parse-auth-sources, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (edebug-mode): Declare.
(tramp--test-message): Write also trace value.
(tramp-test26-file-name-completion):
(tramp-test26-interactive-file-name-completion): Extend tests.
2025-08-29 13:47:51 +02:00
Michael Albinus
6979bce0b2 Suppress Tramp session timeout if buffer is modified
* doc/misc/tramp.texi (Predefined connection information): A session
timeout is suppressed if there is a modified buffer, or a buffer
under auto-revert.
(Traces and Profiles): Tramp messages are written to the *Messages*
buffer when level is less than or equal to 3.

* lisp/net/tramp-sh.el (tramp-timeout-session): Do not timeout
when buffer is modified, or in auto-revert mode.

* test/lisp/net/tramp-tests.el (tramp-test48-session-timeout):
Extend test.
2025-08-17 11:19:01 +02:00
Michael Albinus
d3cd93dc4d Add set-file-times implementation for Tramp smb method
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Don't use UTC in all cases.

* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-times): New defun.
(tramp-smb-file-name-handler-alist): Use it.

* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Adapt test.
2025-08-06 17:59:02 +02:00
Michael Albinus
5ff8a90395 Tramp allows now external implementations for functions
* doc/misc/tramp.texi (Frequently Asked Questions): Mention tramp-hlo.
(New operations): New node.
(Top, Files directories and localnames):  Add it to @menu.

* etc/NEWS: Mention Tramp's feature to add function implementations.
Presentational fixes and improvements.

* lisp/net/tramp.el (tramp-file-name-for-operation-external): New defvar.
(tramp-file-name-for-operation): Use `memq'.  Handle external
operations.  Raise `remote-file-error' error in case of.
(tramp-add-external-operation, tramp-remove-external-operation):
New defuns.

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test50-auto-load)
(tramp-archive-test50-delay-load)
(tramp-archive-test51-without-remote-files): Rename.

* test/lisp/net/tramp-tests.el (tramp--test-operation)
(tramp--handler-for-test-operation): New defuns.
(tramp-test49-external-backend-function): New test.
(tramp-test50-auto-load, tramp-test50-delay-load)
(tramp-test50-recursive-load, tramp-test50-remote-load-path)
(tramp-test51-without-remote-files, tramp-test52-unload): Rename.
2025-08-05 12:00:21 +02:00
Michael Albinus
4516091fd8 Fix problem in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes):
Use `directory-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test19-directory-files-and-attributes): Extend tests.
2025-07-30 09:33:20 +02:00
Michael Albinus
76c17ac0f0 Rework filenotify-tests.el
* lisp/filenotify.el (file-notify--rm-descriptor):
Use `insert-special-event'.

* lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Fix docstring.
(tramp-sh-gio-monitor-process-filter): Extend error strings.

* test/infra/Dockerfile.emba (emacs-base): Install python3.

* test/lisp/filenotify-tests.el (auto-revert-buffer-list): Declare.
(file-notify--test-rootdir): New defvar.  Replace all uses of
`temporary-file-directory' by it.
(file-notify--test-cleanup): Set `auto-revert-buffer-list' to nil.
(file-notify--test-monitor): Check also for `process-live-p'.
Skip test, if the monitor cannot be determined.
(file-notify--deftest-remote): Do not call
`tramp-cleanup-connection', this is done in
`file-notify--test-cleanup' already.
(with-file-notify-test): New defmacro.  Use it in (almost) all tests.
(file-notify--test-make-temp-name): Do not create
`file-notify--test-tmpdir'.
(file-notify--test-event-handler): Use `directory-file-name '.
(auto-revert-debug): Set it to nil.
(file-notify-test<nn>-*): Rewrite, using `with-file-notify-test'
and `ert-with-temp-file'.

* test/lisp/net/tramp-tests.el (tramp-test46-file-notifications):
Tag it :unstable.
2025-07-26 12:45:51 +02:00
Michael Albinus
4c9b376607 Improve autorevert-tests
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.8.1-pre".

* lisp/autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(auto-revert-notify-handler, auto-revert--end-lockout):
Use `auto-revert-buffer'.
(auto-revert-notify-handler): Rearrange setting current buffer.
(auto-revert-handler): Add debug message.  Rearrange check.
Cancel lockout timer if running.

* lisp/net/tramp.el (tramp-barf-if-file-missing)
(with-parsed-tramp-file-name, tramp-skeleton-file-truename):
* lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name):
* lisp/net/tramp-message.el (tramp-with-demoted-errors):
Fix debug declatation.

* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter): Do not
prepend remote prefix.

* test/lisp/autorevert-tests.el: Unify file notification libraries
"gio-monitor" and "gvfs-monitor-dir" to "gio".
(top): Set some Tramp related variables.
(auto-revert--timeout): Increase value.
(auto-revert--test-enabled-remote)
(auto-revert-test02-auto-revert-deleted-file): Do not check for
EMACS_HYDRA_CI environment variable.
(auto-revert--wait-for-revert): Fix regexp to search for.
(auto-revert--deftest-remote): Fix debug declatation.  Do not tag
:unstable.
(with-auto-revert-test): Fix debug declatation.  Adapt revert intervals.
(auto-revert-test*): Start with (file-notify-rm-all-watches).  Use
`buffer-string' and `string-match-p'.
(auto-revert-test00-auto-revert-mode): Unlock initial lockout.
(auto-revert-test01-auto-revert-several-files): Rearrange
temporary directory and file settings.
(auto-revert-test02-auto-revert-deleted-file): Adapt debug message.
(auto-revert-test03-auto-revert-tail-mode): Use `with-auto-revert-test'.
(auto-revert-test04-auto-revert-mode-dired):
Use `ert-with-temp-directory'.  Adapt prefix of tmpfile.
(auto-revert-test04-auto-revert-mode-dired)
(auto-revert-test05-global-notify, auto-revert-test06-write-file):
Wait for proper file modification.
(auto-revert-test--instrument-kill-buffer-hook): Fix debug message.
(auto-revert-test07-auto-revert-several-buffers): Use
`with-auto-revert-test.

* test/lisp/filenotify-tests.el: Unify file notification libraries
"gio-monitor" and "gvfs-monitor-dir" to "gio".
(file-notify--deftest-remote): Fix debug declatation.  Do not skip
for "gio".
(file-notify--test-with-actions): Fix debug declatation.

* test/lisp/net/tramp-tests.el (filenotify): Require.
(ert-remote-temporary-file-directory)
(tramp-test41-special-characters, tramp-test42-utf8)
(tramp-test45-asynchronous-requests): Do not check for
EMACS_HYDRA_CI environment variable.
(tramp-test46-file-notifications): New test.
2025-07-15 18:57:49 +02:00
Michael Albinus
55691c61d4 Tramp: Do not raise an error when not connected (Bug#78572)
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
Use read syntax #' for `tramp-timeout-session',

* lisp/net/tramp.el (tramp-barf-if-file-missing): Do not raise an error
when not connected.  (Bug#78572)
(tramp-file-name-handler): Do not force the backtrace.
(tramp-connectable-p): Check also, whether initial handshake is finished.
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-set-file-modes-times-uid-gid): Rearrange sending
`file-missing' error.
(tramp-handle-access-file, tramp-handle-unlock-file):
Use `tramp-connectable-p'.

* test/lisp/net/tramp-tests.el (project-mode-line-format)
(project-mode-line): Declare.
(tramp-test48-session-timeout): New test.
(tramp-test49-auto-load, tramp-test49-delay-load)
(tramp-test49-recursive-load, tramp-test49-remote-load-path)
(tramp-test50-without-remote-files, tramp-test51-unload): Rename.
2025-06-02 11:44:43 +02:00
Michael Albinus
5ce0e1372b Fix Tramp bug#78508
* lisp/net/tramp-container.el (tramp-methods) <docker, dockercp, podman>
<podmancp, apptainer, nspawn>:
* lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync>
<ssh, sshx, sudo>:
* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Set TERM environment.
(Bug#78508)

* lisp/net/tramp-sh.el (tramp-find-executable): Handle superlong PATH.
(tramp-set-remote-path): Simplify command.
(tramp-timeout-session): Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-winexe-program): Adapt docstring.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl, tramp-smb-maybe-open-connection):
Simplify argument handling.
(tramp-smb-handle-process-file): Flush " process-exit-status" property.
(tramp-smb-call-winexe): Set $winsize.Width to 102 only.

* lisp/net/tramp.el (tramp-process-sentinel): Adapt docstring.
Set " process-exit-status" property.

* test/lisp/net/tramp-tests.el (tramp--test-enabled):
Make it more robust.
(tramp-test18-file-attributes)
(tramp-test26-interactive-file-name-completion)
(tramp-test26-file-name-completion-boundaries)
(tramp-test35-remote-path): Adapt tests.
2025-05-31 15:08:06 +02:00
Eli Zaretskii
bd57055a58 Merge from origin/emacs-30
299d3a4401 Fix saving abbrevs by 'abbrev-edit-save-buffer'
399d05332e ; Remove confusing text from ELisp manual
feecb1fbc6 ; * doc/emacs/cmdargs.texi (General Variables): More accu...
18e1aabbea ; Improve documentation of the -L command-line option
c80fbe3f23 typescript-ts-mode: align ternary-chain branches (bug#78187)
16bfbc6fe3 ; Tramp test fixes
f0ac271da3 ; Time Stamps doc: Clearer customize recipe
49c06df224 ; * doc/lispref/variables.texi (Default Value): Update.
cbea5997c0 ; * lisp/mh-e/mh-e.el: Commentary: link to The MH-E Manual
0bf956235e Improve Tramp test
eaf01d034c * lisp/autorevert.el (auto-revert-remote-files): Adapt do...
e32bb816ad ; Improve documentation of ls-lisp.el
2d5f243470 ; * lisp/emacs-lisp/comp.el (native-compile-prune-cache):...
bb73533165 Improve Electric Pair mode documentation (bug#78021)
2025-05-17 06:52:01 -04:00
Michael Albinus
16bfbc6fe3 ; Tramp test fixes
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Simplify.
(tramp--test-putty-p): Fix docstring.
(tramp--test-scp-p): New defun.
(tramp-test42-utf8): Use it.
2025-05-15 15:15:22 +02:00
Michael Albinus
0bf956235e Improve Tramp test
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Adapt test.
2025-05-11 14:25:59 +02:00
Eli Zaretskii
1410bfb7ca Merge from origin/emacs-30
0d493864ce Fix indentation of XML comments
1a2c29b531 Improve Tramp's make-process handling for Solaris
a7dffc2ea3 Document 'time-stamp-time-zone' in Emacs Manual
0b4eb525b6 Make treesit--simple-indent-eval more permissive (bug#78065)
ed7b55f6bf Adapt Tramp tests
b172a1478c ; * doc/lispref/tips.texi (Library Headers): Fix wording ...
81629b2b2b ; * lisp/gnus/mail-source.el (mail-sources): Fix a typo (...
2025-05-10 07:40:30 -04:00
Michael Albinus
ed7b55f6bf Adapt Tramp tests
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
2025-05-06 12:22:45 +02:00
Michael Albinus
99ca41b6ef ; Fix last change in tramp-tests.el 2025-05-02 14:55:52 +02:00
Spencer Baugh
d56d7ca35c Fix completion boundaries for TRAMP file names
Previously, we assumed (roughly) that substitute-in-file-name
always returns a suffix of the original string.  But
substitute-in-file-name on "/ssh:user@host:/~/" returns
"/ssh:user@host:~/", preserving the TRAMP magic prefix.  Weaken
the assertion in completion--sifn-boundaries to allow this; the
new assertion is more clear about the property we care about,
anyway.

* lisp/minibuffer.el (completion--sifn-boundaries): Weaken
assertion slightly.

* test/lisp/net/tramp-tests.el (tramp--test-emacs31-p)
(tramp--split-on-boundary)
(tramp-test51-file-name-completion-boundaries): Add.
2025-05-02 14:47:37 +02:00
Eli Zaretskii
2054060d56 Merge from origin/emacs-30
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
2025-04-05 07:07:29 -04:00
Michael Albinus
3f9ac99fc7 Fix Tramp's file-attributes cache
* 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.
2025-04-01 15:24:44 +02:00
Michael Albinus
10991877c8 Sync with Tramp 2.7.3-pre
* 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.
2025-03-30 15:53:47 +02:00
Michael Albinus
8a986e7075 tramp-tests cleanup
* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion)
(tramp-test26-interactive-file-name-completion): Adapt tests.
2025-03-28 19:26:23 +01:00
Michael Albinus
172e35afce Tramp: Improve handling of cyclic symlinks
* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Add FIXME.

* lisp/net/tramp.el (tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test21-file-links): Adapt tests.
2025-03-22 09:52:22 +01:00
Michael Albinus
f6632114fe ; Tramp: fixes resulting from test campaign
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Handle symlinks.

* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
STDERR is not implemented.

* lisp/net/tramp.el (tramp-skeleton-process-file): Raise a warning
if STDERR is not implemented.
(tramp-handle-shell-command):
Respect `async-shell-command-display-buffer'.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
2025-03-19 14:40:54 +01:00
Michael Albinus
b8104dadbf Tramp: Handle symlinks to non-existing targets better
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Don't use the truename.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Refactor.  Handle
symlinks.  (Bug#76678)

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-handle-copy-file, tramp-smb-handle-rename-file):
Refactor.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Don't use the truename.  Handle symlinks.

* lisp/net/tramp.el (tramp-barf-if-file-missing): Accept also symlinks.
(tramp-skeleton-file-exists-p): Handle non-existing symlink targets.
(tramp-skeleton-set-file-modes-times-uid-gid): Fix typo.

* test/lisp/net/tramp-tests.el (vc-handled-backends):
Suppress only if noninteractive.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test18-file-attributes, tramp-test21-file-links)
(tramp--test-check-files): Adapt tests.
2025-03-16 14:17:38 +01:00
Michael Albinus
ec34bccfee Simplify Tramp's find-executable
* lisp/net/tramp-cache.el (with-tramp-saved-connection-property):
Fix typo.

* lisp/net/tramp-compat.el: Add TODO.

* lisp/net/tramp-sh.el (tramp-find-executable): Simplify, using
"type -P ...".
(tramp-set-remote-path): Better handling of superlong $PATH.
(tramp-get-remote-path): Adapt/use connection properties.

* test/lisp/net/tramp-tests.el (tramp--test-enabled)
(tramp-test03-file-name-host-rules): Don't wrap
`tramp-cleanup-connection' with `ignore-errors'.
2025-02-19 19:38:25 +01:00
Michael Albinus
5fcf07ac09 Tramp: Don't require PuTTY 0.82 anymore
* doc/misc/tramp.texi: Revert last change.

* lisp/net/tramp-cache.el (with-tramp-saved-connection-properties):
Adapt `tramp-verbose' when completing host names.

* lisp/net/tramp-sh.el (tramp-methods) <plink, plinkx, pscp, psftp>:
Adapt `tramp-login-args' and `tramp-copy-args' arguments.
(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.

* lisp/net/tramp.el (tramp-file-name-handler): Don't touch
`tramp-verbose'.

* test/lisp/net/tramp-tests.el (top): Set `vc-handled-backends' to nil.
(tramp--test-enabled): Rearrange code.
2025-02-15 17:12:52 +01:00
Stefan Kangas
7fa975adbc Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-02 18:39:42 +01:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Michael Albinus
680906c136 Some minor Tramp changes
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Do proper quoting.

* lisp/net/tramp.el (tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Adapt test.
(tramp-test42-utf8): Do not run expensive tests on MS Windows.
2024-12-29 12:26:05 +01:00
Michael Albinus
fef05ba8f4 ; Minor fixes in tramp-tests.el
* test/lisp/net/tramp-tests.el (ert-batch-backtrace-right-margin):
Set it to nil.
(tramp--test-enabled): Fix regexps.
2024-12-03 13:23:28 +01:00
Michael Albinus
e54c218d66 Extend Tramp tests
* test/lisp/net/tramp-tests.el (tramp-test47-read-password)
(tramp-test47-read-otp-password, tramp-test47-read-fingerprint):
Use `tramp-default-remote-shell' and
`tramp-connection-properties'.  Cleanup at the end.
(tramp-test47-read-security-key): New test.
2024-11-28 13:28:58 +01:00
Michael Albinus
3fe787ad4d Support fingerprint readers in Tramp
* doc/misc/tramp.texi (Frequently Asked Questions): Speak about
fingerprint readers.

* lisp/net/tramp-sh.el (tramp-actions-before-shell):
Use `tramp-fingerprint-prompt-regexp'.

* lisp/net/tramp.el (tramp-wrong-passwd-regexp): Add fingerprint
messages.
(tramp-fingerprint-prompt-regexp, tramp-use-fingerprint):
New defcustoms.
(tramp-action-fingerprint, tramp-action-show-message): New defuns.
(tramp-action-show-and-confirm-message): Start check at (point-min).

* test/lisp/net/tramp-tests.el (tramp-test47-read-fingerprint):
New test.
2024-11-26 12:45:06 +01:00
Stefan Kangas
7cb77385d3 ; Fix typos 2024-11-21 10:06:19 +01:00
Michael Albinus
b6181c9ec9 ; Fix last change 2024-11-17 11:37:10 +01:00
Michael Albinus
b6e78f7d8c Tramp: Be more conservative in removing temporary files
* test/lisp/net/tramp-tests.el (Commentary): Extend.
(tramp--test-enabled): Exclude also old FUSE mount points from
deletion.
2024-11-17 11:15:30 +01:00
Michael Albinus
310ce93d02 Remove Tramp temp files if advised during tests
* lisp/net/tramp-fuse.el (tramp-fuse-name-prefix): New defconst.
(tramp-fuse-mount-point): Use it.

* test/lisp/net/tramp-tests.el (tramp-test-name-prefix): New defconst.
(tramp--test-make-temp-name, tramp-test40-make-nearby-temp-file)
(tramp-test47-read-password, tramp-test47-read-otp-password):
Use it.
(tramp--test-enabled-checked): Move down.
(tramp--test-enabled): Delete all Tramp temp files when
environment variable $TRAMP_TEST_CLEANUP_TEMP_FILES is set.
(tramp-test02-file-name-dissect-separate):
Adapt `tramp-crypt-directories' according to syntax.
(tramp-test47-read-password):
Let-bind `tramp-connection-properties' instead of modifying
`tramp-methods'.
2024-11-15 14:28:08 +01:00
Michael Albinus
1e3d72d962 Several Tramp cleanups
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Move setting of sentinel up.

* lisp/net/tramp-cache.el (tramp-get-connection-property)
(tramp-set-connection-property): Don't raise a debug message for
the `tramp-cache-version' key.

* lisp/net/tramp.el (tramp-convert-file-attributes): Don't cache
"file-attributes-ID-FORMAT".

* test/lisp/net/tramp-tests.el (tramp--test-enabled): Cleanup also
`tramp-compat-temporary-file-directory'.
(tramp-test32-shell-command): Use `async-shell-command-width' of 512.
(tramp-test36-vc-registered): Remove double let* entry.
2024-11-05 15:57:42 +01:00
Michael Albinus
1bf1753d79 Tramp: Use when-let*', if-let*' and `and-let*' consequently
* 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:
* test/lisp/net/tramp-tests.el:
Use `when-let*', `if-let*' and `and-let*' consequently.  (Bug#73441)
2024-10-30 10:39:02 +01:00
Michael Albinus
0b7f649614 Fix a Tramp bug when running several asynchronous processes
* lisp/net/tramp-cache.el (tramp-get-hash-table):
Add ;;;###tramp-autoload cookie.

* lisp/net/tramp.el (tramp-file-name-handler): Flush connection
properties "process-name" and "process-buffer".

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process): Skip when underlying
TEST has taken too much time.
(tramp--test-with-proper-process-name-and-buffer): Remove.
(tramp-test45-asynchronous-requests): Remove callees.
2024-08-21 10:46:20 +02:00