Commit ae5602c5 authored by Michael Albinus's avatar Michael Albinus

Backport Tramp changes from trunk.

* net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'.
(tramp-adb-handle-write-region): Improve messages.
(tramp-adb-maybe-open-connection): Don't set
`tramp-current-*' variables.

* net/tramp-cache.el (tramp-flush-file-function): Simplify check.
Suppress debug messages.

* net/tramp-ftp.el (top): Remove special handling for URL syntax.
(tramp-ftp-file-name-handler):

* net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
(tramp-gvfs-methods-mounttracker)
(tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled'
during initialization. 
(tramp-gvfs-handle-delete-file): Flush file properties, not
directory properties.
(tramp-gvfs-handle-file-attributes): Use `string-to-number' when
reading "unix::mode".
(tramp-gvfs-handle-file-name-all-completions):
Use "-h" option for "gvfs-ls".
(tramp-gvfs-url-file-name): Apply `cons' where appropriate.
`user' and `localname' could be nil.
(tramp-gvfs-send-command): Simplify traces.

* net/tramp-sh.el (vc-handled-backends, vc-bzr-program)
(vc-git-program, vc-hg-program): Declare.
(tramp-methods) <sftp>: Remove.  It has never worked satisfactorily.
(tramp-methods) <nc>: Add new method.
(tramp-methods) <telnet>: Redirect stderr to "/dev/null".
(tramp-methods) <plink, plinkx, pscp, psftp>: Improve
`tramp-login-args'.
(tramp-default-user-alist): Add "nc".
(top): Remove completion function for "sftp".  Add completion
functions for "nc" and "psftp".
(tramp-sh-handle-set-visited-file-modtime):
(tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'.
(tramp-do-copy-or-rename-file-out-of-band):
Use cached "remote-copy-args" value, if available.  (Bug#18199)
Tweak docstring.  Implement support for "nc" method.
(tramp-sh-handle-expand-file-name, tramp-local-coding-commands)
(tramp-remote-coding-commands, tramp-call-local-coding-command):
Tweak docstring.
(tramp-sh-handle-start-file-process): Expand `default-directory'.
(tramp-sh-handle-write-region): Tweak error message.
(tramp-sh-handle-vc-registered): Remove backends when the remote
binary does not exist.
(tramp-open-connection-setup-interactive-shell):
Prefer utf-8 coding.  (Bug#17859)
(tramp-find-inline-encoding): Do not raise an error.
(tramp-make-copy-program-file-name): Tweak docstring.  Handle also
the "nc" case.  Quote result also locally.
(tramp-get-remote-id): Check also for "gid".
(tramp-get-remote-python):

* net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-set-file-acl): Use `start-process'.
(tramp-smb-handle-insert-directory): Use progress reporter.
(tramp-smb-handle-rename-file): Flush also file properties of
FILENAME.

* net/tramp.el (tramp-methods): Tweak docstring.
(tramp-file-name-handler): Apply `cons' where appropriate.
(tramp-handle-file-accessible-directory-p): Check for
`file-readable-p' instead of `file-executable-p'.
(tramp-handle-shell-command): Use `display-buffer'.  (Bug#18326)
(tramp-handle-unhandled-file-name-directory): Return "/".
(tramp-check-cached-permissions):
Use `tramp-compat-file-attributes'.
(tramp-call-process): Add new argument VEC.  Adapt callees in all
tramp*.el files.

* net/trampver.el: Update release number.
parent f902d418
2014-11-01 Michael Albinus <michael.albinus@gmx.de>
Backport Tramp changes from trunk.
* net/tramp.el (tramp-methods): Tweak docstring.
(tramp-file-name-handler): Apply `cons' where appropriate.
(tramp-handle-file-accessible-directory-p): Check for
`file-readable-p' instead of `file-executable-p'.
(tramp-handle-shell-command): Use `display-buffer'. (Bug#18326)
(tramp-handle-unhandled-file-name-directory): Return "/".
(tramp-check-cached-permissions):
Use `tramp-compat-file-attributes'.
(tramp-call-process): Add new argument VEC. Adapt callees in all
tramp*.el files.
* net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'.
(tramp-adb-handle-write-region): Improve messages.
(tramp-adb-maybe-open-connection): Don't set
`tramp-current-*' variables.
* net/tramp-cache.el (tramp-flush-file-function): Simplify check.
Suppress debug messages.
* net/tramp-ftp.el (top): Remove special handling for URL syntax.
(tramp-ftp-file-name-handler):
* net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
(tramp-gvfs-methods-mounttracker)
(tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled'
during initialization. (Bug#18774)
(tramp-gvfs-handle-delete-file): Flush file properties, not
directory properties.
(tramp-gvfs-handle-file-attributes): Use `string-to-number' when
reading "unix::mode".
(tramp-gvfs-handle-file-name-all-completions):
Use "-h" option for "gvfs-ls".
(tramp-gvfs-url-file-name): Apply `cons' where appropriate.
`user' and `localname' could be nil.
(tramp-gvfs-send-command): Simplify traces.
* net/tramp-sh.el (vc-handled-backends, vc-bzr-program)
(vc-git-program, vc-hg-program): Declare.
(tramp-methods) <sftp>: Remove. It has never worked satisfactorily.
(tramp-methods) <nc>: Add new method.
(tramp-methods) <telnet>: Redirect stderr to "/dev/null".
(tramp-methods) <plink, plinkx, pscp, psftp>: Improve
`tramp-login-args'.
(tramp-default-user-alist): Add "nc".
(top): Remove completion function for "sftp". Add completion
functions for "nc" and "psftp".
(tramp-sh-handle-set-visited-file-modtime):
(tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'.
(tramp-do-copy-or-rename-file-out-of-band):
Use cached "remote-copy-args" value, if available. (Bug#18199)
Tweak docstring. Implement support for "nc" method.
(tramp-sh-handle-expand-file-name, tramp-local-coding-commands)
(tramp-remote-coding-commands, tramp-call-local-coding-command):
Tweak docstring.
(tramp-sh-handle-start-file-process): Expand `default-directory'.
(tramp-sh-handle-write-region): Tweak error message.
(tramp-sh-handle-vc-registered): Remove backends when the remote
binary does not exist.
(tramp-open-connection-setup-interactive-shell):
Prefer utf-8 coding. (Bug#17859)
(tramp-find-inline-encoding): Do not raise an error.
(tramp-make-copy-program-file-name): Tweak docstring. Handle also
the "nc" case. Quote result also locally.
(tramp-get-remote-id): Check also for "gid".
(tramp-get-remote-python):
* net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-set-file-acl): Use `start-process'.
(tramp-smb-handle-insert-directory): Use progress reporter.
(tramp-smb-handle-rename-file): Flush also file properties of
FILENAME.
* net/trampver.el: Update release number.
2014-11-01 Reuben Thomas <rrt@sc3d.org>
* net/tramp.el (tramp-handle-file-symlink-p):
* net/tramp-ftp.el (tramp-ftp-file-name-handler): Remove a comment
about VMS, which we no longer support.
2014-11-01 Stefan Monnier <monnier@iro.umontreal.ca>
* net/tramp-sh.el (tramp-sh-handle-vc-registered): Don't modify
the global vc-handled-backends (bug#18535).
2014-11-01 Jérémy Compostella <jeremy.compostella@intel.com>
Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Reduce the amount of set environment variable commands.
2014-11-01 Paul Eggert <eggert@cs.ucla.edu>
* net/tramp-sh.el (tramp-get-remote-touch): Omit unnecessary call to
current-time.
2014-11-01 Emilio C. Lopes <eclig@gmx.net>
* net/tramp-sh.el (tramp-get-remote-python): Also search for
executables named "python2" or "python3".
(tramp-get-remote-uid-with-python): Use parentheses around
arguments to `print' to make it compatible with Python 3.
(tramp-get-remote-gid-with-python): Ditto. (Bug#18118)
2014-10-31 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (newline): Add assertions to try and help catch bug#18913.
......
......@@ -458,9 +458,7 @@ Emacs dired can't find files."
(insert " " (mapconcat 'identity sorted-lines "\n ")))
;; Add final newline.
(goto-char (point-max))
(unless (= (point) (line-beginning-position))
(insert "\n"))))
(unless (bolp) (insert "\n"))))
(defun tramp-adb-ls-output-time-less-p (a b)
"Sort \"ls\" output by time, descending."
......@@ -609,10 +607,10 @@ But handle the case, if the \"test\" command is not available."
'write-region
(list start end tmpfile append 'no-message lockname confirm))
(with-tramp-progress-reporter
v 3 (format "Moving tmp file %s to %s" tmpfile filename)
v 3 (format "Moving tmp file `%s' to `%s'" tmpfile filename)
(unwind-protect
(when (tramp-adb-execute-adb-command v "push" tmpfile localname)
(tramp-error v 'file-error "Cannot write: `%s' filename"))
(tramp-error v 'file-error "Cannot write: `%s'" filename))
(delete-file tmpfile)))
(when (or (eq visit t) (stringp visit))
......@@ -998,7 +996,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(with-temp-buffer
(prog1
(unless
(zerop (apply 'tramp-call-process tramp-adb-program nil t nil args))
(zerop
(apply 'tramp-call-process vec tramp-adb-program nil t nil args))
(buffer-string))
(tramp-message vec 6 "%s" (buffer-string)))))
......@@ -1031,7 +1030,7 @@ This happens for Android >= 4.0."
(defun tramp-adb-send-command-and-check
(vec command)
"Run COMMAND and and check its exit status.
"Run COMMAND and check its exit status.
Sends `echo $?' along with the COMMAND for checking the exit status. If
COMMAND is nil, just sends `echo $?'. Returns the exit status found."
(tramp-adb-send-command
......@@ -1107,10 +1106,7 @@ connection if a previous connection has died for some reason."
(and p (processp p) (memq (process-status p) '(run open)))
(save-match-data
(when (and p (processp p)) (delete-process p))
(setq tramp-current-method (tramp-file-name-method vec)
tramp-current-user (tramp-file-name-user vec)
tramp-current-host (tramp-file-name-host vec)
devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
(setq devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
(if (not devices)
(tramp-error vec 'file-error "No device connected"))
(if (and (> (length host) 0) (not (member host devices)))
......
......@@ -201,15 +201,21 @@ Remove also properties of all files in subdirectories."
;; Reverting or killing a buffer should also flush file properties.
;; They could have been changed outside Tramp. In eshell, "ls" would
;; not show proper directory contents when a file has been copied or
;; deleted before.
;; deleted before. We must apply `save-match-data', because it would
;; corrupt other packages otherwise (reported from org).
(defun tramp-flush-file-function ()
"Flush all Tramp cache properties from `buffer-file-name'."
(let ((bfn (if (stringp (buffer-file-name))
(buffer-file-name)
default-directory)))
(when (tramp-tramp-file-p bfn)
(with-parsed-tramp-file-name bfn nil
(tramp-flush-file-property v localname)))))
"Flush all Tramp cache properties from `buffer-file-name'.
This is suppressed for temporary buffers."
(save-match-data
(unless (or (null (buffer-name))
(string-match "^\\( \\|\\*\\)" (buffer-name)))
(let ((bfn (if (stringp (buffer-file-name))
(buffer-file-name)
default-directory))
(tramp-verbose 0))
(when (tramp-tramp-file-p bfn)
(with-parsed-tramp-file-name bfn nil
(tramp-flush-file-property v localname)))))))
(add-hook 'before-revert-hook 'tramp-flush-file-function)
(add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
......
......@@ -120,17 +120,6 @@ present for backward compatibility."
tramp-ftp-method
'((tramp-parse-netrc "~/.netrc"))))
;; If there is URL syntax, `substitute-in-file-name' needs special
;; handling.
(put 'substitute-in-file-name 'ange-ftp 'tramp-handle-substitute-in-file-name)
(add-hook 'tramp-ftp-unload-hook
(lambda ()
(setplist 'substitute-in-file-name
(delete 'ange-ftp
(delete 'tramp-handle-substitute-in-file-name
(symbol-plist
'substitute-in-file-name))))))
;;;###tramp-autoload
(defun tramp-ftp-file-name-handler (operation &rest args)
"Invoke the Ange-FTP handler for OPERATION.
......@@ -189,12 +178,7 @@ pass to the OPERATION."
(ignore-errors (delete-file tmpfile)))))
;; Normally, the handlers must be discarded.
;; `inhibit-file-name-handlers' isn't sufficient, because the
;; local file name could be in Tramp syntax as well (for
;; example, returning VMS file names like "/DISK$CAM:/AAA").
;; That's why we set also `tramp-mode' to nil.
(t (let* (;(tramp-mode nil)
(inhibit-file-name-handlers
(t (let* ((inhibit-file-name-handlers
(list 'tramp-file-name-handler
'tramp-completion-file-name-handler
(and (eq inhibit-file-name-operation operation)
......
......@@ -49,14 +49,14 @@
;; The customer option `tramp-gvfs-methods' contains the list of
;; supported connection methods. Per default, these are "dav",
;; "davs", "obex" and "synce". Note that with "obex" it might be
;; necessary to pair with the other bluetooth device, if it hasn't
;; "davs", "obex", "sftp" and "synce". Note that with "obex" it might
;; be necessary to pair with the other bluetooth device, if it hasn't
;; been done already. There might be also some few seconds delay in
;; discovering available bluetooth devices.
;; Other possible connection methods are "ftp", "sftp" and "smb".
;; When one of these methods is added to the list, the remote access
;; for that method is performed via GVFS instead of the native Tramp
;; Other possible connection methods are "ftp" and "smb". When one of
;; these methods is added to the list, the remote access for that
;; method is performed via GVFS instead of the native Tramp
;; implementation.
;; GVFS offers even more connection methods. The complete list of
......@@ -110,7 +110,7 @@
(require 'custom))
;;;###tramp-autoload
(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce")
(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "sftp" "synce")
"List of methods for remote files, accessed with GVFS."
:group 'tramp
:version "23.2"
......@@ -167,9 +167,10 @@
;; Introspection data exist since GVFS 1.14. If there are no such
;; data, we expect an earlier interface.
(defconst tramp-gvfs-methods-mounttracker
(dbus-introspect-get-method-names
:session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
tramp-gvfs-interface-mounttracker)
(and tramp-gvfs-enabled
(dbus-introspect-get-method-names
:session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
tramp-gvfs-interface-mounttracker))
"The list of supported methods of the mount tracking interface.")
(defconst tramp-gvfs-listmounts
......@@ -187,9 +188,10 @@ It has been changed in GVFS 1.14.")
It has been changed in GVFS 1.14.")
(defconst tramp-gvfs-mountlocation-signature
(dbus-introspect-get-signature
:session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
tramp-gvfs-interface-mounttracker tramp-gvfs-mountlocation)
(and tramp-gvfs-enabled
(dbus-introspect-get-signature
:session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
tramp-gvfs-interface-mounttracker tramp-gvfs-mountlocation))
"The D-Bus signature of the \"mountLocation\" method.
It has been changed in GVFS 1.14.")
......@@ -661,7 +663,7 @@ is no information where to trace the message.")
"Like `delete-file' for Tramp files."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-directory-property v localname)
(tramp-flush-file-property v localname)
(unless
(tramp-gvfs-send-command
v (if (and trash delete-by-moving-to-trash) "gvfs-trash" "gvfs-rm")
......@@ -794,7 +796,8 @@ is no information where to trace the message.")
(goto-char (point-min))
(setq res-filemodes
(if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t)
(tramp-file-mode-from-int (match-string 1))
(tramp-file-mode-from-int
(string-to-number (match-string 1)))
(if dirp "drwx------" "-rwx------")))
;; ... inode and device
(goto-char (point-min))
......@@ -899,7 +902,7 @@ is no information where to trace the message.")
entry)
;; Get a list of directories and files.
(tramp-gvfs-send-command
v "gvfs-ls" (tramp-gvfs-url-file-name directory))
v "gvfs-ls" "-h" (tramp-gvfs-url-file-name directory))
;; Now grab the output.
(with-temp-buffer
......@@ -1107,7 +1110,7 @@ is no information where to trace the message.")
(defun tramp-gvfs-url-file-name (filename)
"Return FILENAME in URL syntax."
;; "/" must NOT be hexlified.
(let ((url-unreserved-chars (append '(?/) url-unreserved-chars))
(let ((url-unreserved-chars (cons ?/ url-unreserved-chars))
result)
(setq
result
......@@ -1118,9 +1121,9 @@ is no information where to trace the message.")
(setq user
(concat (match-string 2 user) ";" (match-string 1 user))))
(url-parse-make-urlobj
method (url-hexify-string user) nil
method (and user (url-hexify-string user)) nil
(tramp-file-name-real-host v) (tramp-file-name-port v)
(url-hexify-string localname) nil nil t))
(and localname (url-hexify-string localname)) nil nil t))
(url-parse-make-urlobj
"file" nil nil nil nil
(url-hexify-string (file-truename filename)) nil nil t))))
......@@ -1555,14 +1558,10 @@ connection if a previous connection has died for some reason."
"Send the COMMAND with its ARGS to connection VEC.
COMMAND is usually a command from the gvfs-* utilities.
`call-process' is applied, and it returns `t' if the return code is zero."
(let (result)
(with-current-buffer (tramp-get-connection-buffer vec)
(tramp-gvfs-maybe-open-connection vec)
(erase-buffer)
(tramp-message vec 6 "%s %s" command (mapconcat 'identity args " "))
(setq result (apply 'tramp-call-process command nil t nil args))
(tramp-message vec 6 "\n%s" (buffer-string))
(zerop result))))
(with-current-buffer (tramp-get-connection-buffer vec)
(tramp-gvfs-maybe-open-connection vec)
(erase-buffer)
(zerop (apply 'tramp-call-process vec command nil t nil args))))
;; D-Bus BLUEZ functions.
......@@ -1671,7 +1670,7 @@ be used."
(list user host)))
(zeroconf-list-services "_webdav._tcp")))
;; Add completion function for DAV and DAVS methods.
;; Add completion function for SFTP, DAV and DAVS methods.
(when (and tramp-gvfs-enabled
(member zeroconf-service-avahi (dbus-list-known-names :system)))
(zeroconf-init tramp-gvfs-zeroconf-domain)
......
This diff is collapsed.
......@@ -447,8 +447,7 @@ pass to the OPERATION."
(expand-file-name
tramp-temp-name-prefix
(tramp-compat-temporary-file-directory))))
(args (list tramp-smb-program
(concat "//" real-host "/" share) "-E")))
(args (list (concat "//" real-host "/" share) "-E")))
(if (not (zerop (length real-user)))
(setq args (append args (list "-U" real-user)))
......@@ -495,10 +494,11 @@ pass to the OPERATION."
;; Use an asynchronous processes. By this,
;; password can be handled.
(let* ((default-directory tmpdir)
(p (start-process-shell-command
(p (apply
'start-process
(tramp-get-connection-name v)
(tramp-get-connection-buffer v)
(mapconcat 'identity args " "))))
tramp-smb-program args)))
(tramp-message
v 6 "%s" (mapconcat 'identity (process-command p) " "))
......@@ -938,99 +938,100 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(setq filename (file-name-as-directory filename))
(setq filename (directory-file-name filename)))
(with-parsed-tramp-file-name filename nil
(save-match-data
(let ((base (file-name-nondirectory filename))
;; We should not destroy the cache entry.
(entries (copy-sequence
(tramp-smb-get-file-entries
(file-name-directory filename)))))
(when wildcard
(string-match "\\." base)
(setq base (replace-match "\\\\." nil nil base))
(string-match "\\*" base)
(setq base (replace-match ".*" nil nil base))
(string-match "\\?" base)
(setq base (replace-match ".?" nil nil base)))
;; Filter entries.
(setq entries
(delq
nil
(if (or wildcard (zerop (length base)))
;; Check for matching entries.
(mapcar
(lambda (x)
(when (string-match
(format "^%s" base) (nth 0 x))
x))
entries)
;; We just need the only and only entry FILENAME.
(list (assoc base entries)))))
;; Sort entries.
(setq entries
(sort
entries
(lambda (x y)
(if (string-match "t" switches)
;; Sort by date.
(tramp-time-less-p (nth 3 y) (nth 3 x))
;; Sort by name.
(string-lessp (nth 0 x) (nth 0 y))))))
;; Handle "-F" switch.
(when (string-match "F" switches)
(with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
(save-match-data
(let ((base (file-name-nondirectory filename))
;; We should not destroy the cache entry.
(entries (copy-sequence
(tramp-smb-get-file-entries
(file-name-directory filename)))))
(when wildcard
(string-match "\\." base)
(setq base (replace-match "\\\\." nil nil base))
(string-match "\\*" base)
(setq base (replace-match ".*" nil nil base))
(string-match "\\?" base)
(setq base (replace-match ".?" nil nil base)))
;; Filter entries.
(setq entries
(delq
nil
(if (or wildcard (zerop (length base)))
;; Check for matching entries.
(mapcar
(lambda (x)
(when (string-match
(format "^%s" base) (nth 0 x))
x))
entries)
;; We just need the only and only entry FILENAME.
(list (assoc base entries)))))
;; Sort entries.
(setq entries
(sort
entries
(lambda (x y)
(if (string-match "t" switches)
;; Sort by date.
(tramp-time-less-p (nth 3 y) (nth 3 x))
;; Sort by name.
(string-lessp (nth 0 x) (nth 0 y))))))
;; Handle "-F" switch.
(when (string-match "F" switches)
(mapc
(lambda (x)
(when (not (zerop (length (car x))))
(cond
((char-equal ?d (string-to-char (nth 1 x)))
(setcar x (concat (car x) "/")))
((char-equal ?x (string-to-char (nth 1 x)))
(setcar x (concat (car x) "*"))))))
entries))
;; Print entries.
(mapc
(lambda (x)
(when (not (zerop (length (car x))))
(cond
((char-equal ?d (string-to-char (nth 1 x)))
(setcar x (concat (car x) "/")))
((char-equal ?x (string-to-char (nth 1 x)))
(setcar x (concat (car x) "*"))))))
entries))
;; Print entries.
(mapc
(lambda (x)
(when (not (zerop (length (nth 0 x))))
(when (string-match "l" switches)
(let ((attr
(when (tramp-smb-get-stat-capability v)
(ignore-errors
(file-attributes filename 'string)))))
(when (not (zerop (length (nth 0 x))))
(when (string-match "l" switches)
(let ((attr
(when (tramp-smb-get-stat-capability v)
(ignore-errors
(file-attributes filename 'string)))))
(insert
(format
"%10s %3d %-8s %-8s %8s %s "
(or (nth 8 attr) (nth 1 x)) ; mode
(or (nth 1 attr) 1) ; inode
(or (nth 2 attr) "nobody") ; uid
(or (nth 3 attr) "nogroup") ; gid
(or (nth 7 attr) (nth 2 x)) ; size
(format-time-string
(if (tramp-time-less-p
(tramp-time-subtract (current-time) (nth 3 x))
tramp-half-a-year)
"%b %e %R"
"%b %e %Y")
(nth 3 x)))))) ; date
;; We mark the file name. The inserted name could be
;; from somewhere else, so we use the relative file name
;; of `default-directory'.
(let ((start (point)))
(insert
(format
"%10s %3d %-8s %-8s %8s %s "
(or (nth 8 attr) (nth 1 x)) ; mode
(or (nth 1 attr) 1) ; inode
(or (nth 2 attr) "nobody") ; uid
(or (nth 3 attr) "nogroup") ; gid
(or (nth 7 attr) (nth 2 x)) ; size
(format-time-string
(if (tramp-time-less-p
(tramp-time-subtract (current-time) (nth 3 x))
tramp-half-a-year)
"%b %e %R"
"%b %e %Y")
(nth 3 x)))))) ; date
;; We mark the file name. The inserted name could be
;; from somewhere else, so we use the relative file name
;; of `default-directory'.
(let ((start (point)))
(insert
(format
"%s\n"
(file-relative-name
(expand-file-name
(nth 0 x) (file-name-directory filename))
(when full-directory-p (file-name-directory filename)))))
(put-text-property start (1- (point)) 'dired-filename t))
(forward-line)
(beginning-of-line)))
entries)))))
"%s\n"
(file-relative-name
(expand-file-name
(nth 0 x) (file-name-directory filename))
(when full-directory-p (file-name-directory filename)))))
(put-text-property start (1- (point)) 'dired-filename t))
(forward-line)
(beginning-of-line)))
entries))))))
(defun tramp-smb-handle-make-directory (dir &optional parents)
"Like `make-directory' for Tramp files."
......@@ -1277,6 +1278,8 @@ target of the symlink differ."
;; We must also flush the cache of the directory, because
;; `file-attributes' reads the values from there.
(tramp-flush-file-property v1 (file-name-directory v1-localname))
(tramp-flush-file-property v1 v1-localname)
(tramp-flush-file-property v2 (file-name-directory v2-localname))
(tramp-flush-file-property v2 v2-localname)
(unless (tramp-smb-get-share v2)
......@@ -1349,7 +1352,7 @@ target of the symlink differ."
;; Use an asynchronous processes. By this, password can
;; be handled.
(let ((p (apply
'start-process-shell-command
'start-process
(tramp-get-connection-name v)
(tramp-get-connection-buffer v)
tramp-smb-acl-program args)))
......
......@@ -240,7 +240,7 @@ pair of the form (KEY VALUE). The following KEYs are defined:
tamper the process output.
* `tramp-copy-program'
This specifies the name of the program to use for remotely copying
the file; this might be the absolute filename of rcp or the name of
the file; this might be the absolute filename of scp or the name of
a workalike program. It is always applied on the local host.
* `tramp-copy-args'
This specifies the list of parameters to pass to the above mentioned
......@@ -248,6 +248,13 @@ pair of the form (KEY VALUE). The following KEYs are defined:
* `tramp-copy-env'
A list of environment variables and their values, which will
be set when calling `tramp-copy-program'.
* `tramp-remote-copy-program'
The listener program to be applied on remote side, if needed.
* `tramp-remote-copy-args'
The list of parameters to pass to the listener program, the hints
for `tramp-login-args' also apply here. Additionally, \"%r\" could
be used here and in `tramp-copy-args'. It denotes a randomly
chosen port for the remote listener.
* `tramp-copy-keep-date'
This specifies whether the copying program when the preserves the
timestamp of the original file.
......@@ -275,7 +282,7 @@ pair of the form (KEY VALUE). The following KEYs are defined:
What does all this mean? Well, you should specify `tramp-login-program'
for all methods; this program is used to log in to the remote site. Then,
there are two ways to actually transfer the files between the local and the
remote side. One way is using an additional rcp-like program. If you want
remote side. One way is using an additional scp-like program. If you want
to do this, set `tramp-copy-program' in the method.
Another possibility for file transfer is inline transfer, i.e. the
......@@ -1762,7 +1769,7 @@ Example:
(and (memq system-type '(cygwin windows-nt))
(zerop
(tramp-call-process
"reg" nil nil nil "query" (nth 1 (car v)))))
v "reg" nil nil nil "query" (nth 1 (car v)))))
;; Configuration file.
(file-exists-p (nth 1 (car v)))))
(setq r (delete (car v) r)))
......@@ -2141,13 +2148,13 @@ Falls back to normal file name handler if no Tramp file name handler exists."
((eq result 'non-essential)
(tramp-message
v 5 "Non-essential received in operation %s"
(append (list operation) args))
(cons operation args))
(tramp-run-real-handler operation args))
((eq result 'suppress)
(let (tramp-message-show-message)
(tramp-message
v 1 "Suppress received in operation %s"
(append (list operation) args))
(cons operation args))
(tramp-cleanup-connection v t)
(tramp-run-real-handler operation args)))
(t result)))
......@@ -2157,7 +2164,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
(let (tramp-message-show-message)
(tramp-message
v 1 "Interrupt received in operation %s"
(append (list operation) args)))
(cons operation args)))
;; Propagate the quit signal.