aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net/tramp-cache.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix Tramp customizationMichael Albinus2025-10-141-1/+1
| | | | | | | | | | | Do not use the ;;;###tramp-autoload cookie for defcustoms. This damages the customisation when Tramp is autoloaded. Reported by Joel Reicher <joel.reicher@gmail.com>. * lisp/net/tramp-cache.el (tramp-verbose): Declare. (tramp-connection-properties): * lisp/net/tramp-message.el (tramp-verbose): Remove ;;;###tramp-autoload cookie.
* Tramp code cleanupMichael Albinus2025-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | * 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'.
* `Fix read-directory-name' for Tramp filesMichael Albinus2025-08-291-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fix Tramp bug#78508Michael Albinus2025-05-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Merge from origin/emacs-30Eli Zaretskii2025-04-051-6/+5
|\ | | | | | | | | | | | | | | ae7f65f3f9c Fix obsolete documentation of desktop library fd5f817882a Improve Tramp's initial warnings 1e865a2f288 Explain, how to suppress Tramp warnings a0962074743 printed manuals: xrefs in and out of "Preparing Patches" 3f9ac99fc7e Fix Tramp's file-attributes cache
| * Improve Tramp's initial warningsMichael Albinus2025-04-031-6/+5
| | | | | | | | | | | | | | | | | | * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Adapt comment. * lisp/net/tramp-compat.el (tramp-warning): Declare and use it. * lisp/net/tramp-message.el (tramp-warning): Declare `indent'.
| * Sync with Tramp 2.7.3-preMichael Albinus2025-03-301-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Update copyright year to 2025Stefan Kangas2025-01-021-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Tramp: Don't offer non-existing containers in completionMichael Albinus2025-03-121-23/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (File name completion): Explain "completion-use-cache" property. * lisp/net/tramp-cache.el (tramp-get-method-parameter): Declare. (tramp-get-hash-table): Mark connection properties. (tramp-dump-connection-properties): Remove empty lists. (tramp-parse-connection-properties): Take connection property "completion-use-cache" into account. (Bug#76950) * lisp/net/tramp-container.el (tramp-methods) <docker, dockercp, podman> <podmancp, kubernetes, toolbox, distrobox, flatpak, apptainer, nspawn>: Add `tramp-completion-use-cache' argument.
* | Simplify Tramp's find-executableMichael Albinus2025-02-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* | Tramp: Don't require PuTTY 0.82 anymoreMichael Albinus2025-02-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Adapt PuTTY integration into TrampMichael Albinus2025-02-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Inline methods, External methods): PuTTY must be at least version 0.82. * lisp/net/tramp-cache.el (with-tramp-saved-connection-property) (with-tramp-saved-connection-properties): Add traces. * lisp/net/tramp-sh.el (tramp-methods) <plink, plinkx, pscp, psftp>: Adapt `tramp-login-args' and `tramp-copy-args' arguments. (Bug#75746)
* | Minor Tramp changesMichael Albinus2025-02-011-2/+5
| | | | | | | | | | | | | | * doc/misc/tramp.texi (External methods): Precise remark on rsync speed. * lisp/net/tramp-cache.el (tramp-connection-properties): Add link to the Tramp manual in the docstring.
* | Tramp cleanupMichael Albinus2025-01-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Predefined connection information): Mention also "androidsu" as special case of "tmpdir". (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. * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory): Simplify.
* | Fix Tramp error handling process bufferMichael Albinus2025-01-191-1/+1
| | | | | | | | | | | | | | | | | | * lisp/net/tramp-cache.el (tramp-list-connections): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Use connection property " connected" for a check of active connections. * lisp/net/tramp.el (tramp-get-buffer): Set connection property " connected".
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Tramp: Rework handling of temporary connection propertiesMichael Albinus2024-11-131-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Ad-hoc multi-hops): Precise use of parallel multi-hops. * lisp/net/tramp-cache.el: * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-androidsu.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: Rename connection properties "process-name", "process-buffer" and "first-password-request" to " process-name", " process-buffer" and " first-password-request, repectively". * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Don't dump properties starting with a space.
* | Several Tramp cleanupsMichael Albinus2024-11-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Tramp: Use `when-let*', `if-let*' and `and-let*' consequentlyMichael Albinus2024-10-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* | Silence compiler errorMichael Albinus2024-09-091-1/+6
| | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-file-name*): Embed `function-put' calls with `tramp--with-startup'. (tramp-active-command-completion-p) * lisp/net/tramp-cache.el (tramp-get-hash-table): Remove declare form. Add `tramp-suppress-trace' function property.
* | Add convenience to TrampMichael Albinus2024-08-261-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Inline methods): Add tramp-docker-program, tramp-podman-program, tramp-kubernetes-program, tramp-toolbox-program, tramp-distrobox-program, tramp-flatpak-program, tramp-apptainer-program, and tramp-nspawn-program. (Remote shell setup): Rearrange indices. (Ssh setup): Say "user option" when needed. (Keeping files encrypted): Add tramp-crypt-encfs-program. (Frequently Asked Questions): Rearrange indices. Remove duplicate text. Add tramp-mode. * lisp/net/tramp.el (tramp-active-command-completion-p): New defun. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections, tramp-cleanup-some-buffers) (tramp-cleanup-all-buffers, tramp-rename-files): * lisp/net/tramp-message.el (tramp-setup-debug-buffer): Declare `completion'. * lisp/net/tramp-integration.el (tramp-info-link): New widget. (tramp-widget-info-link-action): New defun. * lisp/net/tramp.el (tramp, tramp-mode, tramp-backup-directory-alist) (tramp-auto-save-directory, tramp-encoding-shell) (tramp-encoding-command-switch) (tramp-encoding-command-interactive, tramp-default-method) (tramp-default-method-alist, tramp-default-user) (tramp-default-user-alist, tramp-default-host) (tramp-default-host-alist, tramp-default-proxies-alist) (tramp-save-ad-hoc-proxies, tramp-show-ad-hoc-proxies) (tramp-restricted-shell-hosts-alist, tramp-local-host-regexp) (tramp-shell-prompt-pattern, tramp-password-prompt-regexp) (tramp-otp-password-prompt-regexp, tramp-wrong-passwd-regexp) (tramp-terminal-type, tramp-syntax) (tramp-ignored-file-name-regexp, tramp-chunksize) (tramp-process-connection-type, tramp-remote-path) (tramp-remote-process-environment) (tramp-completion-multi-hop-methods) (tramp-completion-use-auth-sources, tramp-use-file-attributes) (tramp-inhibit-errors-if-setting-file-attributes-fail) (tramp-allow-unsafe-temporary-files): * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected): * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name, tramp-completion-use-cache): * lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers-hook) (tramp-default-rename-alist, tramp-confirm-rename-file-names) (tramp-file-name-with-method): * lisp/net/tramp-container.el (tramp-docker-program) (tramp-podman-program, tramp-kubernetes-program) (tramp-kubernetes-context, tramp-kubernetes-namespace) (tramp-toolbox-program, tramp-distrobox-program) (tramp-flatpak-program, tramp-apptainer-program) (tramp-nspawn-program): * lisp/net/tramp-crypt.el (tramp-crypt-encfs-program) (tramp-crypt-encfsctl-program, tramp-crypt-encfs-option) (tramp-crypt-save-encfs-config-remote): * lisp/net/tramp-fuse.el (tramp-fuse-unmount-on-cleanup): * lisp/net/tramp-gvfs.el (tramp-gvfs-methods): * lisp/net/tramp-message.el (tramp-verbose, tramp-debug-to-file) (tramp-debug-command-messages): * lisp/net/tramp-rclone.el (tramp-rclone-program): * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-histfile-override) (tramp-use-connection-share) (tramp-use-scp-direct-remote-copying, tramp-sh-extra-args): * lisp/net/tramp-sshfs.el (tramp-sshfs-program): Add `:link' key. * lisp/net/tramp.el (tramp-enable-method): Move function ... * lisp/net/tramp-cmds.el (tramp-enable-method): ... here.
* | Fix a Tramp bug when running several asynchronous processesMichael Albinus2024-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Remove further compat code from TrampMichael Albinus2024-08-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-process-file): Use `process-file-return-signal-string'. * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use "lisp-data" for persistency file. * lisp/net/tramp-cmds.el (tramp-cleanup-this-connection) (tramp-rename-these-files, tramp-recompile-elpa): Declare `completion'. * lisp/net/tramp-container.el (tramp-kubernetes--container) (tramp-kubernetes--pod, tramp-kubernetes--namespace): Make more robust. * lisp/net/tramp-crypt.el (tramp-crypt-remove-directory): Declare `completion'. * lisp/net/tramp-gvfs.el (file-notyify-callback): Declare. * lisp/net/tramp-sh.el (process-file-return-signal-string) (vc-handled-backends): Don't declare. * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory): Use `copy-directory-create-symlink'. * lisp/net/tramp.el (tramp-skeleton-write-region): Use `lock-file' and `unlock-file'.. (tramp-handle-make-lock-file-name): Use `remote-file-name-inhibit-locks'. (tramp-handle-unlock-file): Use `remote-file-name-inhibit-locks' and `userlock--handle-unlock-error'. (tramp-handle-shell-command): Use `shell-command-buffer-name-async' and `shell-command-buffer-name'. (tramp-read-passwd): Remove workaround.
* | Remove Emacs 27 compatibility from TrampMichael Albinus2024-07-241-2/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Frequently Asked Questions): Adapt supported Emacs versions. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.8.0-pre". * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes, tramp-compat-set-file-times) (tramp-compat-directory-files) (tramp-compat-directory-files-and-attributes) (tramp-compat-directory-empty-p, tramp-compat-null-device) (tramp-compat-string-replace, tramp-compat-string-search) (tramp-compat-make-lock-file-name) (tramp-compat-file-name-concat) (tramp-compat-replace-regexp-in-region, tramp-compat-length<) (tramp-compat-length>, tramp-compat-length=) (tramp-compat-always): Remove. * lisp/net/tramp-adb.el: * lisp/net/tramp-androidsu.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cache.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-compat.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-message.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 original objects instead of their `tramp-compat-' counterparts when possible.
* Tramp code cleanupMichael Albinus2024-05-091-7/+7
| | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-seq-keep): New defalias. * lisp/net/tramp.el (tramp-enable-method): * lisp/net/tramp-adb.el (tramp-adb-parse-device-names): * lisp/net/tramp-cache.el (tramp-list-connections): * lisp/net/tramp-cmds.el (tramp-bug, tramp-append-tramp-buffers): * lisp/net/tramp-container.el (tramp-container--completion-function) (tramp-toolbox--completion-function) (tramp-flatpak--completion-function) (tramp-apptainer--completion-function): * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names): Use it.
* Adapt cache handling in TrampMichael Albinus2024-02-051-58/+47
| | | | | | | | * lisp/net/tramp-cache.el (with-tramp-saved-file-property) (with-tramp-saved-file-properties) (with-tramp-saved-connection-property) (with-tramp-saved-connection-properties): Do not change KEY destructively.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Tramp cleanupMichael Albinus2023-12-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Remote processes): Adapt index. * lisp/net/tramp.el (tramp-skeleton-directory-files) (tramp-skeleton-make-symbolic-link): * lisp/net/tramp-cache.el (with-tramp-saved-file-property) (with-tramp-saved-file-properties) (with-tramp-saved-connection-property) (with-tramp-saved-connection-properties): Use `setf' but `setq' in macro. * lisp/net/tramp-compat.el (tramp-compat-funcall): Declare debug. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Exclude lock files. (tramp-crypt-file-name-handler-alist): Use `identity' for `abbreviate-file-name'. (tramp-crypt-add-directory, tramp-crypt-remove-directory): Adapt docstrings. (tramp-crypt-cleanup-connection): New defun. Add it to `tramp-cleanup-connection-hook' * lisp/net/tramp-sh.el (tramp-sh-extra-args): Extend regexp.
* | Some minor Tramp changesMichael Albinus2023-08-271-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): Fix error message. * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Remove `tramp-null-hop'. * lisp/net/tramp-message.el (tramp-message, tramp-backtrace) (tramp-error): Handle VEC being nil. * lisp/net/tramp.el (tramp-null-hop): Add ;;;###tramp-autoload cookie. Use pseudo method "local". (tramp-file-name-unify): IF VEC is nil, set it to `tramp-null-hop'. (tramp-set-completion-function): Support also functions with METHOD as argument. (tramp-get-completion-methods): Add argument HOP. (tramp-completion-handle-file-name-all-completions): Use it. (tramp-call-process-region): Set VEC if nil.
* | Add more `tramp-suppress-trace' properties in TrampMichael Albinus2023-08-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Use `tramp-archive-handle-file-symlink-p'. (tramp-archive-handle-file-symlink-p): New defun. * lisp/net/tramp-cache.el (tramp-loaddefs): Don't require. (tramp-get-hash-table, tramp-cache-print) (tramp-dump-connection-properties): Declare `tramp-suppress-trace' property. * lisp/net/tramp-cmds.el (tramp-cleanup-dired-buffer-p) (tramp-delete-tainted-remote-process-buffer-function): Declare `tramp-suppress-trace' property. * lisp/net/tramp-compat.el (tramp-loaddefs): Require. (tramp-error): Declare. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler): Fix typo. * lisp/net/tramp-integration.el (tramp-rfn-eshadow-setup-minibuffer) (tramp-rfn-eshadow-update-overlay-regexp) (tramp-rfn-eshadow-update-overlay): Declare `tramp-suppress-trace' property. * lisp/net/tramp-message.el (tramp-compat): Require (instead of tramp-loaddefs.el). (tramp-compat-string-replace, tramp-compat-temporary-file-directory): Don't declare. (tramp-byte-run--set-suppress-trace): Move to tramp.el. (tramp-debug-outline-level) (tramp-debug-buffer-command-completion-p, tramp-message) (tramp-debug-button-action, tramp-debug-link-messages) (tramp-debug-message-buttonize): Declare `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-byte-run--set-suppress-trace): New defun, moved from tramp-message.el. (tramp-file-name-unify, tramp-file-name-equal-p) (tramp-tramp-file-p, tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name) (tramp-ensure-dissected-file-name, tramp-buffer-name) (tramp-delete-temp-file-function, tramp-time-diff): Declare `tramp-suppress-trace' property.
* | Suspend timers when reading Tramp process outputMichael Albinus2023-05-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (xdg): Require. (tramp-compat-temporary-file-directory): Set it to $XDG_CACHE_HOME/emacs if possible. * lisp/net/tramp.el (tramp-debug-to-file): Fix docstring. (tramp-wrong-passwd-regexp): Add "Authentication failed" string (from doas). (tramp-debug-message): Simplify backtrace check. (with-tramp-locked-connection): Suppress timers. (Bug#49954, Bug60534) * test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents): Adapt test. (tramp-test45-asynchronous-requests): Remove :unstable tag. Adapt test.
* | Remove Emacs 26 compatibility from TrampMichael Albinus2023-01-061-2/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Remote processes): Don't mention Emacs version. (Frequently Asked Questions): Adapt supported Emacs versions. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.7.0-pre". * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p) (tramp-compat-file-name-quote, tramp-compat-file-name-unquote) (tramp-compat-tramp-syntax, tramp-compat-exec-path) (tramp-compat-time-equal-p, tramp-compat-flatten-tree) (tramp-compat-progress-reporter-update) (tramp-compat-ignore-error, tramp-compat-rx--transform-item) (tramp-compat-rx--transform, tramp-compat-rx): Remove. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cache.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-integration.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: * lisp/net/trampver.el: Replace the removed `tramp-compat-*' items by their real definition. Don't use `tramp-compat-funcall' when not needed. Remove `with-no-warnings' and `ignore-errors' where appropriate. * lisp/net/tramp.el (tramp-file-name-for-operation): Rearrange list. (tramp-handle-file-newer-than-file-p): Simplify. (tramp-get-process-attributes): Don't check for existence of `connection-local-criteria-for-default-directory'. (tramp-handle-shell-command): Don't check for existence of `shell-command-save-pos-or-erase', `async-shell-command-width' and `shell-command-set-point-after-cmd'. (tramp-handle-start-file-process): Call `make-process' directly. (tramp-defined-time): New defsubst. (tramp-get-local-gid): Don't check for existence of `group-name'. * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): Use `tramp-defined-time'. (tramp-adb-get-signal-strings): Don't bind `shell-file-name' and `shell-command-switch'. * lisp/net/tramp-archive.el (top, tramp-archive-file-name-handler): Don't bind `max-specpdl-size' any longer. (tramp-archive-autoload-file-name-regexp): Remove Emacs 26 specific code. (top): Don't call `tramp-register-archive-autoload-file-name-handler'. * lisp/net/tramp-gvfs.el (top): Don't bind `max-specpdl-size' any longer. (tramp-gvfs-handle-set-file-times): Use `tramp-defined-time'. * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): Use `tramp-defined-time'. * test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs27-p): Remove. (all): * test/lisp/net/tramp-tests.el (all): Don't skip for Emacs 26. Replace the removed `tramp-compat-*' items by their real definition. Don't use `tramp-compat-funcall' when not needed. Remove `with-no-warnings' and `ignore-errors' where appropriate. (with-connection-local-variables) (shell-command-dont-erase-buffer): Don't declare. (tramp-test10-write-region): Don't check for `make-empty-file'. (tramp-test32-shell-command): Simplify. (tramp-test34-explicit-shell-file-name): Don't protect `explicit-shell-file-name' any longer. (tramp--test-emacs27-p): Remove.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Handle context changes in Tramp kubernetes methodMichael Albinus2022-10-251-8/+19
| | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Inline methods): Remove note about cache reset. (File name completion): Add tramp-completion-use-cache. * etc/NEWS: Add 'tramp-completion-use-cache'. * lisp/net/tramp-cache.el (tramp-completion-use-cache): New defcustom. (tramp-parse-connection-properties): Use it. * lisp/net/tramp-container.el (tramp-docker--completion-function) (tramp-kubernetes--completion-function): Ensure the processes run locally. (tramp-kubernetes--current-context-data): New defun. (tramp-methods) <kubernetes>: Add `tramp-config-check'. * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Handle `tramp-login-args'. * lisp/net/tramp.el (tramp-methods): Adapt docstring.
* Use a version for the Tramp cacheMichael Albinus2022-10-011-2/+20
| | | | | | | | | * lisp/net/tramp-cache.el (tramp-cache-version): New defconst. (top): Check the cache version, and flush the cache in case of mismatch. Suggested by Paul Pogonyshev <pogonyshev@gmail.com>. * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Re-initialize the cache version.
* Minor Tramp cleanupsMichael Albinus2022-09-181-2/+1
| | | | | | | * lisp/net/tramp-compat.el (tramp-compat-rx): Declare. * lisp/net/tramp-integration.el (info-lookup-maybe-add-help): Fix `rx' call.
* Disable Tramp cache for relative file namesMichael Albinus2022-09-111-75/+84
| | | | | | | | | | | | * lisp/net/tramp.el (tramp-file-name-unify): Return `tramp-cache-undefined' if LOCALNAME is a relative file name. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property, tramp-file-property-p) (tramp-flush-file-property, tramp-flush-file-upper-properties) (tramp-flush-file-properties): Handle KEY being `tramp-cache-undefined'. (tramp-flush-file-function): Revert last change.
* Ensure, that Tramp cache works over absolute file namesMichael Albinus2022-09-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-set-file-modes-times-uid-gid) (tramp-handle-add-name-to-file, tramp-handle-file-exists-p) (tramp-handle-file-readable-p, tramp-handle-file-writable-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p) (tramp-adb-handle-file-exists-p) (tramp-adb-handle-file-readable-p) (tramp-adb-handle-file-writable-p) * lisp/net/tramp-gvfs.el (tramp-gvfs-info, tramp-gvfs-handle-delete-file) (tramp-gvfs-get-directory-attributes) (tramp-gvfs-get-root-attributes) (tramp-gvfs-handle-file-executable-p): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-file-exists-p) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-set-file-selinux-context) (tramp-sh-handle-file-acl, tramp-sh-handle-file-executable-p) (tramp-sh-handle-file-readable-p) (tramp-sh-handle-file-directory-p) (tramp-sh-handle-file-writable-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-sh-handle-add-name-to-file) (tramp-sh-handle-copy-directory, tramp-sh-handle-delete-file) (tramp-sh-handle-dired-compress-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-add-name-to-file) (tramp-sudoedit-handle-delete-file) (tramp-sudoedit-handle-file-acl) (tramp-sudoedit-handle-file-executable-p) (tramp-sudoedit-handle-file-exists-p) (tramp-sudoedit-handle-file-readable-p) (tramp-sudoedit-handle-file-selinux-context) (tramp-sudoedit-handle-file-writable-p) (tramp-sudoedit-handle-make-symbolic-link) (tramp-sudoedit-handle-set-file-selinux-context): Use `expand-file-name'. (Bug#57572) * lisp/net/tramp-cache.el (tramp-flush-file-function): Expand `buffer-file-name'. (Bug#57676) * lisp/net/tramp.el (tramp-file-name-unify): Extend error message. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link): Do not check remoteness of TARGET anymore.
* Use secondary groups when checking permissions in Tramp (Bug#57044)Michael Albinus2022-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-check-cached-permissions): Check also for secondary groups. (Bug#57044) (tramp-get-remote-groups): * lisp/net/tramp-adb.el (tramp-adb-handle-get-remote-groups): * lisp/net/tramp-sh.el (tramp-sh-handle-get-remote-groups): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-get-remote-groups): New defuns. * lisp/net/tramp.el (tramp-file-name-for-operation): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-groups'. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-cache.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `blank' in `rx' forms. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `blank' in `rx' forms.
* Fix rx forms in TrampMichael Albinus2022-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-echoed-echo-mark-regexp) (tramp-login-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-antispoof-regexp) (tramp-build-completion-file-name-regexp) (tramp-debug-outline-regexp) (tramp-use-absolute-autoload-file-names) (tramp-lock-file-info-regexp, tramp-shell-quote-argument): * lisp/net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls) * lisp/net/tramp-cache.el (tramp-flush-file-function): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp) (info-lookup-maybe-add-help): * lisp/net/tramp-sh.el (tramp-default-user-alist, tramp-sunos-unames) (tramp-scp-direct-remote-copying, tramp-get-remote-locale): * lisp/net/tramp-smb.el (tramp-smb-prompt, tramp-smb-wrong-passwd-regexp) (tramp-smb-errors, tramp-smb-get-localname) (tramp-smb-read-file-entry): Simplify rx forms. * lisp/net/tramp.el (tramp-handle-find-backup-file-name) (tramp-handle-lock-file, tramp-handle-make-auto-save-file-name): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times) (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes-with-gvfs-ls-regexp): * lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Do not use `eval-when-compile'. * lisp/net/tramp-cmds.el (tramp-rename-files, tramp-rename-these-files): Use rx. * lisp/net/tramp-gvfs.el (tramp-gvfs-password-tcrypt): New defonst. (tramp-gvfs-handle-file-attributes): Use `number-to-string'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test17-insert-directory): * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory) (tramp--test-share-p): Simplify rx forms.
* Use `rx' in Tramp where possibleMichael Albinus2022-08-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cache.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-compat.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-rclone.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `rx' where possible. * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): Use `eval-when-compile'. (tramp-adb-maybe-open-connection): Use file-property for "/". Use `eval-when-compile'. * lisp/net/tramp-cmds.el (mm-7bit-chars): Declare. (tramp-reporter-dump-variable): Simplify point movement. * lisp/net/tramp-gvfs.el (tramp-dbus-function): Fix typo. (tramp-zeroconf-parse-device-names): Use `tramp-prefix-port-format'. * lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Use `eval-when-compile'. Improve sanity check. * lisp/net/tramp.el (tramp-prefix-format, tramp-prefix-regexp) (tramp-method-regexp, tramp-postfix-method-format) (tramp-postfix-method-regexp, tramp-prefix-ipv6-format) (tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format) (tramp-postfix-ipv6-regexp, tramp-postfix-host-format) (tramp-postfix-host-regexp, tramp-remote-file-name-spec-regexp) (tramp-file-name-structure, tramp-file-name-regexp) (tramp-completion-method-regexp) (tramp-completion-file-name-regexp): Declare. (tramp-set-syntax): Set also `tramp-completion-method-regexp'. (tramp-volume-letter-regexp, tramp-completion-method-regexp-alist): New defconsts. (tramp-build-completion-method-regexp): New defun. (tramp-completion-method-regexp): New defvar. (tramp-completion-file-name-regexp-default) (tramp-completion-file-name-regexp-simplified) (tramp-completion-file-name-regexp-separate) (tramp-completion-file-name-regexp-alist): Remove. (tramp-build-completion-file-name-regexp): Rwrite. (tramp-make-tramp-file-name): Use `tramp-archive-method'. (tramp-handle-file-directory-p): Ignore errors. (tramp-handle-find-backup-file-name, tramp-handle-lock-file) (tramp-handle-make-auto-save-file-name): Use `eval-when-compile'. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `rx' where possible. (tramp-test01-file-name-syntax): Adapt test.
* Reorganize TrampMichael Albinus2022-08-031-37/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-write-region): Handle special case that START is "". (tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-adb-handle-make-process): Use `with-tramp-saved-connection-properties'. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Use `tramp-archive-handle-file-exists-p'. (tramp-archive-handle-file-exists-p): New defun. (tramp-archive-file-name-handler): Add ;;;###tramp-autoload cookie. * lisp/net/tramp-cache.el (tramp-compat, tramp-loaddefs) (time-stamp): Require. (tramp-get-file-property, tramp-set-file-property) (tramp-flush-file-property, tramp-flush-file-upper-properties) (tramp-flush-file-properties): Use `tramp-file-name-unify'. Adapt message. (tramp-flush-directory-properties): Simplify. (tramp-flush-file-function): Add ;;;###tramp-autoload cookie. Don't use `with-parsed-tramp-file-name', it isn't exposed. (with-tramp-file-property, with-tramp-connection-property) (with-tramp-saved-connection-property): Macros moved from tramp.el. (with-tramp-saved-file-property) (with-tramp-saved-file-properties) (with-tramp-saved-connection-properties): New defmacros. * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Flush "/". * lisp/net/tramp-crypt.el (tramp-crypt-handle-set-file-modes) (tramp-crypt-handle-set-file-times) (tramp-crypt-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-ftp.el (tramp-archive-file-name-handler): Don't declare. * lisp/net/tramp-gvfs.el (tramp-gvfs-info): New defun. (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file, tramp-gvfs-get-root-attributes) (tramp-gvfs-handle-make-directory): Use it. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Expand TARGET when flushing file properties. (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-sh-handle-file-name-all-completions): Protect, when connection is not established yet. (tramp-do-copy-or-rename-file-directly): Flush file properties of NEWNAME when constructing a new remote file name. (tramp-do-copy-or-rename-file-out-of-band, tramp-sh-handle-make-process): Use `with-tramp-saved-connection-properties'. (tramp-sh-handle-delete-file): Flush file properties only after deleting, otherwise we get a false alarm. (tramp-sh-handle-process-file): Flush "/". (tramp-sh-handle-write-region): Handle special case that START is "". * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process): Use `with-tramp-saved-connection-properties'. (tramp-smb-remote-acl-p): New defun. (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl): Use it. (tramp-smb-handle-set-file-modes): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-smb-handle-process-file, tramp-smb-maybe-open-connection): Flush "/". * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): Flush "/". (tramp-sshfs-handle-set-file-modes) (tramp-sshfs-handle-set-file-times): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes) (tramp-sudoedit-handle-set-file-times) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp.el (tramp-archive-file-name-handler): Don't declare. (tramp-verbose, tramp-file-name-unify, tramp-tramp-file-p) (tramp-file-local-name, tramp-dissect-file-name) (tramp-make-tramp-file-name, tramp-get-connection-buffer) (tramp-get-buffer-string, tramp-debug-message) (tramp-inhibit-progress-reporter, tramp-message): Add ;;;###tramp-autoload cookie. (tramp-file-name): Expose defstruct to tramp-loaddefs.el (tramp-file-name-unify): New optional arg FILE. (tramp-get-default-directory, tramp-get-buffer-string) (tramp-message, tramp-backtrace, tramp-error-with-buffer) (tramp-with-demoted-errors, tramp-barf-if-file-missing) (tramp-skeleton-copy-directory, tramp-skeleton-delete-directory) (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-file-local-copy, tramp-skeleton-write-region): Remove `tramp-suppress-trace' property, it isn't needed for defmacros and defsubsts. (with-tramp-file-property, with-tramp-connection-property) (with-tramp-saved-connection-property): Move macros to tramp-cache.el. (tramp-skeleton-directory-files-and-attributes): Fix implementation. (tramp-skeleton-file-local-copy): Fix docstring. (tramp-skeleton-set-file-modes-times-uid-gid): New defmacro. (tramp-skeleton-write-region): Set "file-exists-p" cache property. (tramp-handle-file-exists-p): Use cached value. (tramp-process-sentinel): Flush "/". (tramp-make-tramp-temp-file): Suppress also `tramp-smb-remote-acl-p'. (tramp-get-connection-buffer): * test/lisp/net/tramp-tests.el (tramp-test10-write-region) (tramp-test20-file-modes, tramp-test22-file-times): Extend tests.
* Refactor TrampMichael Albinus2022-07-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-adb-handle-get-remote-gid' and `tramp-adb-handle-get-remote-uid'. (tramp-adb-handle-file-attributes): Use `tramp-convert-file-attributes'. (tramp-do-parse-file-attributes-with-ls): Remove ID-FORMAT. (tramp-adb-handle-directory-files-and-attributes): Use `tramp-skeleton-directory-files-and-attributes'. (tramp-adb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-adb-handle-copy-file, tramp-adb-handle-rename-file): Use `tramp-barf-if-file-missing'. (tramp-adb-handle-get-remote-uid) (tramp-adb-handle-get-remote-gid): New defuns. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Use `tramp-archive-handle-directory-files'. (tramp-archive-handle-directory-files): New defun. * lisp/net/tramp-cache.el (tramp-file-property-p): New defun. * lisp/net/tramp-compat.el (tramp-compat-take): New defalias. * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-crypt-handle-directory-files): Use `tramp-skeleton-directory-files'. * lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files): Use `tramp-skeleton-directory-files'. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. * lisp/net/tramp-sh.el (tramp-readlink-file-truename) (tramp-stat-file-attributes) (tramp-stat-directory-files-and-attributes): New defconsts. (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Adapt. (tramp-sh-handle-make-symbolic-link): Flush TARGET file properties. (tramp-sh-handle-file-truename): Use `tramp-readlink-file-truename' (tramp-sh-handle-file-exists-p) (tramp-sh-handle-file-executable-p) (tramp-sh-handle-file-readable-p) (tramp-sh-handle-file-directory-p) (tramp-sh-handle-file-writable-p): Adapt check of file properties. (tramp-sh-handle-file-attributes): Simplify. (tramp-do-file-attributes-with-ls): Remove ID-FORMAT. Combine two remote commands. Compute both versions of uid and gid together. (tramp-do-file-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-perl): Remove ID-FORMAT. (tramp-do-file-attributes-with-stat): Remove ID-FORMAT. Use `tramp-stat-file-attributes'. (tramp-sh-handle-directory-files-and-attributes): Use `tramp-skeleton-directory-files-and-attributes'. (tramp-do-directory-files-and-attributes-with-stat): Remove ID-FORMAT. Use `tramp-stat-directory-files-and-attributes'. (tramp-sh-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-sh-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-sh-handle-write-region): Combine two remote commands. (tramp-sh-gio-monitor-process-filter): Simplify `cond' call. (tramp-expand-script): Extend for ls, readling and stat. (tramp-open-connection-setup-interactive-shell): Do not set `tramp-end-of-output'. (tramp-open-connection-setup-interactive-shell): Do not send prompt formatting command, it's superfluous. (tramp-send-command-and-check): Rearrange in order to accept also heredoc scripts. (tramp-convert-file-attributes): Move function to tramp.el. (tramp-get-remote-id): Set connection property. (tramp-get-remote-uid-with-id): Use it. (tramp-get-remote-python): Don't check for python2 anymore. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use `tramp-handle-directory-files'. (tramp-smb-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-smb-handle-directory-files): Remove. (tramp-smb-handle-file-attributes): Use `tramp-convert-file-attributes'. (tramp-smb-do-file-attributes-with-stat): Remove ID-FORMAT. (tramp-smb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-sudoedit-file-attributes): New defconst. (tramp-sudoedit-handle-file-attributes): Simplify code. * lisp/net/tramp.el (tramp-setup-debug-buffer): Set debug buffer as not modified. (tramp-barf-if-file-missing, tramp-skeleton-copy-directory) (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-file-local-copy): New macros. (tramp-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-handle-directory-files): Use `tramp-skeleton-directory-files'. (tramp-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-handle-insert-file-contents): Use `tramp-barf-if-file-missing'. (tramp-get-process-attributes, tramp-action-out-of-band): Simplify `cond' call. (tramp-check-cached-permissions): Simplify. (tramp-make-tramp-temp-file): Reimplement. * test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit): Don't set. * test/lisp/net/tramp-tests.el (tramp--test-enabled): Remove superfluous test files. (tramp-test21-file-links): Protect file name deletion.
* Tramp code cleanupMichael Albinus2022-07-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-get-connection-property): Make DEFAULT optional. Adapt callees. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-compat.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-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sshfs.el: * lisp/net/trampver.el: Code cleanup. * test/lisp/net/tramp-tests.el (tramp--test-sh-no-ls--dired-p) (tramp--test-with-proper-process-name-and-buffer): Code cleanup.
* Improve Tramp debuggingMichael Albinus2022-06-151-1/+1
| | | | | | * lisp/net/tramp-cache.el (tramp-list-connections): Fix docstring. * lisp/net/tramp.el (tramp-backtrace): New optional arg FORCE.
* Merge from origin/emacs-28Stefan Kangas2022-02-041-1/+1
|\ | | | | | | 0591aa6cd3 Revert an erroneous change in tramp-cache.el
| * Revert an erroneous change in tramp-cache.elMichael Albinus2022-02-031-1/+1
| | | | | | | | | | | | * lisp/net/tramp-cache.el (tramp-get-hash-table): Use `string-match-p' instead of `string-search'. The latter one was introduced by accident. Reported by Kai Tetzlaff <kai@tetzlaff.eu>.
* | Morka handling of multi-hops in Tramp more consistentMichael Albinus2022-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-make-tramp-file-name): Adapt argument list. Add hops to `tramp-default-proxies-alist'. (tramp-find-foreign-file-name-handler): Adapt argument list. (tramp-handle-abbreviate-file-name): Abbreviate multi-hops. (tramp-handle-file-remote-p): Adapt handling of hops. (tramp-add-hops): New defun. (tramp-compute-multi-hops): Use it. * lisp/net/tramp.el (tramp-make-tramp-hop-name, tramp-get-buffer) (tramp-file-name-handler, tramp-handle-file-truename) (tramp-handle-insert-file-contents, tramp-local-host-p) (tramp-read-passwd, tramp-clear-passwd): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name) (tramp-archive-gvfs-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-make-process, tramp-sh-handle-process-file) (tramp-sh-file-name-handler-p, tramp-get-remote-path): * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename): Adapt callees. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test07-abbreviate-file-name): Adapt tests.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4