1. 29 Mar, 2018 1 commit
    • Michael Albinus's avatar
      Fix Bug#30946 · b9340aad
      Michael Albinus authored
      * doc/misc/tramp.texi (Multi-hops): Mention host name checks.
      
      * lisp/net/tramp.el (tramp-set-syntax, tramp-dissect-file-name)
      (tramp-debug-message, tramp-handle-shell-command):
      * lisp/net/tramp-adb.el (tramp-adb-handle-shell-command):
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler)
      (tramp-archive-dissect-file-name):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees.
      
      * lisp/net/tramp-compat.el (tramp-compat-user-error): Move defsubst ---
      
      * lisp/net/tramp-sh.el (tramp-compute-multi-hops): Check for proper
      host names in multi-hop.  (Bug#30946)
      
      * lisp/net/tramp.el (tramp-user-error): ... here.  Make it a defun.
      
      * test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
      New test.
      b9340aad
  2. 17 Mar, 2018 1 commit
    • Glenn Morris's avatar
      Explicitly require cl-lib where needed · 1c7db8aa
      Glenn Morris authored
      Rather than relying on the byte-compiler happening to use it.
      * lisp/completion.el, lisp/ffap.el, lisp/loadhist.el:
      * lisp/userlock.el, lisp/emacs-lisp/debug.el, lisp/emacs-lisp/rx.el:
      * lisp/emacs-lisp/testcover.el, lisp/mail/rfc2231.el:
      * lisp/net/newst-treeview.el, lisp/net/puny.el:
      * lisp/net/tramp-archive.el, lisp/net/tramp-gvfs.el:
      * lisp/net/tramp-sh.el, lisp/net/tramp-smb.el, lisp/org/org-ctags.el:
      * lisp/org/org-macs.el, lisp/progmodes/grep.el:
      * lisp/progmodes/perl-mode.el, lisp/progmodes/ruby-mode.el:
      * lisp/textmodes/dns-mode.el, lisp/textmodes/mhtml-mode.el:
      * lisp/vc/pcvs-parse.el: Explicitly require cl-lib as needed.
      1c7db8aa
  3. 11 Feb, 2018 1 commit
    • Michael Albinus's avatar
      Fix handling of file notifications in tramp-gvfs.el · 13f4b518
      Michael Albinus authored
      * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name):
      Fix docstring.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
      Use consequently "gio monitor".
      (tramp-gvfs-monitor-process-filter): Rename from
      `tramp-gvfs-monitor-file-process-filter'.  Adapt implementation.
      
      * lisp/net/tramp-sh.el (tramp-gio-events): Move this ...
      * lisp/net/tramp.el (tramp-gio-events): ... here.
      13f4b518
  4. 30 Jan, 2018 1 commit
    • Michael Albinus's avatar
      Fix Bug#30262 · fd6972ac
      Michael Albinus authored
      * lisp/net/tramp-archive.el (tramp-archive-hash): Document (changed)
      layout.
      (tramp-archive-dissect-file-name): Merge with
      `tramp-archive-local-copy', which has been removed by this.
      (tramp-archive-cleanup-hash): Adapt to changed
      `tramp-archive-hash'.  (Bug#30262)
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-unmount): Flush
      connection properties.
      
      * test/lisp/net/tramp-archive-tests.el
      (tramp-archive-test01-file-name-syntax)
      (tramp-archive-test02-file-name-dissect)
      (tramp-archive-test16-directory-files)
      (tramp-archive-test26-file-name-completion): Adapt to changed
      test file.
      (tramp-archive-test08-file-local-copy): Be more robust in cleanup.
      
      * test/lisp/net/tramp-archive-resources/foo.tar.gz: Adapt to
      extended test.
      fd6972ac
  5. 13 Jan, 2018 1 commit
    • Michael Albinus's avatar
      Improve Tramp robustness · 1a5293e7
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-message, tramp-process-actions)
      (tramp-read-passwd, tramp-interrupt-process):
      * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
      (tramp-gvfs-maybe-open-connection):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
      (tramp-process-sentinel)
      (tramp-sh-handle-file-notify-add-watch)
      (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): Use process property rather
      than connection property "vector".
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
      Fix scoping error.  Let error traces use process buffer.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
      Move "inotifywait" up.  GVFS based monitoring is not stable.
      Let error traces use process buffer.
      (tramp-sh-gvfs-monitor-dir-process-filter): Check more error
      messages.
      (tramp-get-remote-gvfs-monitor-dir): Search also for "gio".
      
      * lisp/net/tramp.el (tramp-get-debug-buffer):
      Use `special-mode-map' as parent map in debug buffer.
      (tramp-message): Ensure, that proper process buffer is dumped
      in error case.
      1a5293e7
  6. 06 Jan, 2018 1 commit
    • Michael Albinus's avatar
      Minor tramp-gvfs.el cleanup · fc31788b
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Move up.
      (top): Delete goa methods only when `tramp-gvfs-enabled' is not nil.
      fc31788b
  7. 05 Jan, 2018 1 commit
    • Michael Albinus's avatar
      Add new Tramp connection method "owncloud" · b74fdf44
      Michael Albinus authored
      * doc/misc/tramp.texi (all): Use @acronym{GNOME} thoroughly.
      (Using GNOME Online Accounts based methods): Rename from
      "Using Google Drive".  Add `owncloud'.
      (GVFS based methods): Add `owncloud'.
      
      * etc/NEWS: Add Tramp connection method "owncloud".
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-methods): Add "owncloud".
      Remove goa methods if not supported.
      (tramp-goa-methods, tramp-goa-service, tramp-goa-path)
      (tramp-goa-path-accounts, tramp-goa-interface-documents)
      (tramp-goa-interface-printers, tramp-goa-interface-files)
      (tramp-goa-interface-contacts, tramp-goa-interface-calendar)
      (tramp-goa-interface-oauth2based)
      (tramp-goa-interface-account, tramp-goa-identity-regexp)
      (tramp-goa-interface-mail, tramp-goa-interface-chat)
      (tramp-goa-interface-photos, tramp-goa-path-manager)
      (tramp-goa-interface-documents)
      (tramp-gvfs-owncloud-default-prefix)
      (tramp-gvfs-owncloud-default-prefix-regexp): New defconst.
      (tramp-goa-name): New defstruct.
      (tramp-gvfs-stringify-dbus-message): Handle all consp messages.
      (tramp-dbus-function, tramp-gvfs-get-remote-prefix)
      (tramp-get-goa-accounts): New defun.
      (with-tramp-dbus-call-method): Use it.
      (with-tramp-dbus-get-all-properties): New defmacro.
      (tramp-gvfs-url-file-name)
      (tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
      Map between "owncloud" and "davs".
      (tramp-gvfs-maybe-open-connection): Set "vector" connection property.
      
      * test/lisp/net/tramp-tests.el (tramp-gvfs-handler-askquestion):
      Suppress run in tests.
      (tramp--test-owncloud-p): New defun.
      (tramp-test11-copy-file, tramp-test12-rename-file): Use it.
      b74fdf44
  8. 04 Jan, 2018 1 commit
    • Michael Albinus's avatar
      Write proper `write-region' message in Tramp backends · 13d38482
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      Write proper message.
      
      * lisp/net/tramp.el (tramp-message-show-message): Change default.
      
      * test/lisp/net/tramp-tests.el (ert-x): Require it.
      (tramp-test10-write-region): Extend test.
      13d38482
  9. 01 Jan, 2018 1 commit
  10. 12 Dec, 2017 1 commit
    • Michael Albinus's avatar
      Extend tramp-cache.el interface · 95a2a74d
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-add-name-to-file)
      (tramp-handle-dired-uncache):
      * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory)
      (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file)
      (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
      (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file)
      (tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
      (tramp-adb-handle-start-file-process, tramp-adb-get-device)
      (tramp-adb-maybe-open-connection):
      * lisp/net/tramp-cache.el (tramp-flush-file-properties)
      (tramp-flush-directory-properties, tramp-flush-file-function):
      * lisp/net/tramp-cmds.el (tramp-cleanup-connection):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
      (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file)
      (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory)
      (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-send-command):
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
      (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
      (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl)
      (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory)
      (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band)
      (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory)
      (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file)
      (tramp-process-sentinel, tramp-sh-handle-start-file-process)
      (tramp-sh-handle-process-file, tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
      (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
      (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file)
      (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal)
      (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file)
      (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl)
      (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process)
      (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection):
      Use them.
      
      * lisp/net/tramp-cache.el (tramp-flush-file-properties)
      (tramp-flush-directory-properties, tramp-flush-connection-properties):
      Rename from `tramp-flush-file-property',`tramp-flush-directory-property'
      and `tramp-flush-connection-property', respectively.
      (tramp-flush-file-property, tramp-flush-connection-property):
      New defuns.
      95a2a74d
  11. 09 Dec, 2017 3 commits
    • Michael Albinus's avatar
      Support for archive file names · d338325c
      Michael Albinus authored
      * doc/misc/tramp.texi (Top, Usage): Add entry "Archive file names".
      (History): Mention archive file names.
      (GVFS based methods): Mentio "http" and "https" methods.
      (Archive file names): New node.
      (Frequently Asked Questions): Add Emacs 27 as supported version.
      
      * etc/NEWS: Mention tramp-archive.el.
      
      * lisp/net/tramp.el (tramp-run-real-handler)
      (tramp-register-file-name-handlers)
      (tramp-register-file-name-handlers, tramp-unload-file-name-handlers):
      Add `tramp-archive-file-name-handler'.
      (tramp-handle-file-name-completion): Do not insist in Tramp
      file names.
      
      * lisp/net/tramp-archive.el: New package.
      
      * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Check for
      "archive" method.
      
      * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Cleanup also
      local copies of archives.
      
      * lisp/net/tramp-compat.el (tramp-compat-use-url-tramp-p): New defconst.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-methods): Add "http" and "https".
      (tramp-gvfs-gio-mapping): Add "gvfs-mount".
      (tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
      Handle "uri" and "http".
      (tramp-gvfs-unmount): New defun.
      
      * test/lisp/net/tramp-archive-tests.el: New package.
      d338325c
    • Michael Albinus's avatar
      Sync with Tramp 2.4.0-pre · 34bedf5d
      Michael Albinus authored
      * doc/misc/trampver.texi:
      * lisp/net/trampver.el: Change version to "2.4.0-pre".
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      Use `tramp-handle-file-directory-p'.
      (tramp-adb-parse-device-names)
      (tramp-adb-handle-expand-file-name)
      (tramp-adb-handle-file-truename, tramp-adb-handle-process-file):
      Adapt `tramp-make-tramp-file-name' call.
      (tramp-adb-handle-file-directory-p): Remove.
      (tramp-adb-maybe-open-connection): Do not set
      tramp-current-*.
      
      * lisp/net/tramp-cache.el (tramp-get-hash-table):
      Adapt `tramp-make-tramp-file-name' call.
      
      * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Do not set
      tramp-current-*.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      Use `tramp-handle-file-directory-p'.
      (tramp-gvfs-dbus-event-error): Trace with verbosity 6.
      (tramp-gvfs-do-copy-or-rename-file): Use `file-truename'.
      (tramp-gvfs-handle-file-directory-p): Remove.
      (tramp-gvfs-handler-askpassword): Do not set tramp-current-*.
      
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
      (tramp-sh-handle-start-file-process)
      (tramp-maybe-open-connection, tramp-get-remote-path): Do not
      set tramp-current-*.
      (tramp-maybe-open-connection): Set "password-vector" property.
      
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      Use `tramp-handle-file-accessible-directory-p' and
      `tramp-handle-file-directory-p'.
      (tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
      (tramp-smb-handle-set-file-acl)
      (tramp-smb-maybe-open-connection): Do not set tramp-current-*.
      (tramp-smb-handle-file-directory-p): Remove.
      (tramp-smb-handle-make-symbolic-link):
      Use `tramp-get-connection-buffer' rather than `buffer-name'.
      
      * lisp/net/tramp.el (tramp-current-method, tramp-current-user)
      (tramp-current-domain, tramp-current-host)
      (tramp-current-port): Remove.
      (tramp-dissect-file-name): No special handling of localname anymore.
      (tramp-make-tramp-file-name): Reimplemnt with new signature.
      (tramp-completion-make-tramp-file-name): Fix docstring.
      (tramp-get-buffer, tramp-handle-file-name-as-directory)
      (tramp-handle-file-name-directory)
      (tramp-check-cached-permissions, tramp-local-host-p)
      (tramp-get-remote-tmpdir, tramp-clear-passwd):
      Adapt `tramp-make-tramp-file-name' call.
      (tramp-completion-handle-file-name-all-completions)
      (tramp-action-login, tramp-read-passwd): Do not set
      tramp-current-*.
      (tramp-handle-file-directory-p): New defun.
      (tramp-handle-verify-visited-file-modtime): Remove superfluous
      `with-parsed-tramp-file-name'.
      (tramp-process-actions, tramp-read-passwd):
      Use "password-vector" property.
      (tramp-call-process, tramp-call-process-region): No special
      setting of vec.
      (tramp-read-passwd): Handle "login-as" property.
      
      * test/lisp/net/tramp-tests.el (tramp-test21-file-links):
      Special code for "smb".
      34bedf5d
    • Michael Albinus's avatar
      Minor Tramp fixes · b067fa1f
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
      Fix a bug when renaming.
      
      * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
      (tramp-test42-delay-load, tramp-test42-remote-load-path):
      Skip unless Emacs >= 26.
      b067fa1f
  12. 08 Dec, 2017 1 commit
    • Michael Albinus's avatar
      Minor Tramp fixes · 7eea3144
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
      Fix a bug when renaming.
      
      * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
      (tramp-test42-delay-load, tramp-test42-remote-load-path):
      Skip unless Emacs >= 26.
      7eea3144
  13. 29 Nov, 2017 1 commit
    • Michael Albinus's avatar
      Some minor Tramp corrections · 3dd25aee
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-directory-file-name):
      Handle several trailing slashes correctly.
      (tramp-handle-file-selinux-context): New defun.
      
      * 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-smb.el (tramp-smb-file-name-handler-alist):
      Use `tramp-handle-file-selinux-context'.
      
      * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
      Extend test.
      (tramp-test17-insert-directory): Make check more robust.
      (tramp-test42-auto-load): Combine several let forms.
      (tramp-test42-delay-load, tramp-test42-recursive-load)
      (tramp-test42-remote-load-path, tramp-test43-unload): Rename.
      3dd25aee
  14. 25 Nov, 2017 1 commit
  15. 18 Nov, 2017 1 commit
  16. 05 Nov, 2017 1 commit
    • Michael Albinus's avatar
      Allow "%" in Tramp host names · 8db2b3a7
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-url-file-name): Hexify also host.
      
      * lisp/net/tramp.el (tramp-host-regexp): Allow "%" in host names.
      8db2b3a7
  17. 20 Oct, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#28896 · b500e06f
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-rename-file):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Handle FILENAME
      being a directory.  (Bug#28896)
      
      * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
      (tramp-test12-rename-file): Test also FILENAME being a directory.
      b500e06f
  18. 08 Oct, 2017 1 commit
  19. 07 Oct, 2017 1 commit
    • Michael Albinus's avatar
      Support gio tool in Tramp · bc80da5b
      Michael Albinus authored
      "gvfs-<command>" utilities have been deprecated in GVFS 1.31.1.  We
      must use "gio <command>" tool instead.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping): New defconst.
      (tramp-gvfs-handle-file-notify-add-watch): Support also "gio monitor"
      (tramp-gvfs-gio-tool-p): New defun.
      (tramp-gvfs-send-command): Use it.  Call gio tool if available.
      bc80da5b
  20. 03 Oct, 2017 1 commit
    • Michael Albinus's avatar
      Add support for `file-system-info' in Tramp · a9ac20c1
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-file-name-for-operation):
      Add `file-system-info'.
      
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info): New defun.
      (tramp-adb-file-name-handler-alist): Use it.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-system-attributes)
      (tramp-gvfs-file-system-attributes-regexp): New defconst.
      (tramp-gvfs-handle-file-system-info): New defun.
      (tramp-gvfs-file-name-handler-alist): Use it.
      (tramp-gvfs-get-directory-attributes): Fix property name.
      (tramp-gvfs-get-root-attributes): Support also file system attributes.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-system-info): New defun.
      (tramp-sh-file-name-handler-alist): Use it.
      (tramp-sh-handle-insert-directory): Insert size information.
      (tramp-get-remote-df): New defun.
      
      * lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info): New defun.
      (tramp-smb-file-name-handler-alist): Use it.
      (tramp-smb-handle-insert-directory): Insert size information.
      
      * test/lisp/net/tramp-tests.el (tramp-test37-file-system-info):
      New test.
      (tramp-test38-asynchronous-requests)
      (tramp-test39-recursive-load, tramp-test40-remote-load-path)
      (tramp-test41-unload): Rename.
      a9ac20c1
  21. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  22. 04 Sep, 2017 1 commit
    • Michael Albinus's avatar
      Work on Tramp's (symbolic) links · 8a65d7a7
      Michael Albinus authored
      * doc/misc/tramp.texi (Traces and Profiles): Mention the
      backtrace when tramp-verbose is greater than or equal to 10.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      Use `tramp-handle-add-name-to-file'.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
      `tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.
      
      * lisp/net/tramp-smb.el (tramp-smb-errors):
      Add "NT_STATUS_CONNECTION_DISCONNECTED" and
      "NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
      (tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
      (tramp-smb-do-file-attributes-with-stat): Return non-nil only
      if one of the attributes is non-nil.
      (tramp-smb-handle-file-local-copy): Use `file-truename'.
      (tramp-smb-handle-file-truename): Move to tramp.el.
      (tramp-smb-handle-insert-directory): Show symlinks.
      (tramp-smb-handle-make-symbolic-link): Improve.
      (tramp-smb-read-file-entry): Handle extended file modes in Samba.
      
      * lisp/net/tramp.el (tramp-handle-add-name-to-file)
      (tramp-handle-file-truename): New defuns.
      
      * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
      (tramp--test-check-files): Make check for "smb".
      8a65d7a7
  23. 12 Aug, 2017 1 commit
    • Michael Albinus's avatar
      Implement EXCL of write-region for Tramp · ec5cfaa4
      Michael Albinus authored
      * lisp/net/ange-ftp.el (ange-ftp-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region)
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region)
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      Implement MUSTBENEW.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
      (tramp-sh-handle-add-name-to-file)
      (tramp-do-copy-or-rename-file)
      * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
      Adapt error message for `file-already-exists'.
      
      * src/lisp.h:
      * src/eval.c (call8): New function.
      
      * src/fileio.c (write_region): Pass also lockname and
      mustbenew to the file name handler.
      
      * test/lisp/net/tramp-tests.el (tramp-test10-write-region):
      Add tests for MUSTBENEW.
      ec5cfaa4
  24. 14 Jun, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#27315 · 164fcc6f
      Michael Albinus authored
      * lisp/net/tramp-cache.el (tramp-cache-read-persistent-data):
      New defvar.
      (top): Use it.
      
      * lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
      Check for connected, not for connectable.  (Bug#27315)
      (tramp-process-actions):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
      Use `tramp-cache-read-persistent-data'.
      
      * test/lisp/net/tramp-tests.el (top): Set also
      `tramp-cache-read-persistent-data'.
      164fcc6f
  25. 12 Jun, 2017 1 commit
    • Michael Albinus's avatar
      Handle port and domain in Tramp's password cache · 7dfc8353
      Michael Albinus authored
      * doc/misc/tramp.texi (Password handling): Explain port and
      domain handling in authinfo.
      
      * lisp/net/tramp.el (tramp-process-actions, tramp-clear-passwd):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handler-askpassword):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
      (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): Handle also domain and port.
      7dfc8353
  26. 11 Jun, 2017 1 commit
    • Michael Albinus's avatar
      Some further improvements for tramp-gvfs.el · 87958db4
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
      (tramp-gvfs-get-file-attributes)
      (tramp-gvfs-maybe-open-connection): Handle davs? properly.
      (tramp-gvfs-handler-askquestion): Improve `yes-or-no-p' prompt.
      Show question also in batch mode.  Cache result.
      
      * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
      Support completion for host names and ports.
      87958db4
  27. 10 Jun, 2017 1 commit
    • Michael Albinus's avatar
      Fix domain port and handling in tramp-gvfs.el · f361c54e
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
      Return nil if BYTE-ARRAY is nil.
      (tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
      Fix domain and port handling.
      
      * lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
      Ignore errors.
      f361c54e
  28. 28 May, 2017 1 commit
    • Michael Albinus's avatar
      Some tweaks, almost all for Tramp adb method · e7bb7cc2
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      Use `make-tramp-file-name'.
      (tramp-adb-get-device): Use `tramp-file-name-port-or-default'.
      (tramp-adb-maybe-open-connection): Set "prompt" property.
      (tramp-adb-wait-for-output): Use it.
      
      * lisp/net/tramp-cache.el (tramp-cache-print): Use `elt'.
      (tramp-dump-connection-properties): Check also that there are
      properties to be saved.  Don't save "started" property of
      "ftp" method.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
      Use `make-tramp-file-name'.
      
      * lisp/net/tramp.el (tramp-remote-file-name-spec-regexp):
      Host could be empty.
      (tramp-file-name-port-or-default): New defun.
      (tramp-dissect-file-name): Simplify `make-tramp-file-name' call.
      (tramp-handle-file-name-case-insensitive-p): Use a progress reporter.
      (tramp-call-process, tramp-call-process-region):
      Use `make-tramp-file-name'.
      
      * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
      Revert change from 2017-05-24.
      (tramp-test05-expand-file-name-relative): Let it also pass for
      "adb" method.
      e7bb7cc2
  29. 26 May, 2017 1 commit
    • Michael Albinus's avatar
      Remove Emacs 23 compat code from Tramp · b3032988
      Michael Albinus authored
      * doc/misc/tramp.texi (Remote processes): Don't mention
      Emacs 24 explicitely.
      (Frequently Asked Questions): Remove Emacs 23 from
      compatibility list.
      
      * lisp/net/tramp.el:
      * lisp/net/tramp-adb.el:
      * lisp/net/tramp-cache.el:
      * lisp/net/tramp-gvfs.el:
      * lisp/net/tramp-sh.el:
      * lisp/net/tramp-smb.el: Replace compat function calls.
      
      * lisp/net/tramp-compat.el (remote-file-name-inhibit-cache)
      (tramp-compat-condition-case-unless-debug)
      (tramp-compat-copy-file, tramp-compat-copy-directory)
      (tramp-compat-delete-file, tramp-compat-delete-directory)
      (tramp-compat-process-live-p): Remove them.
      
      * lisp/net/trampver.el: Make version check fit for Emacs 24.
      b3032988
  30. 25 May, 2017 1 commit
    • Michael Albinus's avatar
      Switch Tramp to cl-lib · 1a9ce7c5
      Michael Albinus authored
      * lisp/net/tramp-compat.el (cl-lib): Require it rather than cl.
      
      * lisp/net/tramp-ftp.el: Don't require cl.
      
      * lisp/net/tramp-gvfs.el: Don't require cl.
      (tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-connection-mounted-p): Use `cl-*' macros.
      
      * lisp/net/tramp-sh.el: Don't require cl.
      (tramp-set-file-uid-gid): Use `shell-quote-argument'.
      (tramp-sh-gvfs-monitor-dir-process-filter)
      (tramp-sh-inotifywait-process-filter): Use `cl-*' macros.
      
      * lisp/net/tramp-smb.el: Don't require cl.
      (tramp-smb-read-file-entry): Use `cl-*' macros.
      
      * lisp/net/tramp.el (cl-lib): Require it rather than cl.
      (tramp-parse-file, tramp-parse-shostkeys-sknownhosts)
      (tramp-parse-passwd, tramp-parse-etc-group)
      (tramp-parse-putty): Use `cl-*' macros.
      1a9ce7c5
  31. 24 May, 2017 1 commit
    • Michael Albinus's avatar
      Introduce a defstruct `tramp-file-name' as central data structure. · dca22e86
      Michael Albinus authored
      This solves also Bug#27009.
      
      * lisp/net/tramp.el (tramp-current-domain)
      (tramp-current-port): New defvars.
      (tramp-file-name): New defstruct.
      (tramp-file-name-user-domain, tramp-file-name-host-port)
      (tramp-file-name-equal-p): New defuns.
      (tramp-file-name-p, tramp-file-name-method)
      (tramp-file-name-user, tramp-file-name-host)
      (tramp-file-name-localname, tramp-file-name-hop)
      (tramp-file-name-real-user, tramp-file-name-domain)
      (tramp-file-name-real-host, tramp-file-name-port):
      Remove defuns.  They are provided by the defstruct, or not
      needed anymore.
      (tramp-dissect-file-name, tramp-buffer-name)
      (tramp-make-tramp-file-name, tramp-get-buffer)
      (tramp-set-connection-local-variables)
      (tramp-debug-buffer-name, tramp-message)
      (tramp-error-with-buffer, with-parsed-tramp-file-name)
      (tramp-completion-dissect-file-name1)
      (tramp-handle-file-name-as-directory)
      (tramp-handle-file-name-directory)
      (tramp-handle-file-remote-p, tramp-handle-file-symlink-p)
      (tramp-handle-find-backup-file-name)
      (tramp-handle-insert-file-contents, tramp-process-actions)
      (tramp-check-cached-permissions, tramp-local-host-p)
      (tramp-get-remote-tmpdir, tramp-call-process)
      (tramp-call-process-region, tramp-read-passwd)
      (tramp-clear-passwd):
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
      (tramp-adb-handle-expand-file-name)
      (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file)
      (tramp-adb-handle-process-file)
      (tramp-adb-maybe-open-connection):
      * lisp/net/tramp-cache.el (tramp-get-hash-table)
      (tramp-get-file-property, tramp-set-file-property)
      (tramp-flush-file-property, tramp-flush-directory-property)
      (tramp-get-connection-property)
      (tramp-set-connection-property, tramp-connection-property-p)
      (tramp-flush-connection-property, tramp-cache-print)
      (tramp-list-connections, tramp-dump-connection-properties)
      (tramp-parse-connection-properties):
      * lisp/net/tramp-cmds.el (tramp-cleanup-connection):
      * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
      (tramp-gvfs-url-file-name, tramp-gvfs-handler-askpassword)
      (tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-mount-spec, tramp-gvfs-get-remote-uid)
      (tramp-gvfs-get-remote-gid)
      (tramp-gvfs-maybe-open-connection):
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
      (tramp-do-copy-or-rename-file-out-of-band)
      (tramp-sh-handle-expand-file-name)
      (tramp-sh-handle-start-file-process)
      (tramp-sh-handle-process-file, tramp-compute-multi-hops)
      (tramp-maybe-open-connection)
      (tramp-make-copy-program-file-name, tramp-get-remote-path)
      (tramp-get-inline-coding):
      * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
      (tramp-smb-handle-expand-file-name)
      (tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
      (tramp-smb-handle-set-file-acl)
      (tramp-smb-maybe-open-connection): Adapt according to defstruct.
      dca22e86
  32. 09 May, 2017 1 commit
    • Noam Postavsky's avatar
      Revert "Output number of characters added to file (Bug#354)" · daaec72a
      Noam Postavsky authored
      The extra message text turned out to be quite annoying in practice,
      and is generally more trouble than it's worth.  Also revert several
      related changes.
      
      Partially revert "Handle `write-region' messages in Tramp properly"
      Revert "New var write-region-verbose, default nil"
      Revert "* src/fileio.c (write_region): Don't say "1 characters".  (Bug#26796)"
      Revert "Minor tuneup of write-region change"
      Revert "Adjust write-region so file name is at the beginning again"
      Revert "Fix handling of non-integer START param to write-region"
      Revert "Output number of characters added to file (Bug#354)"
      
      * doc/emacs/files.texi (Misc File Ops):
      * etc/NEWS:
      * lisp/epa-file.el (epa-file-write-region):
      * lisp/gnus/mm-util.el (mm-append-to-file):
      * lisp/jka-compr.el (jka-compr-write-region):
      * lisp/net/ange-ftp.el (ange-ftp-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      * lisp/net/tramp.el (tramp-handle-write-region-message):
      * src/fileio.c (write_region, syms_of_fileio):
      * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Remove
      extra characters from file writing messages.
      daaec72a
  33. 08 May, 2017 1 commit
    • Michael Albinus's avatar
      Handle `write-region' messages in Tramp properly · 73e3ed48
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-write-region-message): New defsubst.
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Use it.
      
      * lisp/net/tramp.el (tramp-password-prompt-regexp)
      (tramp-completion-mode-p):
      * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable)
      (tramp-append-tramp-buffers):
      * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
      Use `bound-and-true-p'.
      
      * lisp/net/tramp-compat.el (tramp-compat-delete-file):
      Don't check for `boundp' anymore.
      
      * test/lisp/net/tramp-tests.el (ert-x): Require it.
      (tramp--test-messages): New defvar.
      (tramp-test10-write-region): Extend test.
      73e3ed48
  34. 04 May, 2017 1 commit
    • Michael Albinus's avatar
      Set process property `adjust-window-size-function' to `ignore' in Tramp · b0370a89
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
      (tramp-adb-maybe-open-connection):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
      (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): Set process property
      `adjust-window-size-function' to `ignore'.
      b0370a89
  35. 07 Apr, 2017 3 commits
    • Noam Postavsky's avatar
      Adjust write-region so file name is at the beginning again · c3236593
      Noam Postavsky authored
      * lisp/epa-file.el (epa-file-write-region):
      * lisp/gnus/mm-util.el (mm-append-to-file):
      * lisp/jka-compr.el (jka-compr-write-region):
      * lisp/net/ange-ftp.el (ange-ftp-write-region):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * src/fileio.c (write_region): Put file name at the beginning and move
      number of characters to the end of the message.
      c3236593
    • Noam Postavsky's avatar
      Fix handling of non-integer START param to write-region · 9e27e0d1
      Noam Postavsky authored
      The previous patch for Bug#354 incorrectly assumed that START would
      always be an integer.
      
      * lisp/epa-file.el (epa-file-write-region):
      * lisp/jka-compr.el (jka-compr-write-region):
      * lisp/net/ange-ftp.el (ange-ftp-write-region):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * src/fileio.c (write_region): Handle nil and string values of START.
      9e27e0d1
    • Jeff Clough's avatar
      Output number of characters added to file (Bug#354) · cd0a7951
      Jeff Clough authored
      * fileio.c (write_region):
      * epa-file.el (epa-file-write-region):
      * jka-compr.el (jka-compr-write-region):
      * ange-ftp.el (ange-ftp-write-region):
      * tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * tramp-sh.el (tramp-sh-handle-write-region):
      * mm-util.el (mm-append-to-file): Functions now output
      characters written in addition to file name.
      * files.texi: Added documentation to write-region and
      append-to-file describing their output.
      cd0a7951
  36. 26 Mar, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#26258 · 8884baf3
      Michael Albinus authored
      * 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-sh.el (tramp-sh-file-name-handler-alist):
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      Autoload.  Call `tramp-register-foreign-file-name-handler'.  (Bug#26258)
      
      * lisp/net/tramp.el (tramp-autoload-file-name-handler): Remove.
      (tramp-register-autoload-file-name-handlers)
      (tramp-register-file-name-handlers): Do not handle
      `tramp-autoload-file-name-handler' anymore.  Mark `operations'
      the handlers are responsible for.
      (tramp-register-foreign-file-name-handler): New defun.
      8884baf3