summaryrefslogtreecommitdiff
path: root/test/lisp/net/tramp-archive-tests.el
Commit message (Collapse)AuthorAge
* Merge from origin/emacs-29Stefan Kangas2023-01-23
|\ | | | | | | | | | | | | | | b875c9bf67e Fix file-regular-p in Tramp 63fa225d443 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/... 9f5d6c541e5 ; * doc/emacs/custom.texi (Init Rebinding): Fix wording i... a91b435d0d5 ; Reword user documentation on binding keys in Lisp 0400de6a7de Fix typo in c-ts-mode (bug#60932)
| * Fix file-regular-p in TrampMichael Albinus2023-01-21
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test18-file-attributes) (tramp-archive-test21-file-links): * test/lisp/net/tramp-tests.el (tramp-test18-file-attributes) (tramp-test21-file-links): Adapt tests. * lisp/net/tramp.el (tramp-handle-file-regular-p): Fix symlink case. (Bug#60943)
* | Complete implementation of `file-user-id'Michael Albinus2023-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/ange-ftp.el (ange-ftp-file-user-uid): New defun. Mark it as file name handler for `file-user-uid'. * lisp/net/tramp-archive.el (tramp-archive-handle-file-user-uid): Move up. Protect `file-user-id' call for older Emacs versions. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Remove 'file-user-uid'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test44-file-user-uid): New test. (tramp-archive-test48-auto-load) (tramp-archive-test48-delay-load): Rename. * test/lisp/net/tramp-tests.el (tramp-test44-file-user-uid): New test. (tramp--test-asynchronous-requests-timeout): Adapt docstring. (tramp-test45-asynchronous-requests) (tramp-test46-dired-compress-file) (tramp-test46-dired-compress-dir, tramp-test47-read-password) (tramp-test48-auto-load, tramp-test48-delay-load) (tramp-test48-recursive-load, tramp-test48-remote-load-path) (tramp-test49-unload): Rename.
* | Upgrade to length* functions in TrampMichael Albinus2023-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region): Move up. (tramp-compat-length<, tramp-compat-length>) (tramp-compat-length=): New defaliases. (tramp-compat-file-name-unquote, tramp-compat-take) (tramp-compat-ntake): Use them. * lisp/net/tramp.el (tramp-string-empty-or-nil-p): New defsubst. (tramp-find-host, tramp-buffer-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-buffer-name) (tramp-completion-handle-file-name-all-completions) (tramp-handle-directory-file-name) (tramp-handle-expand-file-name) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-completion) (tramp-direct-async-process-p, tramp-call-process) (tramp-read-passwd): * lisp/net/tramp-adb.el (tramp-adb-get-device) (tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection): * lisp/net/tramp-archive.el (tramp-archive-handle-directory-file-name): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handle-get-home-directory) (tramp-gvfs-handler-askpassword) (tramp-gvfs-maybe-open-connection, tramp-get-media-devices): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-directory-p) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-make-process) (tramp-sh-gio-monitor-process-filter, tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-make-copy-program-file-name): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-expand-file-name, tramp-smb-handle-file-acl) (tramp-smb-handle-insert-directory) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-get-home-directory) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name) (tramp-sudoedit-handle-file-name-all-completions): Use the new functions. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test43-file-system-info): * test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion) (tramp-test31-memory-info, tramp-test35-remote-path) (tramp-test43-file-system-info): Use new compat functions.
* | Remove Emacs 26 compatibility from TrampMichael Albinus2023-01-06
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-01
|
* ; Fix typos (don't abbreviate "with" or "without")Stefan Kangas2022-12-01
|
* Make use of rx in Tramp backward compatobleMichael Albinus2022-09-09
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-rx--runtime-params): New defvar. (tramp-compat-rx--transform-items) (tramp-compat-rx--transform-item, tramp-compat-rx--transform): New defuns. Suggested by Mattias EngdegÄrd <mattiase@acm.org>. (tramp-compat-rx): New defalias or defmacro. (tramp-compat-string-replace, tramp-compat-string-search): Use regexp-quote. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `tramp-compat-rx' where indicated. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `tramp-compat-rx' where indicated.
* Use secondary groups when checking permissions in Tramp (Bug#57044)Michael Albinus2022-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Refactor TrampMichael Albinus2022-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add test for Tramp password handlingMichael Albinus2022-04-25
| | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-error-show-message-timeout): New defvar. (tramp-error-with-buffer, tramp-user-error): Use it. * test/lisp/net/tramp-tests.el (tramp-error-show-message-timeout): Set it to nil. (tramp-test46-read-password): New test. (tramp-test47-auto-load, tramp-test47-delay-load) (tramp-test47-recursive-load, tramp-test47-remote-load-path) (tramp-test48-unload): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test47-auto-load) (tramp-archive-test47-delay-load): Rename.
* Merge from origin/emacs-28Eli Zaretskii2022-04-16
|\ | | | | | | | | | | | | | | | | 84a2857722 Fix scrolling of the stack window in Calc 9dd44505b1 ; * src/window.c (Fset_window_start): Clarify the effect o... 24a6c7c8c0 Update and fix instructions and scripts for updating the W... 886339747b Extend tramp-archive-test45-auto-load ff997ad786 Ensure local `default-directory' in Tramp when needed 4f27588a16 Clarify "idleness" in the ELisp manual
| * Extend tramp-archive-test45-auto-loadMichael Albinus2022-04-08
| | | | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load): Extend test.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
| * Backport Tramp fixes, don't mergeMichael Albinus2021-11-24
| | | | | | | | | | | | | | | | * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Use `tramp-handle-file-readable-p'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test02-file-name-dissect): Use `make-tramp-file-name'.
* | Remove Emacs 25 compatibility from TrampMichael Albinus2021-11-12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Remote programs, Remote processes) (Frequently Asked Questions): Adapt Emacs versions. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.6.0-pre". * lisp/net/tramp-adb.el (top): Don't use `tramp-compat-funcall' for connection-local functions. * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-handle-temporary-file-directory) (tramp-compat-temporary-file-directory-function) (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-access-time) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-status-change-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes, tramp-file-missing) (tramp-compat-file-missing, tramp-compat-file-local-name): Remove. (tramp-compat-file-name-quoted-p, tramp-compat-file-name-quote) (tramp-compat-file-name-unquote) (tramp-compat-progress-reporter-update) (tramp-compat-file-modes, tramp-compat-set-file-modes) (tramp-compat-set-file-times, tramp-compat-directory-files) (tramp-compat-directory-files-and-attributes): Adapt implementation. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Adapt callees. * lisp/net/tramp-crypt.el (tramp-crypt-config-file-name): Expand file name. * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-readable-p): Remove. * lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Don't check Emacs version. (tramp-gvfs-handler-mounted-unmounted): Use `make-tramp-file-name'. * lisp/net/tramp-integration.el (rfn-eshadow-overlay): Remove declaration. (top): Don't use `tramp-compat-funcall' for connection-local functions. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Use `tramp-rclone-handle-file-readable-p'. (tramp-rclone-handle-file-readable-p): New defun. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Use `tramp-handle-file-readable-p'. * lisp/net/tramp.el (tramp-temp-name-prefix, tramp-lookup-syntax): Adapt docstring. (tramp-set-connection-local-variables) (tramp-set-connection-local-variables-for-buffer): Don't use `tramp-compat-funcall' for connection-local functions. (tramp-file-name-for-operation): Reorder list. (tramp-handle-make-symbolic-link): Don't handle TARGET and OK-IF-ALREADY-EXISTS. (tramp-read-passwd): Don't use `read-passwd' any longer. (top): Don't check for `interrupt-process-functions'. * test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs26-p): Remove. (tramp-archive-test02-file-name-dissect): Use `make-tramp-file-name'. (all): Replace Emacs 26 compatibility functions with their original name. (tramp-archive-test46-auto-load) (tramp-archive-test46-delay-load): Rename. * test/lisp/net/tramp-tests.el (dired-aux, seq): Require them. (dired-compress, connection-local-criteria-alist) (connection-local-profile-alist, async-shell-command-width): Don't declare. (all): Replace Emacs 26 compatibility functions with their original name. (tramp-test04-substitute-in-file-name) (tramp-test10-write-region, tramp-test11-copy-file) (tramp-test12-rename-file, tramp-test15-copy-directory) (tramp-test17-insert-directory) (tramp-test17-dired-with-wildcards, tramp-test21-file-links) (tramp-test31-interrupt-process) (tramp-test34-connection-local-variables) (tramp-test34-explicit-shell-file-name) (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters, tramp-test42-utf8) (tramp-test46-delay-load, tramp-test46-remote-load-path) (tramp-test47-unload): Don't check for Emacs 26 special features. (tramp--test-emacs26-p): Remove. (tramp--test-emacs29-p): New defun. (tramp-test45-dired-compress-file) (tramp-test45-dired-compress-dir): Use it. (tramp-test44-asynchronous-requests): Use `seq-random-elt'.
* Adapt Tramp testsMichael Albinus2021-10-20
| | | | | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load): Adapt code snippet. * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process): Adapt tests. (tramp--test-supports-set-file-modes-p): Renamed from `tramp--test-supports-file-modes-p'. Adapt all callees. (tramp-test35-exec-path): Use it.
* Implement file locks for remote files (Bug#49261)Michael Albinus2021-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
* Adapt tests in tramp-archive-tests.elMichael Albinus2021-06-20
| | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test05-expand-file-name) (tramp-archive-test06-directory-file-name): Adapt tests.
* Fix error in tramp-archive.elMichael Albinus2021-06-19
| | | | | | | | * lisp/net/tramp-archive.el (tramp-archive-file-name-handler): Archive must exist. (Bug#49030, Bug#49043) * test/lisp/net/tramp-archive-tests.el (tramp-archive-test06-directory-file-name): Tag it :unstable temporarily.
* Fix bug#48476Michael Albinus2021-05-22
| | | | | | | | | | | | | | | | * lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler): Add implementation. * lisp/net/tramp-integration.el (tramp-rename-files) (tramp-rename-these-files): Declare them. * lisp/net/tramp.el (tramp-autoload-file-name-handler): Load tramp-archive.el if needed. (Bug#48476) * test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load): Extend test. Use #' syntax for function symbols.
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* ; Fix license statement in several filesStefan Kangas2020-10-28
| | | | Add the line "This file is part of GNU Emacs."
* Make last change in tramp-archive-tests.el backward compatibleMichael Albinus2020-10-16
| | | | | | | * test/lisp/net/tramp-archive-tests.el (ert-resource-directory-format) (ert-resource-directory-trim-left-regexp) (ert-resource-directory-trim-right-regexp, ert-resource-directory) (ert-resource-file): Define if they don't exist.
* Use new resource directory macros in tests (Bug#43792)Stefan Kangas2020-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/bookmark-tests.el (bookmark-tests-data-dir): * test/lisp/calendar/todo-mode-tests.el (todo-test-data-dir): * test/lisp/net/dbus-tests.el (dbus--tests-dir): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-sample-code-file): * test/lisp/emacs-lisp/package-tests.el (package-test-fake-contents-file): * test/lisp/emacs-lisp/shadow-tests.el (shadow-tests-data-directory): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-file-dir, testcover-tests-test-cases): * test/lisp/mail/uudecode-tests.el (uudecode-tests-data-dir): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-resource-directory): * test/lisp/pcmpl-linux-tests.el (pcmpl-linux-tests-data-dir): * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-tests-data-directory): * test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory): * test/lisp/progmodes/ruby-mode-tests.el (ruby-mode-tests-data-dir): * test/lisp/saveplace-tests.el (saveplace-tests-dir): * test/lisp/textmodes/css-mode-tests.el (css-mode-tests-data-dir): Remove. * test/lisp/bookmark-tests.el (bookmark-tests-bookmark-file) (bookmark-tests-example-file, bookmark-tests-bookmark-file-list): * test/lisp/calendar/todo-mode-tests.el (todo-test-file-1) (todo-test-archive-1, with-todo-test, todo-test--add-file): * test/lisp/custom-tests.el (custom--test-theme-variables): * test/lisp/net/dbus-tests.el (dbus--test-introspect): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-setup-code-file): * test/lisp/emacs-lisp/package-tests.el (package-test-data-dir) (package-test-desc-from-buffer, package-test-install-single) (package-test-macro-compilation) (package-test-install-prioritized) (package-test-install-multifile, package-test-update-archives) (package-test-update-archives-async) (package-test-update-archives/ignore-nil-entry) (package-test-signed, package-x-test-upload-buffer) (package-x-test-upload-new-version): * test/lisp/emacs-lisp/shadow-tests.el (shadow-case-insensitive): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-build-test-cases): * test/lisp/mail/uudecode-tests.el (uudecode-tests-encoded-str) (uudecode-tests-decoded-str): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-file-archive) (tramp-archive-test-directory): * test/lisp/pcmpl-linux-tests.el (pcmpl-linux-test-fs-types) (pcmpl-linux-test-mounted-directories): * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-10483) (cperl-mode-test-indent-styles): * test/lisp/progmodes/flymake-tests.el (flymake-tests--call-with-fixture): * test/lisp/progmodes/ruby-mode-tests.el (ruby--indent/converted-from-manual-test): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/dir) (saveplace-test-load-alist-from-file): * test/lisp/textmodes/css-mode-tests.el (css-mode-test-indent): Adjust to use new resource directory macros.
* Fix a conversion failure in tramp-archive-tests (Bug#43353)Michael Albinus2020-09-13
| | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-file-archive-hexlified): New defun. (tramp-archive-test02-file-name-dissect): Use it. (Bug#43353)
* Merge from origin/emacs-27Glenn Morris2020-04-15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5f7c26907 (origin/emacs-27) * admin/authors.el: Add an author alias. d87a4d1f4e Limit RLIMIT_NOFILE to FD_SETSIZE on macOS e5ca8e5e73 Fix Elisp manual entry on 'set-window-configuration' 485f24223f ; Update ChangeLog.3 8f200254fb ; Update etc/AUTHORS c7adc851ad * admin/authors.el: Add missing author aliases. 4acdd7fe58 Fix edge case errors in filename-matching regexps 5f36e21fe5 Clarify the doc string of 'yank' 13301d4266 New function erc-track-switch-buffer-other-window 38f7538d8f New function erc-switch-to-buffer-other-window # Conflicts: # etc/NEWS
| * Fix edge case errors in filename-matching regexpsMattias EngdegÄrd2020-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes fix actual or latent bugs in regexps that match file names, such as PATTERN arguments to 'directory-files'. See https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html * admin/authors.el (authors-obsolete-files-regexps) (authors-renamed-files-regexps): * lisp/auth-source-pass.el (auth-source-pass-entries): * lisp/calendar/todo-mode.el (todo-show, todo-find-filtered-items-file) (todo-filter-items, todo-reset-nondiary-marker, todo-reset-done-string) (todo-reset-comment-string, todo-reset-highlight-item): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches): * lisp/cedet/semantic/texi.el (semantic-texi-associated-files): * lisp/cedet/srecode/map.el (srecode-map-update-map): * lisp/dired.el (dired-re-no-dot): * lisp/emacs-lisp/autoload.el (update-directory-autoloads): * lisp/emacs-lisp/shadow.el (load-path-shadows-find): * lisp/files.el (auto-mode-alist, directory-files-no-dot-files-regexp): * lisp/finder.el (finder-compile-keywords): * lisp/generic-x.el (inetd-conf-generic-mode, named-boot-generic-mode) (resolve-conf-generic-mode, etc-modules-conf-generic-mode): * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview) (gnus-agent-regenerate-group, gnus-agent-update-files-total-fetched-for): * lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group): * lisp/gnus/gnus-score.el (gnus-score-search-global-directories): * lisp/gnus/gnus-util.el (gnus-delete-directory): * lisp/gnus/gnus-uu.el (gnus-uu-dir-files): * lisp/gnus/nndraft.el (nndraft-request-group): * lisp/gnus/nnmh.el (nnmh-request-group, nnmh-request-create-group): (nnmh-request-delete-group, nnmh-active-number, nnmh-update-gnus-unreads): * lisp/gnus/nnspool.el (nnspool-request-group): * lisp/gnus/spam-stat.el (spam-stat-process-directory) (spam-stat-test-directory): * lisp/help-fns.el (help-fns--first-release): * lisp/help.el (view-emacs-news): * lisp/international/quail.el (quail-update-leim-list-file): * lisp/international/titdic-cnv.el (batch-titdic-convert): * lisp/mail/mspools.el (mspools-set-vm-spool-files) (mspools-get-spool-files): * lisp/mail/rmail.el (rmail-secondary-file-regexp) (rmail-speedbar-match-folder-regexp): * lisp/net/ange-ftp.el (ange-ftp-delete-directory): * lisp/net/tramp.el (tramp-use-absolute-autoload-file-names): * lisp/obsolete/gulp.el (gulp-send-requests): * lisp/obsolete/vc-arch.el (vc-arch-trim-revlib): * lisp/org/ob-core.el (org-babel-remove-temporary-directory): * lisp/progmodes/ebnf2ps.el (ebnf-file-suffix-regexp, ebnf-style-database): * lisp/progmodes/executable.el (executable-command-find-posix-p): * lisp/startup.el (command-line): * lisp/textmodes/refer.el (refer-get-bib-files): * lisp/url/url-about.el (url-probe-protocols): * lisp/vc/vc-rcs.el (vc-rcs-register, vc-rcs-unregister): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test19-directory-files-and-attributes): * test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes): Replace ^ and $ with \` and \', respectively. Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.", to match anything but "." and "..", instead of several incorrect regexps.
* | Sync with Tramp 2.5.0-preMichael Albinus2020-01-19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Suppress superfluous messages in tramp-testsMichael Albinus2019-12-01
| | | | | | | * test/lisp/net/tramp-tests.el (tramp-test10-write-region) (tramp-test10-write-region-file-precious-flag) (tramp-test34-connection-local-variables) (tramp-test36-vc-registered): Let-bind `inhibit-message'.
* Adapt Tramp docstrings according to checkdocMichael Albinus2019-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
* Adapt some Tramp testsMichael Albinus2019-10-12
| | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test17-insert-directory): Adapt regexp of summary line. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test for symlinked directories.
* Stronger check for Tramp methodMichael Albinus2019-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection): Use `tramp-get-connection-name'. * 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): Don't check remote TARGET. * lisp/net/tramp.el (tramp-dissect-file-name): Check for proper method. (tramp-file-name-for-operation): Take only 2nd argument into account for file name handler. (tramp-file-name-handler): Suppress checks for `file-remote-p'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test02-file-name-dissect): Suppress check for wrong method. * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case): Dump *all* Tramp buffers. (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate): Check also wrong method. (tramp-test03-file-name-defaults): Check, that the respective Tramp package is loaded. (tramp-test04-substitute-in-file-name) (tramp-test05-expand-file-name) (tramp-test06-directory-file-name, tramp-test44-auto-load): Suppress check for wrong method. (tramp-test30-make-process): Remove instrumentation code. (tramp-test31-interrupt-process, tramp-test36-vc-registered): Guarantee that connection is established prior starting process.
* Adapt test names in tramp-archive-tests.elMichael Albinus2019-02-28
| | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test39-make-nearby-temp-file) (tramp-archive-test42-file-system-info) (tramp-archive-test45-auto-load) (tramp-archive-test45-delay-load): Rename.
* Use proper read syntax for all function names in TrampMichael Albinus2019-02-28
| | | | | | | | | | | | | | | | | | | * 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-ftp.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: * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use proper read syntax for all function names.
* Implement access-file in TrampMichael Albinus2019-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-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-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `access-file'. * lisp/net/tramp-archive.el (tramp-archive-handle-access-file): * lisp/net/tramp.el (tramp-handle-access-file): New defun. (tramp-condition-case-unless-debug): Add declaration. (tramp-handle-insert-directory): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Check, whether directory is accessible. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test17-insert-directory) (tramp-archive-test18-file-attributes): * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory) (tramp-test18-file-attributes): Test error cases.
* Adapt `accept-process-output' arguments in tramp-testsMichael Albinus2019-01-29
| | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test31-interrupt-process) (tramp-test32-shell-command) (tramp--test-shell-command-to-string-asynchronously) (tramp-test43-asynchronous-requests): Adapt `accept-process-output' arguments.
* Update more copyright yearsPaul Eggert2018-12-31
| | | | | | | | Update some other copyright years automatically, by running: Run 'UPDATE_COPYRIGHT_YEAR=2019 \ UPDATE_COPYRIGHT_USE_INTERVALS=1 \ UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 admin/update-copyright' followed by 'admin/merge-gnulib'.
* Reduce autoloaded objects in TrampMichael Albinus2018-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected, tramp-adb-prompt): Remove autoload cookie. * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name): Remove autoload cookie. * lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp): Use `tramp-autoload' cookie. * lisp/net/tramp-gvfs.el (tramp-gvfs-zeroconf-domain): Remove autoload cookie. * lisp/net/tramp-rclone.el (tramp-rclone-program): Remove autoload cookie. (tramp-set-completion-function): Use `tramp--with-startup'. * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-histfile-override) (tramp-use-ssh-controlmaster-options, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args): Remove autoload cookie. (tramp-stat-marker, tramp-stat-quoted-marker): Move to tramp.el. * lisp/net/tramp-smb.el (tramp-smb-program) (tramp-smb-acl-program, tramp-smb-conf) (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): Remove autoload cookie. * lisp/net/tramp-sudoedit.el (server, tramp-sh): Do not require. * lisp/net/tramp.el (tramp--startup-hook): Define. (tramp-stat-marker, tramp-stat-quoted-marker): New defconsts, taken from tramp-sh.el. * test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit) (tramp-persistency-file-name): Declare. * test/lisp/net/tramp-tests.el (tramp-connection-properties) (tramp-display-escape-sequence-regexp) (tramp-inline-compress-start-size, tramp-remote-path): Declare.
* Tag expensive tests in tramp-archive.el (Bug#30807)Michael Albinus2018-08-08
| | | | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test44-auto-load) (tramp-archive-test44-delay-load): Rename. (tramp-archive-test07-file-exists-p) (tramp-archive-test08-file-local-copy) (tramp-archive-test09-insert-file-contents) (tramp-archive-test11-copy-file) (tramp-archive-test15-copy-directory) (tramp-archive-test16-directory-files) (tramp-archive-test17-insert-directory) (tramp-archive-test18-file-attributes) (tramp-archive-test19-directory-files-and-attributes) (tramp-archive-test20-file-modes) (tramp-archive-test21-file-links) (tramp-archive-test26-file-name-completion) (tramp-archive-test44-auto-load) (tramp-archive-test44-delay-load): Tag them as :expensive-test, because they run longer than 10 seconds. (Bug#30807)
* Implement command completion in remote shells. (Bug#31704)Michael Albinus2018-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Locating Files): Describe optional argument REMOTE of `executable-find'. (Magic File Names): Add `exec-path'. * doc/lispref/processes.texi (Subprocess Creation): Describe function `exec-path'. * doc/misc/tramp.texi (Remote programs): Explain refresh of search paths by `tramp-cleanup-this-connection'. * etc/NEWS: Mention 'exec-path' and 'executable-find'. * lisp/files.el (exec-path): New defun. (executable-find): Add optional argument REMOTE. * lisp/shell.el (shell-completion-vars): Set `comint-file-name-prefix'. (shell--command-completion-data): Use `(exec-path)'. (Bug#31704) * lisp/net/ange-ftp.el (exec-path): * 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-gvfs.el (tramp-gvfs-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) <exec-path>: Add handler. * lisp/net/tramp-adb.el (tramp-adb-handle-exec-path): New defun. (tramp-adb-maybe-open-connection): Do not set "remote-path" connection property. * lisp/net/tramp-compat.el (tramp-compat-exec-path): New defun. * lisp/net/tramp-sh.el (tramp-sh-handle-exec-path): New defun. * lisp/net/tramp.el (tramp-eshell-directory-change): Use it. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test38-make-nearby-temp-file) (tramp-archive-test41-file-system-info) (tramp-archive-test43-auto-load) (tramp-archive-test43-delay-load): Rename. * test/lisp/net/tramp-tests.el (tramp-test34-exec-path): New test. (tramp-test36-make-auto-save-file-name) (tramp-test37-find-backup-file-name) (tramp-test38-make-nearby-temp-file) (tramp-test39-special-characters) (tramp-test39-special-characters-with-stat) (tramp-test39-special-characters-with-perl) (tramp-test39-special-characters-with-ls, tramp-test40-utf8) (tramp-test40-utf8-with-stat, tramp-test40-utf8-with-perl) (tramp-test40-utf8-with-ls, tramp-test41-file-system-info) (tramp-test42-asynchronous-requests, tramp-test43-auto-load) (tramp-test43-delay-load, tramp-test43-recursive-load) (tramp-test43-remote-load-path, tramp-test44-unload): Rename.
* Optimize "make check" and "make check-maybe"Michael Albinus2018-03-16
| | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-run-tests-batch): Print summary duration. * test/Makefile.in (TEST_LOAD_EL): Set default to "no" for targets all, check, and check-maybe. (Bug#30807) * test/README: Reflect recent changes in Makefile. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test99-libarchive-tests): Tag it :unstable.
* Fix an error in tramp-archive-test42-auto-loadMichael Albinus2018-03-15
| | | | | * test/lisp/net/tramp-archive-tests.el (tramp-archive-test42-auto-load): Do not use "/ssh::" as test directory, it could harm. (Bug#30807)
* Make tramp-archive fit for older EmacsenMichael Albinus2018-02-04
| | | | | | | | | | | | | | | | | * lisp/net/tramp-archive.el (tramp-archive-enabled) (tramp-archive-file-name-handler-alist) (tramp-archive-file-name-handler): Adapt docstring. (tramp-register-archive-file-name-handler): Remove it from `after-init-hook' when unloading. (tramp-archive-gvfs-host): New defsubst. (tramp-archive-dissect-file-name): Use it. * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Check that `tramp-archive-enabled' is bound. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test42-auto-load): Check also that tramp-archive is not loaded when Tramp is loaded. (tramp-archive-test42-delay-load): Adapt test messages.
* Prevent loading tramp-archive when it cannot be usedMichael Albinus2018-02-03
| | | | | | | | | | | | | | | | | | | | | * lisp/files.el (locate-dominating-file): Check, that FILE is a directory when traversing the tree. * lisp/net/tramp-archive.el (tramp-archive-enabled): New defvar. (tramp-archive-file-name-regexp): Protect against errors. (tramp-archive-file-name-handler) (tramp-register-archive-file-name-handler): Use it. (all) Call `tramp-register-archive-file-name-handler'. * lisp/net/tramp.el (tramp-register-file-name-handlers): Use `tramp-archive-enabled'. * test/lisp/net/tramp-archive-tests.el (all): Use `tramp-archive-enabled' instead of `tramp-gvfs-enabled'. (tramp-archive--test-emacs27-p): New defun. (tramp-archive-test42-auto-load): Skip for older Emacsen. (tramp-archive-test42-delay-load): Skip for older Emacsen. Test also behavior when `tramp-archive-enabled' is nil.
* Autoload tramp-archiveMichael Albinus2018-02-03
| | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Archive file names): Do not require to load Tramp explicitly, this is autoloaded now also for file archives. * lisp/net/tramp-archive.el (tramp-archive-suffixes) (tramp-archive-compression-suffixes): Autoload them. (tramp-archive-autoload-file-name-regexp): New defmacro. (tramp-archive-file-name-regexp): Use it. (tramp-register-archive-file-name-handler): New defun. Call it in `after-init-hook'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-file-system-info): Rename from `tramp-archive-test40-archive-file-system-info. (tramp-archive-test42-auto-load) (tramp-archive-test42-delay-load): New tests.