1. 28 Jan, 2019 1 commit
    • Michael Albinus's avatar
      Adapt accept-process-output timeouts in Tramp · 6c560a3b
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-accept-process-output):
      Make timeout optional.  Do not set explicit timer.
      (tramp-action-out-of-band, tramp-process-one-action)
      (tramp-wait-for-regexp, tramp-interrupt-process):
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      * 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):
      * tramp-sudoedit.el (tramp-sudoedit-action-sudo):
      Adapt `accept-process-output' calls wrt timeouts.
      6c560a3b
  2. 16 Jan, 2019 1 commit
    • Michael Albinus's avatar
      Some accept-process-output cleanups in Tramp · b2497ef6
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-action-out-of-band): Read process
      output in a loop.
      (tramp-accept-process-output): Return result.
      (tramp-interrupt-process):
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      Remove FIXME.
      
      * lisp/net/tramp-sh.el (tramp-local-coding-commands): Fix docstring.
      
      * lisp/net/tramp-smb.el (tramp-smb-wait-for-output): Adapt docstring.
      Simplify code.
      
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
      Adapt docstring.  Read process output in a loop.
      
      * test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
      Remove :unstable tag on emba.
      b2497ef6
  3. 15 Jan, 2019 1 commit
    • Paul Eggert's avatar
      Fix accept-process-output/process-live-p confusion · 9fc02ff5
      Paul Eggert authored
      * doc/lispref/processes.texi (Accepting Output):
      Document the issue.
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      * lisp/net/tramp-smb.el (tramp-smb-wait-for-output):
      * lisp/net/tramp.el (tramp-interrupt-process):
      * test/src/process-tests.el (make-process/mix-stderr):
      Fix code that uses accept-process-output and process-live-p.
      Add FIXME comments as necessary.
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
      * lisp/net/tramp.el (tramp-action-out-of-band):
      Add FIXME comments as necessary.
      9fc02ff5
  4. 01 Jan, 2019 1 commit
    • Paul Eggert's avatar
      Update more copyright years · a04bf151
      Paul Eggert authored
      Update some other copyright years automatically, by running:
      Run 'UPDATE_COPYRIGHT_YEAR=2019 \
      UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 admin/update-copyright'
      followed by 'admin/merge-gnulib'.
      a04bf151
  5. 23 Dec, 2018 1 commit
    • Michael Albinus's avatar
      Handle `make-process' in Tramp and ange-ftp · 3ea89aca
      Michael Albinus authored
      * doc/lispref/processes.texi (Asynchronous Processes):
      Explain, that not all file name handlers support `make-process'.
      
      * lisp/net/ange-ftp.el:
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-process'.
      
      * lisp/vc/ediff-util.el:
      * src/process.c:
      * test/src/process-tests.el: Use "file name handler" consequently.
      3ea89aca
  6. 17 Dec, 2018 1 commit
    • Michael Albinus's avatar
      Reduce autoloaded objects in Tramp · 3e9ecaec
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-program)
      (tramp-adb-connect-if-not-connected, tramp-adb-prompt):
      Remove autoload cookie.
      
      * lisp/net/tramp-cache.el (tramp-connection-properties)
      (tramp-persistency-file-name): Remove autoload cookie.
      
      * lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp):
      Use `tramp-autoload' cookie.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-zeroconf-domain):
      Remove autoload cookie.
      
      * lisp/net/tramp-rclone.el (tramp-rclone-program): Remove autoload
      cookie.
      (tramp-set-completion-function): Use `tramp--with-startup'.
      
      * lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
      (tramp-copy-size-limit, tramp-histfile-override)
      (tramp-use-ssh-controlmaster-options, tramp-remote-path)
      (tramp-remote-process-environment, tramp-sh-extra-args):
      Remove autoload cookie.
      (tramp-stat-marker, tramp-stat-quoted-marker): Move to tramp.el.
      
      * lisp/net/tramp-smb.el (tramp-smb-program)
      (tramp-smb-acl-program, tramp-smb-conf)
      (tramp-smb-winexe-program, tramp-smb-winexe-shell-command)
      (tramp-smb-winexe-shell-command-switch): Remove autoload cookie.
      
      * lisp/net/tramp-sudoedit.el (server, tramp-sh): Do not require.
      
      * lisp/net/tramp.el (tramp--startup-hook): Define.
      (tramp-stat-marker, tramp-stat-quoted-marker): New defconsts,
      taken from tramp-sh.el.
      
      * test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit)
      (tramp-persistency-file-name): Declare.
      
      * test/lisp/net/tramp-tests.el (tramp-connection-properties)
      (tramp-display-escape-sequence-regexp)
      (tramp-inline-compress-start-size, tramp-remote-path): Declare.
      3e9ecaec
  7. 16 Dec, 2018 2 commits
    • Stefan Monnier's avatar
      * lisp/net/tramp: Rework mutual dependencies · 07d88279
      Stefan Monnier authored
      Functionally split tramp-loaddefs.el into two parts: one part run
      while loading it at the very beginning of loading tramp.el (holding plain
      autoloads and declarations), and another run at the very end of loading
      tramp.el (holding setup code).
      This should reduce infinite-recursion problems while loading.
      
      * lisp/net/tramp.el: Require tramp-loaddefs at beginning.
      Run (new and internal) tramp--startup-hook at the end.
      Remove all tramp-autoloads.  Prefer tramp--with-startup over
      eval-after-load.
      (tramp--with-startup): New macro.
      (tramp-set-syntax): Show the new value rather than the old value in the
      error message.
      (tramp-syntax-values): Explicitly return 'values'.
      (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-completion-file-name-regexp): Don't initialize in the declaration,
      since it's recomputed at the end anyway.
      (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use.
      
      * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more.
      (tramp-compat-tramp-syntax): Declare tramp-syntax.
      
      * lisp/net/tramp-smb.el:
      * lisp/net/tramp-rclone.el:
      * lisp/net/tramp-gvfs.el:
      * lisp/net/tramp-ftp.el:
      * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within
      tramp--with-startup.
      
      * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within
      tramp--with-startup.
      (tramp-display-escape-sequence-regexp)
      (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more.
      (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload.
      
      * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within
      tramp--with-startup.
      Require tramp-sh at compile-time to precompute some regexps based on
      tramp-stat-marker.
      07d88279
    • Michael Albinus's avatar
      Add Tramp sudoedit method · e8199e76
      Michael Albinus authored
      * doc/misc/tramp.texi (Quick Start Guide): New section "Using sudoedit".
      (External methods) <sudoedit>: Describe.
      
      * lisp/net/tramp-adb.el (tramp-adb-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):
      Add handler.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-uid-gid): Rename from
      `tramp-sh-handle-set-file-uid-gid'.  Handle only remote file names.
      
      * lisp/net/tramp-sudoedit.el: New file.
      
      * lisp/net/tramp.el (tramp-file-name-for-operation): Handle also
      `tramp-set-file-uid-gid'.
      (tramp-set-file-uid-gid): New defun.
      (tramp-get-local-uid, tramp-get-local-gid): Cache result.
      
      * test/lisp/net/tramp-tests.el (tramp--test-sudoedit-p): New defun.
      (tramp-test20-file-modes, tramp-test22-file-times)
      (tramp--test-sudoedit-p): Use it.
      e8199e76
  8. 07 Dec, 2018 1 commit
    • Michael Albinus's avatar
      Refactor some Tramp functions · 294b2c2b
      Michael Albinus authored
      * lisp/net/tramp-compat.el (tramp-compat-file-local-name): New defsubst.
      (tramp-compat-file-name-quoted-p, tramp-compat-file-name-quote)
      (tramp-compat-file-name-unquote):
      * lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p)
      (tramp-handle-file-truename, tramp-get-remote-tmpdir):
      * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
      (tramp-adb-handle-rename-file, tramp-adb-handle-exec-path):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly)
      (tramp-sh-handle-exec-path, tramp-find-inline-encoding)
      (tramp-get-remote-touch): Use it.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      Use `tramp-handle-expand-file-name'.
      (tramp-adb-handle-expand-file-name): Move to tramp.el.
      (tramp-adb-handle-file-writable-p): Adapt docstring.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      Use `tramp-handle-file-local-copy', `tramp-handle-file-writable-p'
      and `tramp-handle-write-region'.
      (tramp-gvfs-handle-file-local-copy)
      (tramp-gvfs-handle-file-writable-p)
      (tramp-gvfs-handle-write-region): Move to tramp.el.
      
      * lisp/net/tramp-rclone.el: Dont't require `tramp-adb' and
      `tramp-gvfs' anymore.
      (tramp-rclone-file-name-handler-alist):
      Use `tramp-handle-expand-file-name', `tramp-handle-file-local-copy',
      `tramp-handle-file-writable-p' and `tramp-handle-write-region'.
      (tramp-rclone-handle-directory-files): Simplify.
      
      * lisp/net/tramp.el (tramp-methods): Extend docstring.
      (tramp-parse-netrc): Require `netrc'.
      (tramp-handle-expand-file-name, tramp-handle-file-local-copy)
      (tramp-handle-file-writable-p, tramp-handle-write-region): New defuns.
      294b2c2b
  9. 06 Dec, 2018 1 commit
    • Michael Albinus's avatar
      Add missing handler to tramp-rclone.el, improve robustness · 7d33c775
      Michael Albinus authored
      * lisp/net/tramp-rclone.el (tramp-adb): Require.
      (tramp-rclone-file-name-handler-alist):
      Use `tramp-adb-handle-expand-file-name'.
      (tramp-rclone-flush-directory-cache): New defun, derived from
      `tramp-rclone-flush-mount'.
      (tramp-rclone-do-copy-or-rename-file)
      (tramp-rclone-handle-delete-directory)
      (tramp-rclone-handle-delete-file)
      (tramp-rclone-handle-make-directory): Use it.
      (tramp-rclone-handle-directory-files)
      (tramp-rclone-local-file-name):
      Use `tramp-compat-file-name-quoted-p', 	`tramp-compat-file-name-quote'
      and ´tramp-compat-file-name-unquote'.
      (tramp-rclone-handle-file-executable-p)
      (tramp-rclone-handle-file-readable-p): Cache result.
      (tramp-rclone-handle-file-name-all-completions)
      (tramp-rclone-mounted-p, tramp-rclone-remote-file-name)
      (tramp-rclone-maybe-open-connection): Rewrite.
      
      * test/lisp/net/tramp-tests.el (tramp--test-rclone-p): New defun.
      (tramp-test05-expand-file-name-relative)
      (tramp--test-special-characters): Use it.
      7d33c775
  10. 28 Nov, 2018 1 commit
    • Michael Albinus's avatar
      Tramp cleanup · 9b9c70b7
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions)
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
      * lisp/net/tramp-smb.el (tramp-smb-read-file-entry):
      Use `string-match-p'.
      
      * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
      Set file properties more robust.
      
      * lisp/net/tramp-sh.el (tramp-stat-marker)
      (tramp-convert-file-attributes): Add tramp-autoload cookie.
      9b9c70b7
  11. 27 Nov, 2018 1 commit
    • Michael Albinus's avatar
      Fixes in tramp-clone.el · e02d375c
      Michael Albinus authored
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      Wrap by connection property "rclone-device-names".
      (tramp-rclone-maybe-open-connection): Do not check for `non-essential'.
      e02d375c
  12. 26 Nov, 2018 1 commit
  13. 24 Nov, 2018 1 commit
    • Michael Albinus's avatar
      Add Tramp rclone method · a7d9c38d
      Michael Albinus authored
      * doc/misc/tramp.texi (Top): Remove "History".
      (History): Remove node.
      (Quick Start Guide): New section "Using rclone".
      (External methods) <rclone>: Describe.
      
      * etc/NEWS: Mention Tramp rclone method.
      
      * lisp/net/tramp-rclone.el: New file.
      a7d9c38d