1. 18 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Make remote file locks more robust · 7075ebbf
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
      Make file locks more robust.
      
      * test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
      Rename and extend.
      7075ebbf
  2. 14 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Preserve backward compatibility in Tramp · 525d5cab
      Michael Albinus authored
      * 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.
      525d5cab
  3. 13 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Add remote-file-name-inhibit-locks · cce84822
      Michael Albinus authored
      * 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.
      cce84822
  4. 09 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Further cleanup for file locks · 9ce6541a
      Michael Albinus authored
      * doc/misc/tramp.texi (Top, Configuration): Adapt node name for
      file locks.
      (Auto-save File Lock and Backup): Rename node name and section
      title.  Add file-lock to @cindex.  Describe file locks.
      
      * lisp/dired.el (dired-trivial-filenames): Add lock files.
      (dired-font-lock-keywords): Move files suffixed with
      `completion-ignored-extensions' up.  Add lock files to these checks.
      
      * lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
      Use `when-let'
      (tramp-lock-file-info-regexp): Rename from
      `tramp-lock-file-contents-regexp'.
      (tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
      (tramp-handle-lock-file): Set file modes of lockname.
      
      * src/buffer.c (Frestore_buffer_modified_p):
      * src/fileio.c (write_region):
      * src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.
      
      * src/filelock.c (Qmake_lock_file_name): Declare symbol.
      (make_lock_file_name): Use it.  Don't check Fboundp, it doesn't
      work for interned symbols.
      (lock_file): Return a Lisp_Object.  Don't check create_lockfiles.
      Remove MSDOS version of the function.
      (Flock_file): Check create_lockfiles.
      (Flock_buffer): Call Flock_file.
      
      * src/lisp.h (lock_file): Remove.
      
      * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
      (shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.
      
      * test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
      globally.
      (tramp-test39-lock-file): Check also for `set-visited-file-name'.
      9ce6541a
  5. 07 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Implement file locks for remote files (Bug#49261) · d35868be
      Michael Albinus authored
      * 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.
      d35868be
  6. 05 Jul, 2021 1 commit
  7. 29 Jun, 2021 1 commit
    • Michael Albinus's avatar
      Sync with Tramp 2.5.1 · cd339e85
      Michael Albinus authored
      * doc/misc/trampver.texi:
      * lisp/net/trampver.el: Change version to "2.5.1".
      
      * lisp/tramp.el (tramp-handle-write-region):
      * lisp/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/tramp-sh.el (tramp-sh-handle-write-region): Call local
      `write-region' directly.
      
      * test/lisp/net/tramp-tests.el (tramp--test-utf8): Adapt test for
      MS Windows.
      cd339e85
  8. 14 Jun, 2021 1 commit
    • Michael Albinus's avatar
      Handle sensitive auto-save or backup remote files (Bug#45245) · 6536112b
      Michael Albinus authored
      * doc/misc/tramp.texi (Auto-save and Backup):
      Describe tramp-allow-unsafe-temporary-files.
      (Ad-hoc multi-hops): Use proper format.
      
      * etc/NEWS: Mention confirmation for writing sensitive auto-save
      or backup remote files to the local temporary directory..
      
      * lisp/net/tramp-cache.el (tramp-dump-connection-properties):
      Strengthen test.
      
      * lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): New defcustom.
      (tramp-handle-find-backup-file-name)
      (tramp-handle-make-auto-save-file-name): Don't expose sensible
      auto-save or backup files on local temporary directory.  (Bug#45245)
      
      * test/lisp/net/tramp-tests.el (tramp--test-always): New defalias.
      (tramp-test10-write-region, tramp-test21-file-links)
      (tramp--test--deftest-direct-async-process): Use it.
      (tramp-test37-make-auto-save-file-name)
      (tramp-test38-find-backup-file-name): Extend tests.
      6536112b
  9. 16 May, 2021 1 commit
  10. 13 May, 2021 1 commit
    • Michael Albinus's avatar
      Improve Tramp traces · c9773379
      Michael Albinus authored
      * lisp/net/tramp-cmds.el (tramp-list-tramp-buffers):
      List also trace buffers.
      
      * lisp/net/tramp.el (tramp-buffer-name):
      Add `tramp-suppress-trace' property.
      (tramp-get-debug-file-name): Fix docstring.
      (tramp-trace-buffer-name): New defun.
      (tramp-trace-functions): New defvar.
      (tramp-debug-message): Obey also `tramp-trace-functions'.
      
      * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
      Handle trace buffer accordingly.
      c9773379
  11. 09 May, 2021 1 commit
    • Michael Albinus's avatar
      Cleanups for Tramp out-of-band methods on MS Windows · 515cac0d
      Michael Albinus authored
      * doc/misc/tramp.texi (Frequently Asked Questions):
      tramp-use-ssh-controlmaster-options is nil on MS Windows.
      
      * lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Revert previous
      change, it worked (not as expected but) properly.
      
      * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
      Don't skip on MS Windows.
      (tramp--test-windows-nt-and-scp-p): Remove.
      (tramp--test-special-characters): Skip for out-of-band methods on
      MS Windows, sometimes.
      515cac0d
  12. 07 May, 2021 2 commits
    • Michael Albinus's avatar
      Tramp: Fix file name quoting on MS Windows · 9457d4f2
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
      Use `tramp-unquote-shell-quote-argument'.
      
      * lisp/net/tramp.el (tramp-unquote-shell-quote-argument):
      Adapt for MS Windows.
      
      * test/lisp/net/tramp-tests.el (tramp--test-special-characters):
      Adapt for MS Windows.
      9457d4f2
    • Michael Albinus's avatar
      Tune Tramp traces · 70bfcbcd
      Michael Albinus authored
      * doc/misc/tramp.texi (Traces and Profiles): Describe call traces.
      
      * lisp/net/tramp-compat.el: Add `tramp-suppress-trace' property for all
      functions.
      
      * lisp/net/tramp.el (tramp-verbose): Adapt docstring.
      (tramp-file-name-method, tramp-file-name-user)
      (tramp-file-name-domain, tramp-file-name-host)
      (tramp-file-name-port, tramp-file-name-localname)
      (tramp-file-name-hop, tramp-file-name-user-domain)
      (tramp-file-name-host-port, tramp-file-name-port-or-default)
      (tramp-tramp-file-p, tramp-find-method, tramp-find-user)
      (tramp-find-host, tramp-dissect-file-name)
      (tramp-dissect-hop-name, tramp-debug-buffer-name)
      (tramp-debug-outline-level, tramp-get-debug-buffer)
      (tramp-get-debug-file-name, tramp-read-passwd)
      (tramp-clear-passwd): Add `tramp-suppress-trace' property.
      (tramp-debug-message): Activate call traces.
      
      * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case): Simplify.
      70bfcbcd
  13. 06 May, 2021 1 commit
    • Michael Albinus's avatar
      In Tramp, use scp "-T" argument if available · b6f5da32
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-scp-strict-file-name-checking): New defvar.
      (tramp-scp-strict-file-name-checking): New defun.
      (tramp-do-copy-or-rename-file-out-of-band): Use it.
      (tramp-methods) <scp, scpx>: Use "%x".
      (tramp-make-copy-program-file-name): Use local quoting.
      (tramp-sh-handle-make-process): Don't call
      `tramp-maybe-open-connection', this happens implicitly by
      `tramp-send-command'.
      
      * lisp/net/tramp.el (tramp-methods): Adapt docstring.
      
      * test/lisp/net/tramp-tests.el (tramp-test40-special-characters)
      (tramp-test40-special-characters-with-stat)
      (tramp-test40-special-characters-with-perl)
      (tramp-test40-special-characters-with-ls): Don't skip for
      `tramp--test-windows-nt-and-scp-p'.
      b6f5da32
  14. 14 Apr, 2021 1 commit
    • Michael Albinus's avatar
      Rearrange argument handling in Tramp scp calls. · 8aaf13ea
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
      Use `start-process' instead of `start-process-shell-command'.
      (tramp-make-copy-program-file-name): Do not quote `localname'.
      
      * test/lisp/net/tramp-tests.el (tramp-method-out-of-band-p): Declare.
      (tramp--test-windows-nt-and-batch-p)
      (tramp--test-windows-nt-and-pscp-psftp-p): Remove, and also all callees.
      (tramp--test-windows-nt-and-out-of-band-p)
      (tramp--test-windows-nt-and-scp-p): New defuns.
      (tramp-test17-dired-with-wildcards)
      (tramp-test40-special-characters)
      (tramp-test40-special-characters-with-stat)
      (tramp-test40-special-characters-with-perl)
      (tramp-test40-special-characters-with-ls, tramp-test41-utf8)
      (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
      (tramp-test41-utf8-with-ls): Use them.
      8aaf13ea
  15. 16 Mar, 2021 3 commits
  16. 12 Mar, 2021 1 commit
    • Michael Albinus's avatar
      Tramp sshfs fixes · e609bf59
      Michael Albinus authored
      * doc/misc/tramp.texi (FUSE setup): Fix typo.
      
      * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-set-file-modes):
      Use `tramp-compat-set-file-modes'.
      
      * test/lisp/net/tramp-tests.el
      (tramp-test43-asynchronous-requests): Don't run for tramp-sshfs.
      e609bf59
  17. 11 Mar, 2021 1 commit
    • Michael Albinus's avatar
      Add remote processes to Tramp sshfs method · 65441a6f
      Michael Albinus authored
      * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also
      remote processes.
      
      * lisp/net/tramp-cache.el (tramp-get-file-property)
      (tramp-set-file-property): Move setting of
      `tramp-cache-unload-hook' out of function.
      
      * lisp/net/tramp.el (tramp-expand-args): New defun.
      (tramp-handle-make-process):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
      (tramp-maybe-open-connection):
      * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it.
      
      * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>:
      Adapt `tramp-mount-args'.  Add `tramp-login-args',
      `tramp-direct-async', `tramp-remote-shell',
      `tramp-remote-shell-login' and `tramp-remote-shell-args'.
      (tramp-connection-properties): Set "direct-async-process" fir sshfs.
      (tramp-sshfs-file-name-handler-alist): Add `exec-path',
      `make-process', `process-file', `set-file-modes', `shell-command',
      `start-file-process', `tramp-get-remote-gid',
      `tramp-get-remote-uid' and `tramp-set-file-uid-gid'.
      (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file)
      (tramp-sshfs-handle-set-file-modes): New defuns.
      
      * test/lisp/net/tramp-tests.el (tramp-test20-file-modes)
      (tramp-test28-process-file, tramp-test29-start-file-process)
      (tramp-test30-make-process, tramp-test32-shell-command)
      (tramp-test32-shell-command-dont-erase-buffer)
      (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path)
      (tramp-test43-asynchronous-requests): Run also for tramp-sshfs.
      (tramp--test-shell-file-name): New defun.
      (tramp-test28-process-file)
      (tramp-test34-explicit-shell-file-name)
      (tramp-test43-asynchronous-requests): Use it.
      (tramp-test40-special-characters-with-stat)
      (tramp-test40-special-characters-with-perl)
      (tramp-test40-special-characters-with-ls)
      (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
      (tramp-test41-utf8-with-ls): Remove superfluous skip.
      65441a6f
  18. 08 Mar, 2021 1 commit
    • Michael Albinus's avatar
      Add Tramp sshfs method · 11d3af3c
      Michael Albinus authored
      * doc/misc/tramp.texi (Top, Configuration): Insert sections 'FUSE-based
      methods' and 'FUSE setup' in menu.
      (Quick Start Guide): Fix @anchors.  Add doas.  Extend section
      'Using @command{rclone}' to 'Using @acronym{FUSE}-based methods'.
      (External methods): Remove rclone paragraph.
      (FUSE-based methods, FUSE setup): New nodes.
      (Predefined connection information): Mention "mount-point".
      
      * etc/NEWS: Mention Tramp sshfs method.
      Fix typos and other oddities.
      
      * lisp/net/tramp-fuse.el: New file.
      
      * lisp/net/tramp-rclone.el (tramp-fuse): Require.
      (tramp-rclone-file-name-handler-alist): Replace `tramp-rclone-handle-*'
      by `tramp-fuse-handle-*' where appropriate.
      (tramp-rclone-handle-delete-directory)
      (tramp-rclone-handle-delete-file)
      (tramp-rclone-handle-directory-files)
      (tramp-rclone-handle-file-attributes)
      (tramp-rclone-handle-file-executable-p)
      (tramp-rclone-handle-file-name-all-completions)
      (tramp-rclone-handle-file-readable-p)
      (tramp-rclone-handle-insert-directory)
      (tramp-rclone-handle-insert-file-contents)
      (tramp-rclone-handle-make-directory, tramp-rclone-mount-point)
      (tramp-rclone-mounted-p, tramp-rclone-local-file-name):
      Remove.  Functionality moved to tramp-fuse.el.
      (tramp-rclone-remote-file-name)
      (tramp-rclone-maybe-open-connection): Use `tramp-fuse-*' functions.
      
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
      Simplify check.
      
      * lisp/net/tramp-sshfs.el: New file.
      
      * lisp/net/tramp.el: Remove TODO item.
      
      * test/lisp/net/tramp-tests.el (tramp--test-sshfs-p): New defun.
      (tramp-test14-delete-directory): Use it.
      11d3af3c
  19. 19 Feb, 2021 1 commit
    • Michael Albinus's avatar
      Fix Tramp bug#46625 · 3c7b839e
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
      Adapt test.  (Bug#46625)
      3c7b839e
  20. 17 Feb, 2021 1 commit
    • Michael Albinus's avatar
      Further Tramp code cleanup · e5f50f32
      Michael Albinus authored
      * doc/misc/tramp.texi (Predefined connection information):
      Mention "about-args".
      
      * lisp/net/tramp-cmds.el (tramp-version): Adapt docstring.
      
      * lisp/net/tramp.el (tramp-handle-expand-file-name):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
      * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name)
      * lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
      Handle local "/..".
      
      * lisp/net/tramp-rclone.el (tramp-methods) <rclone>:
      Adapt `tramp-mount-args'.
      (tramp-rclone-flush-directory-cache): Remove.
      (tramp-rclone-do-copy-or-rename-file)
      (tramp-rclone-handle-delete-directory)
      (tramp-rclone-handle-delete-file)
      (tramp-rclone-handle-make-directory): Don't use that function.
      (tramp-rclone-maybe-open-connection): Fix use of `tramp-mount-args'.
      
      * lisp/net/trampver.el (tramp-inside-emacs): New defun.
      * lisp/net/tramp.el (tramp-handle-make-process):
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
      (tramp-sh-handle-process-file, tramp-open-shell): Use it.
      (tramp-get-env-with-u-option): Remove.
      
      * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-top):
      New test.
      e5f50f32
  21. 03 Feb, 2021 1 commit
    • Michael Albinus's avatar
      Tramp code cleanup · b81516c7
      Michael Albinus authored
      * 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.
      b81516c7
  22. 29 Jan, 2021 1 commit
  23. 27 Jan, 2021 1 commit
    • Michael Albinus's avatar
      Some Tramp fixes · 12095de8
      Michael Albinus authored
      * doc/misc/tramp.texi (GVFS-based methods): Ban sftp RemoteCommand
      option.
      
      * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
      (tramp-adb-handle-rename-file): Avoid calling jka-compr when
      writing the target file.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
      Skip GROUP test on *BSD machines.
      
      * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory-one-file):
      Skip for tamp-crypt.el.
      (tramp--test-sh-no-ls--dired-p): Ignore errors.
      12095de8
  24. 24 Jan, 2021 1 commit
    • Michael Albinus's avatar
      Make Tramp's insert-directory more robust · 3cefda09
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
      Use `tramp-sh--quoting-style-options'.
      
      * test/lisp/net/tramp-tests.el (tramp--test-hpux-p, tramp--test-ksh-p):
      Remove superfluous nil.
      (tramp--test-sh-no-ls--dired-p): New defun.
      (tramp--test-special-characters): Use it.
      3cefda09
  25. 22 Jan, 2021 1 commit
    • Michael Albinus's avatar
      Use RemoteCommand option for Tramp's sshx and scpx methods · b2b26bd4
      Michael Albinus authored
      * doc/misc/tramp.texi (Inline methods) <sshx>:
      (External methods) <scpx>: Adapt call sequence.
      (Remote shell setup): Mention, that sshx and scpx overwrite
      RemoteCommand.
      (Remote processes): Restriction: direct asynchronous processes
      cannot be used when RemoteCommand is in use.
      `tramp-remote-process-environment' is not ignored any longer.
      
      * lisp/net/tramp-sh.el (tramp-methods) <sshx, scpx>: Handle login
      shell via RemoteCommand.  Remove `tramp-direct-async' parameter.
      (tramp-maybe-open-connection): Add "-i" to login.
      
      * lisp/net/tramp-smb.el (tramp-smb-errors):
      Add "NT_STATUS_NOT_SUPPORTED".
      (tramp-smb-handle-insert-directory): Fix point moving error.
      
      * test/lisp/net/tramp-tests.el (tramp-test34-explicit-shell-file-name):
      Use `get-buffer-process' where appropriate.
      b2b26bd4
  26. 19 Jan, 2021 1 commit
    • Michael Albinus's avatar
      Some Tramp fixes, resulting from test campaign · f3b9d5b3
      Michael Albinus authored
      * doc/misc/tramp.texi (Remote shell setup): Clarifications for
      `tramp-actions-before-shell' example.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Do not expand
      FILENAME explicitely.
      (tramp-open-shell): Add "-i" for interactive shells.
      
      * test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
      (tramp-test14-delete-directory)
      (tramp-test43-asynchronous-requests): Skip for MS windows.
      f3b9d5b3
  27. 15 Jan, 2021 1 commit
    • Michael Albinus's avatar
      Some Tramp adaptions, mainly direct async processes · 138486cd
      Michael Albinus authored
      * doc/misc/tramp.texi (Firewalls, Remote processes)
      (Frequently Asked Questions): Add @vindex.
      (Predefined connection information): Precise precondition or direct
      async processes.
      (Remote shell setup): Ban ssh RemoteCommand option.
      (Frequently Asked Questions): Adapt quoting.
      
      * doc/misc/trampver.texi:
      * lisp/net/trampver.el: Change version to "2.5.1-pre".
      
      * lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async'
      parameter.
      (tramp-adb-handle-make-process): Adapt docstring.
      
      * lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>:
      Add `tramp-direct-async' parameter.
      (tramp-sh-handle-insert-directory): Simplify merkers.
      (tramp-sh-handle-make-process): Adapt docstring.
      
      * lisp/net/tramp.el (tramp-methods): Adapt docstring.
      (tramp-debug-message): Suppress lockfiles.
      (tramp-test-message): New defun.
      (tramp-direct-async-process-p): Check also for `tramp-direct-async'.
      (tramp-handle-make-process): Do not check for `tramp-direct-async-args'.
      
      * test/lisp/net/tramp-tests.el (all): Replace `string-match' by
      `string-match-p'.
      (dired-copy-dereference): Declare.
      (tramp-test-temporary-file-directory):
      Remove `tramp-direct-async-args` for mock method.
      (tramp-test15-copy-directory, tramp-test40-special-characters)
      (tramp-test40-special-characters-with-stat)
      (tramp-test40-special-characters-with-perl)
      (tramp-test40-special-characters-with-ls, tramp-test41-utf8)
      (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
      (tramp-test41-utf8-with-ls): Skip for tramp-rclone.el.
      (tramp--test--deftest-direct-async-process): Do not skip for mock
      method.
      (tramp-test32-shell-command): Adapt test for direct async processes.
      (tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p):
      Use `tramp-test-vec'.
      138486cd
  28. 10 Jan, 2021 1 commit
  29. 08 Jan, 2021 1 commit
  30. 04 Jan, 2021 1 commit
    • Michael Albinus's avatar
      Fix error in tramp-sh-handle-insert-directory · f5a1315f
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Let buffer be
      unibyte when applying numbers returned with the ls --dired option.
      Reported by Justus Piater <Justus-dev@Piater.name>.
      
      * test/lisp/net/tramp-tests.el (tramp--test-check-files): Extend test.
      f5a1315f
  31. 01 Jan, 2021 2 commits
  32. 29 Dec, 2020 1 commit
    • Michael Albinus's avatar
      Sync with Tramp 2.5.0 · 7fbcca29
      Michael Albinus authored
      * doc/misc/trampver.texi:
      * lisp/net/trampver.el: Change version to "2.5.0".
      
      * test/lisp/net/tramp-tests.el
      (tramp--test--deftest-direct-async-process): Check, that
      `make-process' supports file name handlers.  Suppress
      `internal-default-process-sentinel'.
      (tramp--test-async-shell-command): Set `proc' proper.
      (tramp-test32-shell-command-direct-async): Tag it :unstable.
      7fbcca29
  33. 25 Dec, 2020 2 commits
  34. 20 Dec, 2020 1 commit
    • Michael Albinus's avatar
      Improve make-process in Tramp · ecb5ebf1
      Michael Albinus authored
      * doc/misc/tramp.texi (Remote processes): Remove INSIDE_EMACS
      restriction.
      (Frequently Asked Questions, External packages): Add indices.
      
      * etc/NEWS: 'start-process-shell-command' and
      'start-file-process-shell-command' do not support the old calling
      conventions any longer.
      
      * lisp/subr.el (start-process-shell-command)
      (start-file-process-shell-command): Remove old calling conventions.
      
      * lisp/net/tramp-compat.el (remote-file-error): Remove, it isn't
      necessary.
      
      * lisp/net/tramp.el (tramp-handle-make-process): Remove special shell
      handling.  Support environment variables.
      
      * test/lisp/net/tramp-tests.el
      (tramp--test--deftest-direct-async-process): Skip for mock method.
      (tramp--test-async-shell-command): Suppress `shell-command-sentinel'.
      (tramp-test32-shell-command, tramp-test33-environment-variables):
      Adapt tests.
      (tramp-test32-shell-command-direct-async)
      (tramp-test33-environment-variables-direct-async): New tests.
      ecb5ebf1
  35. 14 Dec, 2020 1 commit
    • Michael Albinus's avatar
      Add 'remote-file-error' for Tramp · c0c6cd2d
      Michael Albinus authored
      * doc/lispref/errors.texi (Standard Errors): Add 'remote-file-error'.
      
      * etc/NEWS: Mention 'remote-file-error'.
      
      * lisp/net/ange-ftp.el (ftp-error): Add error condition
      `remote-file-error'.
      
      * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Do not set
      `tramp-locked'.
      
      * lisp/net/tramp-compat.el (remote-file-error): Define if it
      doesn't exist.
      
      * lisp/net/tramp-sh.el (tramp-timeout-session): Check for "locked"
      property.
      (tramp-maybe-open-connection): Simplify.
      
      * lisp/net/tramp.el (tramp-locked, tramp-locker): Remove them.
      (tramp-file-name-handler): Do not set them.
      (with-tramp-locked-connection): New defmacro.
      (tramp-accept-process-output, tramp-send-string): Use it.
      
      * src/fileio.c (Qremote_file_error): New error symbol.
      
      * test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
      Adapt test.  Remove :unstable tag.
      c0c6cd2d