summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-crypt.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Fix typosStefan Kangas2024-01-201-1/+1
|
* Sync with Tramp 2.6.3-pre (don't merge with master)Michael Albinus2024-01-201-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Obtaining @value{tramp}): Mention the ELPA Tramp manual. (Remote processes): Adapt index. * doc/misc/trampver.texi: * lisp/net/trampver.el (tramp-version): Set to "2.6.3-pre". * lisp/net/tramp.el (tramp-local-host-regexp): Extend. Adapt :version. (tramp-signal-process): PROCESS can also be a string. (tramp-skeleton-directory-files): * 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.el (tramp-skeleton-file-name-all-completions): Handle "." and "..". * lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions): * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions): Remove special handling of "." an "..". * lisp/net/tramp-sh.el (tramp-pipe-stty-settings): New defcustom. (tramp-sh-handle-make-process): Use it. (Bug#62093) * test/lisp/net/tramp-tests.el (tramp-test18-file-attributes): Adapt test. (tramp-test31-signal-process): Extend.
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* Make Tramp aware of completion-regexp-list (don't merge)Michael Albinus2023-11-171-1/+1
| | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-skeleton-file-name-all-completions): New defmacro. (tramp-completion-handle-file-name-all-completions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions): * lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions): * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions): * lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-name-all-completions): Use it.
* Sync with Tramp 2.6.2-preMichael Albinus2023-08-051-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Overview): Use "scp" in example. (Obtaining @value{tramp}): Prefer https: to git: URIs on Savannah. (Ssh setup): Extend for MS Windows and ssh. Explain tramp-use-ssh-controlmaster-options value `suppress'. (File name completion): Remove completion styles restrictions. (Ad-hoc multi-hops): Describe tramp-show-ad-hoc-proxies. (Remote processes): Add reference to "Using ssh connection sharing". * doc/misc/trampver.texi: * lisp/net/trampver.el (tramp-version): Set to "2.6.2-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions): * lisp/net/tramp-archive.el (tramp-archive-handle-file-name-all-completions): * lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions): * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions): * lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-name-all-completions): Return nil when DIRECTORY is missing. (Bug#61890) * lisp/net/tramp.el (tramp-accept-process-output): Don't use TIMEOUT anymore, default it to 0. When the connection uses a shared socket possibly, accept also the output from other processes over the same connection. (Bug#61350) (tramp-handle-file-notify-rm-watch, tramp-action-process-alive) (tramp-action-out-of-band, tramp-process-one-action) (tramp-interrupt-process): * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch): * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): * lisp/net/tramp-smb.el (tramp-smb-action-get-acl) (tramp-smb-action-set-acl, tramp-smb-wait-for-output): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo): Adapt callees. * lisp/net/tramp.el (tramp-get-process, tramp-message) (tramp-handle-make-process, tramp-handle-file-notify-valid-p) (tramp-process-actions, tramp-accept-process-output) (tramp-process-sentinel, tramp-read-passwd) (tramp-interrupt-process, tramp-signal-process): * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-barf-if-no-shell-prompt, tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection) (tramp-sudoedit-send-command): Prefix internal process properties with "tramp-". * lisp/net/tramp.el (tramp-skeleton-file-exists-p): New defmacro, which also handles host name completion. (tramp-handle-file-exists-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p): * lisp/net/tramp-sh.el (tramp-sh-handle-file-exists-p): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-exists-p): Use it. * lisp/net/tramp.el (tramp-wrong-passwd-regexp): * lisp/net/tramp-adb.el (tramp-adb-prompt): * lisp/net/tramp-sh.el (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Unify regexps. * lisp/net/tramp.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: Fix error messages. * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Protect `delete-process'. * 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): * lisp/net/tramp-compat.el (tramp-syntax): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): Rearrange declarations. * lisp/net/tramp-compat.el (ansi-color): Require. (ls-lisp): Don't require. (Bug#64124) (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-container.el (tramp-container--completion-function): Rename from `tramp-docker--completion-function'. Add argument PROGRAM. Use it for "docker" and "podman" host name completion. * lisp/net/tramp-crypt.el (tramp-crypt-handle-file-exists-p): New defun. (tramp-crypt-file-name-handler-alist): Add it. * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-exists-p): New defun. (tramp-fuse-mount-timeout): Move up. (tramp-fuse-mount-point): Use `tramp-fuse-mount-timeout'. (tramp-fuse-unmount): Flush "mount-point" file property. (tramp-fuse-mount-point, tramp-fuse-mounted-p): Support existing mount points. (tramp-fuse-mounted-p): The mount-spec could contain an optional trailing slash. (Bug#64278) * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file): Improve stability for WebDAV. (tramp-rclone-handle-file-system-info): Check return code of command. * lisp/net/tramp-gvfs.el (while-no-input-ignore-events): Add `dbus-event' for older Emacs versions. (tramp-gvfs-parse-device-names): Ignore errors. * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Delete. (tramp-sh-handle-insert-directory, tramp-barf-if-no-shell-prompt) (tramp-wait-for-output): Use `ansi-color-control-seq-regexp'. (tramp-use-ssh-controlmaster-options): Allow new value `suppress'. (tramp-ssh-option-exists-p): New defun. (tramp-ssh-controlmaster-options): Implement `suppress' actions. Should never return nil, but empty string. (tramp-perl-file-name-all-completions): Don't print status message. (tramp-sh-handle-file-name-all-completions): Return nil when check fails. (Bug#61890) (tramp-run-test): Add VEC argument. (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 callees. (tramp-sh-handle-insert-directory): (tramp-sh-handle-insert-directory): Test whether -N is understood by ls since that option is used along with --dired. Remove -N when we remove --dired. (Bug#63142) (tramp-sh-handle-insert-directory, tramp-barf-if-no-shell-prompt) (tramp-wait-for-output): Use `ansi-color-control-seq-regexp'. (tramp-sh-handle-expand-file-name): `null-device' could be nil. Reported by Richard Copley <rcopley@gmail.com>. (tramp-sh-handle-make-process): Improve handling of connection-type `pipe'. (Bug#61341) * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link): Flush TARGET file properties. * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): Flush proper file properties. (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl): Remove superfluous `unwind-protect'. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Use `tramp-fuse-handle-file-exists-p'. (tramp-sshfs-handle-insert-file-contents): Move result out of unwindform. * lisp/net/tramp.el (tramp-string-empty-or-nil-p): New defsubst. Use it everywhere when appropriate. * lisp/net/tramp.el (tramp-methods) <->: Add. (tramp-completion-file-name-handler-alist): Add `expand-file-name', `file-exists-p', `file-name-directory' and `file-name-nondirectory'. (tramp-dissect-file-name): Do not extra check for `tramp-default-method-marker'. (tramp-completion-handle-expand-file-name) (tramp-completion-handle-file-exists-p) (tramp-completion-handle-file-name-directory) (tramp-completion-handle-file-name-nondirectory): New defuns. (tramp-completion-handle-file-name-all-completions): Remove duplicates. (tramp-show-ad-hoc-proxies): New defcustom. (tramp-make-tramp-file-name): Use it. (tramp-make-tramp-hop-name): Don't add hop twice. (tramp-shell-prompt-pattern): Remove escape characters. (tramp-process-one-action, tramp-convert-file-attributes): Use `ansi-color-control-seq-regexp'. (Bug#63539) (tramp-wrong-passwd-regexp): Add "Authentication failed" string (from doas). (tramp-terminal-type): Fix docstring. (tramp-process-one-action): Delete ANSI control escape sequences in buffer. (Bug#63539) (tramp-build-completion-file-name-regexp): Support user name completion. (tramp-make-tramp-file-name): Keep hop while in file (tramp-set-completion-function): Check, that cdr of FUNCTION-LIST entries is a string. (tramp-completion-file-name-handler): Run only when `minibuffer-completing-file-name' is non-nil. (tramp-skeleton-write-region): Fix scoping. (Bug#65022) (tramp-handle-memory-info): Work on newly created objects, or use non-destructive operations. (tramp-accept-process-output): Use `with-local-quit'. (tramp-call-process, tramp-call-process-region): Let-bind `temporary-file-directory'. * test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs28-p): New defun. (tramp-archive-test16-directory-files): Don't mutate. (tramp-archive-test47-auto-load): Adapt test. * test/lisp/net/tramp-tests.el (tramp-display-escape-sequence-regexp): Dont't declare. (tramp-action-yesno): Suppress run in tests. (tramp-test02-file-name-dissect): (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate): Adapt tests. (tramp-test21-file-links): (tramp-test21-file-links, tramp-test26-file-name-completion) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test33-environment-variables) (tramp-test38-find-backup-file-name, tramp-test47-auto-load) (tramp-test39-detect-external-change, tramp-test42-utf8) (tramp-test47-auto-load, tramp-test47-delay-load) (tramp-test48-unload): Adapt tests. (tramp-test26-file-name-completion-with-perl): (tramp-test26-file-name-completion-with-ls) (tramp-test26-interactive-file-name-completion): New tests. (tramp-test44-asynchronous-requests): Mark as :unstable.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; * lisp/net/tramp-crypt.el: Fix comment.Michael Albinus2022-12-151-1/+1
|
* Extend memory-info for remote systemsMichael Albinus2022-11-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Magic File Names): Add memory-info. * doc/lispref/internals.texi (Garbage Collection): memory-info can also retrieve values from remote systems. * etc/NEWS: Document changes in memory-info. Fix typos. * lisp/files.el (warn-maybe-out-of-memory): Ensure local memory info. * lisp/net/tramp.el (tramp-handle-memory-info): New defun. (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 'memory-info'. * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-exec-path): Let-bind `process-file-side-effects'. * src/alloc.c (Fmemory_info): Support remote systems. (Qmemory_info): Declare. * test/lisp/net/tramp-tests.el (tramp-test31-memory-info): New test.
* ; Fix typosStefan Kangas2022-11-181-1/+1
|
* Improve don't save bookmark context from encrypted filesMichael Albinus2022-09-221-0/+8
| | | | | | | | | | | | | | | | * etc/NEWS: Mention 'bookmark-inhibit-context-functions'. Fix typos. * lisp/bookmark.el (bookmark-inhibit-context-functions): New defcustom. (bookmark-make-record): Use it. * lisp/auth-source-pass.el (auth-source-pass-file-name-p): * lisp/auth-source.el (auth-source-file-name-p): New defuns. Add them to `bookmark-inhibit-context-functions'. * lisp/epa-hook.el (epa-file-name-p): * lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Add them to `bookmark-inhibit-context-functions'.
* Ensure, that Tramp cache works over absolute file namesMichael Albinus2022-09-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Make use of rx in Tramp backward compatobleMichael Albinus2022-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * 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-061-0/+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.
* Use `rx' in Tramp where possibleMichael Albinus2022-08-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Make point-at-eol and point-at-bol obsoleteStefan Kangas2022-08-231-1/+1
| | | | | | | * lisp/subr.el (point-at-eol, point-at-bol): Make XEmacs compat aliases obsolete in favor of `pos-bol'/'line-beginning-position' or 'pos-eol'/'line-end-position'. Update callers. Ref: https://lists.gnu.org/r/emacs-devel/2022-08/msg00853.html
* Tramp code cleanupMichael Albinus2022-08-141-1/+1
| | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes): Use it. * lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region): New defalias. * lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file-name): Fix root filename for cache. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Adapt check for proper remote command. * lisp/net/tramp-sh.el (tramp-open-shell): Add sanity check for shell prompt. (tramp-get-ls-command): Check, that argument "--color=never" has the intended effect.
* Reorganize TrampMichael Albinus2022-08-031-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-86/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Merge from origin/emacs-28Stefan Kangas2022-07-191-43/+43
|\ | | | | | | | | | | | | | | 282dde887d ; Fix typo missed in previous change 62c47ffd5f ; * lisp/net/tramp-crypt.el: Improve commentary cba30431ff Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/e... 8f9993bb3f ; * src/buffer.c (syms_of_buffer) <mode-line-format>: Doc ... fec4bb89f9 ; Fix typos (Bug#56550)
| * ; Fix typo missed in previous changeRobert Pluim2022-07-181-1/+1
| |
| * ; * lisp/net/tramp-crypt.el: Improve commentaryRobert Pluim2022-07-181-20/+21
| |
| * ; Fix typos (Bug#56550)Stefan Kangas2022-07-181-41/+40
| |
| * Merge with Tramp 2.5.2.3 (Do not merge with master)Michael Albinus2022-04-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Archive file names): Explicitly say how to open an archive with Tramp (Bug#25076). * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.3-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-process-file) * lisp/net/tramp-sh.el (tramp-sh-handle-process-file): * lisp/net/tramp-smb.el (tramp-smb-handle-process-file): * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): Improve implementation. (Bug#53854) * lisp/net/tramp-adb.el (tramp-adb-tolerate-tilde): * lisp/net/tramp-sshfs.el (tramp-sshfs-tolerate-tilde): New defuns. Advice `shell-mode' with them. * lisp/net/tramp.el (tramp-register-autoload-file-name-handlers): * lisp/net/tramp-archive.el (tramp-register-archive-file-name-handler): Check, whether the real file name handler is already registered. rules. (Bug#54542) * lisp/net/tramp.el (tramp-autoload-file-name-handler) (tramp-register-autoload-file-name-handlers) (tramp-unload-file-name-handlers, tramp-unload-tramp): * lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp) (tramp-archive-autoload-file-name-handler) (tramp-register-archive-file-name-handler): Add `tramp-autoload' property. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Use `tramp-handle-file-notify-add-watch', `tramp-handle-file-notify-rm-watch' and `tramp-handle-file-notify-valid-p'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Use `tramp-handle-insert-file-contents'. * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection): Do not set "lock-pid" connection-property. (tramp-sudoedit-handle-delete-file): Use "rm -f". * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p): * lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p): Check also for setuid/setgid bit. (tramp-gvfs-handle-expand-file-name): Respect `tramp-tolerate-tilde'. * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Do not modify disk space information when `dired--insert-disk-space' is available. (Bug#54512) * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Extend suppression (tramp-get-remote-dev-tty): New defun. (tramp-sh-handle-make-process): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Add "-t -t" to `tramp-login-args'. Add "-o dir_cache=no" to `tramp-mount-args'. (Bug#54126) Add "-o transform_symlinks" to `tramp-mount-args'. (tramp-sshfs-file-name-handler-alist): Use `tramp-sshfs-handle-file-writable-p'. (tramp-sshfs-handle-file-writable-p): New defun. (Bug#54130) (tramp-sshfs-handle-write-region): Set file modification time. (Bug#54016) (tramp-sshfs-file-name-handler-alist): Use `tramp-sshfs-handle-set-file-times'. (tramp-sshfs-handle-set-file-times): New defun. * test/lisp/net/tramp-tests.el (tramp--test-expensive-test-p): Rename from `tramp--test-expensive-test'. Make it a defun. Adapt all callees. (tramp-test07-file-exists-p, tramp-test14-delete-directory) (tramp-test18-file-attributes, tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test33-environment-variables, tramp--test-check-files) (tramp--test-special-characters, tramp-test46-unload): Adapt tests. (tramp-test39-detect-external-change): New test. (tramp-test29-start-file-process) (tramp--test--deftest-direct-async-process) (tramp-test30-make-process, tramp-test31-interrupt-process) (tramp-test34-explicit-shell-file-name) (tramp-test44-asynchronous-requests): Add :tramp-asynchronous-processes tag. (tramp--test-asynchronous-processes-p): New defun. (tramp--test-hpux-p, tramp--test-macos-p): Protect against errors.
* | Use ntake in TrampMichael Albinus2022-07-181-1/+1
| | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-ntake): New defalias. * lisp/net/tramp.el (tramp-handle-directory-files): * lisp/net/tramp-crypt.el (tramp-crypt-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use it.
* | Tramp code cleanupMichael Albinus2022-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Handle remote system processesMichael Albinus2022-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Magic File Names): Add list-system-processes and process-attributes. * doc/lispref/processes.texi (System Processes): Document changes in list-system-processes and process-attributes. * doc/misc/tramp.texi (Customizing Completion): Use @ftable. (Remote processes): Document changes in list-system-processes and process-attributes. * etc/NEWS: Document changes in proced, list-system-processes and process-attributes. * lisp/proced.el (proced-show-remote-processes): New defcustom. (proced-remote-directory): Remove. (proced-filter-alist): Use it. (proced-user-name): New defun. (proced-available): Set it to t. (proced-mode): Adapt docstring. (proced): Adapt docstring. Acknowledge prefix argument. (proced-format): Change initialization of `standard-attributes'. (proced-send-signal, proced-renice): Adapt docstring. Remove special handling of prefix argument. * 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 'list-system-processes' and `process-attributes'. * lisp/net/tramp-integration.el (files-x): Require `files-x'. (tramp-bsd-process-attributes-ps-args) (tramp-bsd-process-attributes-ps-format) (tramp-connection-local-bsd-ps-variables) (tramp-busybox-process-attributes-ps-args) (tramp-busybox-process-attributes-ps-format) (tramp-connection-local-busybox-ps-variables): * lisp/net/tramp-adb.el (tramp-adb-connection-local-default-ps-variables): New defconsts. Add them to connection-local variables. * lisp/net/tramp.el (tramp-file-name-for-operation): Add 'list-system-processes' and `process-attributes'. (tramp-process-attributes-ps-args) (tramp-process-attributes-ps-format): New defconsts. (tramp-ps-time, tramp-get-process-attributes) (tramp-handle-list-system-processes) (tramp-handle-process-attributes): New defuns. * src/process.c (Flist_system_processes, Fprocess_attributes): Support remote system processes. (Qlist_system_processes, Qprocess_attributes): Declare symbols.
* | Rework `abbreviate-file-name' in TrampMichael Albinus2022-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add 'tramp-get-home-directory'. * lisp/net/tramp-compat.el (tramp-file-name-handler): Declare. (tramp-compat-exec-path): Use it. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-gvfs-handle-expand-file-name): Rewrite tilde handling. (tramp-gvfs-handle-get-home-directory): New defun. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-sh-handle-get-home-directory): New defun. (tramp-sh-handle-expand-file-name): Rewrite tilde handling. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-smb-handle-expand-file-name): Rewrite tilde handling. (tramp-smb-handle-get-home-directory): New defun. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add 'tramp-get-home-directory'. (tramp-sudoedit-handle-expand-file-name): Rewrite tilde handling. (tramp-sudoedit-handle-get-home-directory): New defun. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `tramp-get-home-directory'. (tramp-get-home-directory): New defun. (tramp-handle-abbreviate-file-name): Use it. (tramp-set-file-uid-gid, tramp-get-remote-uid) (tramp-get-remote-gid): Use `tramp-file-name-handler'. (tramp-get-remote-null-device): Do not check for null VEC, it doesn't happen anymore. * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative): Reorder checks. (tramp-test07-abbreviate-file-name): (tramp--test-ange-ftp-p): Adapt tests.
* | Fix problem with file-modification-time in tramp-sshfs.elMichael Albinus2022-02-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Use `tramp-handle-file-notify-add-watch', `tramp-handle-file-notify-rm-watch' and `tramp-handle-file-notify-valid-p'. (tramp-sshfs-handle-write-region): Set file modification time. (Bug#54016) * test/lisp/net/tramp-tests.el (tramp--test-asynchronous-processes-p): Filter out tramp-adb on multi-byte `default-directory'. (tramp--test-hpux-p, tramp--test-macos-p): Protect against errors. (tramp--test-check-files): Discriminate also tramp-sshfs.el.
* | Fix insert-file-contents for tramp-cryptMichael Albinus2022-01-261-1/+1
| | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Use `tramp-handle-insert-file-contents'.
* | Merge remote-tracking branch 'origin/emacs-28' into trunkStefan Monnier2022-01-121-1/+1
|\|
| * ; Fix typo loose/loseGlenn Morris2022-01-121-1/+1
| |
* | 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
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Use `permission-denied' in Tramp tests, and moreMichael Albinus2021-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection): Simplify code. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-system-info): Adapt for "mtp" method. * test/lisp/net/tramp-tests.el (tramp-test18-file-attributes): Use `permission-denied' error. Simplify code. (tramp-test24-file-acl, tramp-test26-file-name-completion): Simplify code.
* | Some minor Tramp updatesMichael Albinus2021-11-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-add-directory): Add comment. * lisp/net/tramp.el (tramp-debug-buffer-command-completion-p) (tramp-setup-debug-buffer): New defuns. (tramp-get-debug-buffer): Call `tramp-setup-debug-buffer. * test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name): Extend test.
* | Fix minor problems resulting from Tramp regression testsMichael Albinus2021-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-sshfs.el (tramp-sshfs-file-name-handler-alist): Add comment. * lisp/net/tramp-cache.el (tramp-flush-file-upper-properties): FILE can be "~". * lisp/net/tramp.el ('tramp-ensure-dissected-file-name): Add `tramp-suppress-trace' property. (tramp-get-debug-buffer): Add local key for debugging. (tramp-handle-abbreviate-file-name): Adapt implementation. * test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name): Adapt test. (tramp-test17-insert-directory-one-file) (tramp--test-check-files): Use proper `no-dir' argument for `dired-get-filename'.
* | Remove Tramp's `dired-compress-file' handler, not needed anymoreMichael Albinus2021-11-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/dired-aux.el (dired-check-process, dired-shell-command): Call `dired-uncache'. (dired-compress-file): Use `file-local-name'. * 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-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): Remove superfluous comment. * lisp/net/tramp-sh.el (dired-compress-file): Declare. (tramp-sh-handle-dired-compress-file): Call real handler for Emacs >= 29. * lisp/net/tramp.el (tramp-file-name-for-operation): Reorder list. * test/lisp/net/tramp-tests.el (tramp-test45-dired-compress-file) (tramp-test45-dired-compress-dir): Adapt comment.
* | Remove Emacs 25 compatibility from TrampMichael Albinus2021-11-121-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* | Prefer locate-user-emacs-fileStefan Kangas2021-11-091-3/+2
|/ | | | | | | | | | | * lisp/cmuscheme.el (scheme-start-file): * lisp/erc/erc.el (erc-startup-file-list): * lisp/net/nsm.el (nsm-settings-file): * lisp/net/tramp-crypt.el (tramp-crypt-config-file-name): * lisp/org/org-clock.el (org-clock-persist-file): * lisp/org/org-id.el (org-id-locations-file) * lisp/shell.el (shell): Prefer 'locate-user-emacs-file' to fiddling with 'user-emacs-directory' directly.
* Fix tramp-compat-temporary-file-directory implementationMichael Albinus2021-09-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-archive.el (tramp-archive-handle-temporary-file-directory): Use `tramp-compat-temporary-file-directory-function'. * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory): Make it a defconst. * lisp/net/tramp.el (tramp-get-debug-buffer, tramp-get-debug-file-name) (tramp-debug-message, tramp-file-name-handler, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts) (tramp-handle-expand-file-name, tramp-handle-make-process) (tramp-local-host-p, tramp-call-process) (tramp-call-process-region, tramp-process-lines) (tramp-read-passwd): * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-compat.el (tramp-compat-make-temp-name) (tramp-compat-make-temp-file); * lisp/net/tramp-crypt.el (tramp-crypt-file-name-for-operation) (tramp-crypt-maybe-open-connection, tramp-crypt-send-command) (tramp-crypt-do-encrypt-or-decrypt-file-name): * lisp/net/tramp-fuse.el (tramp-fuse-mount-point, tramp-fuse-mounted-p) (tramp-fuse-unmount): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-file-local-copy, ) (tramp-sh-handle-write-region, tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Use it.
* Tramp code cleanupMichael Albinus2021-09-161-1/+1
| | | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-methods) <telnet, nc>: Reintroduce "%n" marker. (tramp-maybe-open-connection): Handle it. * lisp/net/tramp.el (tramp-prefix-regexp): * lisp/net/tramp-smb.el (tramp-smb-options): Fix docstring. * lisp/net/tramp*.el: Fix typos. Remove trailing space from `yes-or-no-p' and `y-or-n-p' prompts. * test/lisp/net/tramp-tests.el (tramp--test-telnet-p): New defun. (tramp-test29-start-file-process, tramp-test30-make-process) (tramp-test35-remote-path, tramp-test44-asynchronous-requests): Adapt tests.
* Preserve backward compatibility in TrampMichael Albinus2021-07-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): Preserve backward compatibility. * lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Do not create lock file twice. * lisp/net/tramp.el (tramp-handle-make-lock-file-name): Move lock file security check ... (tramp-handle-lock-file): ... here. (tramp-handle-unlock-file): Preserve backward compatibility. * test/lisp/net/tramp-tests.el (lock-file-name-transforms) (remote-file-name-inhibit-locks): Declare. (tramp-allow-unsafe-temporary-files): Set to t. (tramp-test37-make-auto-save-file-name) (tramp-test38-find-backup-file-name): Move binding of `tramp-allow-unsafe-temporary-files' up. (tramp-test39-lock-file): Bind `tramp-allow-unsafe-temporary-files'. Preserve backward compatibility. Extend test.
* Add remote-file-name-inhibit-locksMichael Albinus2021-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/files.texi (Interlocking): * doc/lispref/files.texi (File Locks): * doc/misc/tramp.texi (Auto-save File Lock and Backup): Add remote-file-name-inhibit-locks. * etc/NEWS: New user option 'remote-file-name-inhibit-locks'. * lisp/files.el (remote-file-name-inhibit-locks): New defcustom. * lisp/net/tramp-adb.el (tramp-adb-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): Use `tramp-handle-make-lock-file-name'. * lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): Fix docstring. (tramp-handle-make-lock-file-name): New defun. * test/lisp/net/tramp-tests.el (tramp-test39-lock-file): Extend test.
* Code cleanup wrt file locksMichael Albinus2021-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/files.el (make-lock-file-name): Fix docstring. * 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 `make-lock-file-name'. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-lock-file-name'. (tramp-handle-unlock-file): Call `userlock--handle-unlock-error' in case of error. * src/buffer.c (Frestore_buffer_modified_p): * src/editfns.c (Freplace_buffer_contents): * src/fileio.c (Finsert_file_contents, write_region): Call Funlock_file. * src/filelock.c (unlock_file): Rename from unlock_file_body. Remove the other declarations of unlock_file. Move file name handler check to ... (Funlock_file): ... here. Adapt argument numbers. Call unlock_file wrapped by internal_condition_case. (Flock_file): Adapt argument numbers. (unlock_all_files, Funlock_buffer, unlock_buffer): Call Funlock_file. * src/lisp.h (unlock_file): Remove.
* Implement file locks for remote files (Bug#49261)Michael Albinus2021-07-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Improve command completion in tramp-crypt.elMichael Albinus2021-03-151-6/+13
| | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-command-completion-p): Rename from `tramp-crypt-enabled-p'. Handle `tramp-crypt-remove-directory' special.
* * lisp/net/tramp-crypt.el (tramp-crypt-add-directory):Michael Albinus2021-03-141-3/+1
| | | | Don't autoload setting property `completion-predicate'.
* Remove ;;;###tramp-autoload cookie from Tramp defcustoms (Bug#47063)Michael Albinus2021-03-131-0/+19
| | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-enabled-p): New defun. (tramp-crypt-add-directory, tramp-crypt-remove-directory): Add property `completion-predicate'. * lisp/net/tramp-sh.el (tramp-terminal-type, tramp-remote-path) (tramp-remote-process-environment): Remove. Move them to ... * lisp/net/tramp.el: ... here.
* Tramp code cleanupMichael Albinus2021-02-031-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".