1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

145 Commits

Author SHA1 Message Date
Michael Albinus
b27cc9fc02 Fix problems found while writing a test suite.
* net/tramp.el (tramp-file-name-regexp-unified): Simplify.
(tramp-file-name-for-operation): Use `tramp-tramp-file-p'.
(tramp-handle-substitute-in-file-name): Let-bind `process-environment'
to nil when running original file name handler.  Otherwise,
there are problems with constructs like "$$FOO".

* net/tramp-sh.el (tramp-do-copy-or-rename-file): Use correct prefix
for `localname'.
2013-11-04 15:32:40 +01:00
Daniel Colascione
b9bef71fd3 Tweak Tramp method definition syntax to allow overriding check for localhost-only methods 2013-10-28 19:50:24 -07:00
Michael Albinus
4efc33f01d * net/tramp-sh.el (tramp-sh-handle-copy-directory):
* net/tramp-smb.el (tramp-smb-handle-copy-directory):
Handle COPY-CONTENTS.  (Bug#15737)
2013-10-28 20:30:40 +01:00
Michael Albinus
4c1f03efec Code cleanup.
* net/tramp.el (tramp-debug-message): Do not check for connection
buffer.
(tramp-message): Use "vector" connection property.

* net/tramp.el (tramp-rfn-eshadow-update-overlay)
(tramp-equal-remote, tramp-eshell-directory-change)
* net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file)
* net/tramp-cmds.el (tramp-list-remote-buffers)
(tramp-cleanup-connection, tramp-cleanup-this-connection)
* net/tramp-compat.el (tramp-compat-process-running-p)
* net/tramp-ftp.el (tramp-ftp-file-name-handler)
* net/tramp-gvfs.el (tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-rename-file)
* net/tramp-sh.el (tramp-sh-handle-set-file-times)
(tramp-set-file-uid-gid)
* net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-rename-file): Use `tramp-tramp-file-p' instead
of `file-remote-p'.

* net/tramp.el (tramp-connectable-p, tramp-handle-file-remote-p)
* net/tramp-gw.el (tramp-gw-gw-proc-sentinel)
(tramp-gw-aux-proc-sentinel, tramp-gw-process-filter)
(tramp-gw-open-network-stream): Suppress unrelated traces.

* net/tramp-adb.el (tramp-adb-maybe-open-connection)
* net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Set "vector"
connection property.

* net/tramp-cache.el (top): Suppress traces when reading
presistency file.

* net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Refactor common code.  Improve debug message.
(tramp-maybe-open-connection)
* net/tramp-smb.el (tramp-smb-call-winexe): Do not request
connection buffer too early.

* net/tramp-smb.el (tramp-smb-actions-get-acl): New defconst, renamed
from `tramp-smb-actions-with-acl'.
(tramp-smb-actions-set-acl): New defconst.
(tramp-smb-handle-copy-directory)
(tramp-smb-action-get-acl): New defun, renamed from
`tramp-smb-action-with-acl'.
(tramp-smb-action-set-acl): New defun.
(tramp-smb-handle-set-file-acl): Rewrite.
2013-10-17 21:39:22 +02:00
Michael Albinus
f8f91d5d56 * net/tramp.el (tramp-handle-insert-file-contents): Improve handling
of BEG and END.

* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
`tramp-handle-insert-file-contents'.
(tramp-gvfs-handle-insert-file-contents): Remove function.

* net/tramp-sh.el (tramp-sh-handle-insert-directory): Use
`save-restriction' in order to keep markers.

* net/trampver.el: Update release number.
2013-10-07 14:45:20 +02:00
Michael Albinus
e189e54eea Fix previous patch. 2013-09-19 21:14:26 +02:00
Michael Albinus
85e0591524 * net/tramp-sh.el (tramp-get-remote-id): Do not raise an error.
(tramp-get-remote-uid-with-id, tramp-get-remote-gid-with-id)
(tramp-get-remote-python): New defuns.
(tramp-get-remote-uid-with-perl)
(tramp-get-remote-gid-with-perl): New defuns.  Perl code
contributed by yary <not.com@gmail.com> (tiny change).
(tramp-get-remote-uid-with-python)
(tramp-get-remote-gid-with-python): New defuns.  Python code
contributed by Andrey Tykhonov <atykhonov@gmail.com> (tiny change).
(tramp-get-remote-uid, tramp-get-remote-gid): Use new defuns.
2013-09-19 13:08:01 +02:00
Michael Albinus
35c3d36e0e * net/tramp.el (tramp-check-proper-method-and-host): Rename it from
`tramp-check-proper-host'.  Check for a valid method name.

* net/tramp-adb.el (tramp-adb-maybe-open-connection):
* net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* net/tramp-sh.el (tramp-maybe-open-connection):
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Call it.

* net/tramp-cache.el (tramp-cache-print): Don't print text properties
also for hash values.
2013-09-13 08:03:06 +02:00
Michael Albinus
6480194ca1 * net/tramp.el (tramp-cleanup): Remove. Functionality added to
`tramp-cleanup-connection'.

* net/tramp-cmds.el (tramp-cleanup-connection): Add optional
parameters KEEP-DEBUG and KEEP-PASSWORD.

* net/tramp.el (tramp-file-name-handler):
* net/tramp-adb.el (tramp-adb-maybe-open-connection):
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell)
(tramp-maybe-open-connection):
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Use
`tramp-cleanup-connection'.

* net/tramp-sh.el (tramp-maybe-open-connection): Catch
'uname-changed inside the progress reporter.
2013-09-10 09:45:33 +02:00
Michael Albinus
af9ff9e805 Improve compatibility with older Emacsen, and XEmacs.
* net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
only if it is bound.  It isn't for XEmacs.
(with-tramp-progress-reporter): Do not let-bind `result'.  This
yields to scoping errors in XEmacs.
(tramp-handle-make-auto-save-file-name): New function, moved from
tramp-sh.el.

* net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
for `make-auto-save-file-name'.
(tramp-adb--gnu-switches-to-ash): Use
`tramp-compat-replace-regexp-in-string'.

* net/tramp-cache.el (tramp-cache-print): Call
`substring-no-properties' only if it is bound.  It isn't for XEmacs.

* net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is
bound.  It isn't for XEmacs.

* net/tramp-compat.el (tramp-compat-copy-file): Catch
`wrong-number-of-arguments' error.
(tramp-compat-replace-regexp-in-string): New defun.

* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
for `make-auto-save-file-name'.
(tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for
`copy-file'.
(tramp-gvfs-file-gvfs-monitor-file-process-filter)
(tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
(tramp-synce-list-devices): Use `push' instead of `pushnew'.

* net/tramp-gw.el (tramp-gw-open-network-stream): Use
`tramp-compat-replace-regexp-in-string'.

* net/tramp-sh.el (tramp-sh-file-name-handler-alist): Call
`tramp-handle-make-auto-save-file-name'.
(tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
(tramp-sh-file-gvfs-monitor-dir-process-filter)
(tramp-sh-file-inotifywait-process-filter): Use
`tramp-compat-replace-regexp-in-string'.
(tramp-compute-multi-hops): Use `push' instead of `pushnew'.

* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
for `make-auto-save-file-name'.
(tramp-smb-handle-copy-directory): Call
`tramp-compat-replace-regexp-in-string'.
(tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
(tramp-smb-handle-copy-file): Improve error message.
(tramp-smb-handle-rename-file): Rename directly only in case
`newname' does not exist yet.  This is a restriction of smbclient.
(tramp-smb-maybe-open-connection): Rerun the function only when
`auth-sources' is non-nil.
2013-09-08 17:04:10 +02:00
Stefan Monnier
38726039b7 * lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
* lisp/net/tramp-smb.el (tramp-smb-get-file-entries):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory)
(tramp-compute-multi-hops): Fix misuses of `add-to-list'.
2013-09-03 16:14:58 -04:00
Michael Albinus
78fc2530af * minibuffer.el: Revert change from 2013-08-20.
* net/tramp.el (tramp-find-method, tramp-find-user): Mark result
with text property `tramp-default', if appropriate.
(tramp-check-proper-host): New defun.
(tramp-dissect-file-name): Do not check hostname.  Revert change
of 2013-03-18.
(tramp-backtrace): Make VEC-OR-PROC optional.

* net/tramp-adb.el (tramp-adb-maybe-open-connection):
* net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* net/tramp-sh.el (tramp-maybe-open-connection):
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Apply
`tramp-check-proper-host'.
2013-08-26 15:17:22 +02:00
Michael Albinus
df54bcbde0 * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
BUF can be optional.  (Bug#15186)
2013-08-26 08:59:53 +02:00
Michael Albinus
f95527c8b2 * net/tramp.el:
* net/tramp-adb.el:
* net/tramp-cmds.el:
* net/tramp-ftp.el:
* net/tramp-gvfs.el:
* net/tramp-gw.el:
* net/tramp-sh.el: Don't wrap external variable declarations by
`eval-when-compile'.
2013-08-17 12:20:15 +02:00
Michael Albinus
b74f0d960f Declare external variables. 2013-08-15 19:02:09 +02:00
Michael Albinus
5d89d9d256 Remove byte compiler warnings, visible when compiling with
`byte-compile-force-lexical-warnings' set to t.

* net/tramp.el (tramp-debug-message, tramp-message, tramp-error)
(tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF.
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-file-notify-add-watch, tramp-action-login)
(tramp-action-succeed, tramp-action-permission-denied)
(tramp-action-terminal, tramp-action-process-alive): Prefix unused
arguments with "_".

* net/tramp-adb.el (tramp-adb-parse-device-names)
(tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file)
(tramp-adb-handle-copy-file): Prefix unused arguments with "_".
(tramp-adb-handle-file-truename): Remove unused arguments.

* net/tramp-cache.el (tramp-flush-directory-property)
(tramp-flush-connection-property, tramp-list-connections)
(tramp-parse-connection-properties): Prefix unused arguments with "_".

* net/tramp-compat.el (tramp-compat-make-temp-file): Rename
FILENAME to F.

* net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names)
(tramp-zeroconf-parse-workstation-device-names)
(tramp-zeroconf-parse-webdav-device-names)
(tramp-synce-parse-device-names): Prefix unused arguments with "_".

* net/tramp-gw.el (tramp-gw-gw-proc-sentinel)
(tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_".

* net/tramp-sh.el (tramp-sh-handle-file-truename): Remove unused
arguments.
(tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-file-contents-literally)
(tramp-sh-handle-file-notify-add-watch): Prefix unused arguments
with "_".
(tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt):
Remove unused variables.

* net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file, tramp-smb-handle-delete-file)
(tramp-smb-read-file-entry): Prefix unused arguments with "_".

* net/tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte):
Make them a defconst.
(tramp-uuencode-region): Remove unused variable.
2013-08-15 16:29:08 +02:00
Michael Albinus
a43dc4243c Complete file name handlers.
* net/tramp.el (tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-rm-watch): New functions.
(tramp-call-process): Do not bind `default-directory'.

* net/tramp-adb.el (tramp-adb-file-name-handler-alist): Order
alphabetically.
[access-file, add-name-to-file, dired-call-process]:
[dired-compress-file, file-acl, file-notify-rm-watch]:
[file-ownership-preserved-p, file-selinux-context]:
[make-directory-internal, make-symbolic-link, set-file-acl]:
[set-file-selinux-context, set-visited-file-modtime]:
[verify-visited-file-modtime]: Add handler.
(tramp-adb-handle-write-region): Apply `set-visited-file-modtime'.

* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
[file-notify-add-watch, file-notify-rm-watch]:
[set-file-times, set-visited-file-modtime]:
[verify-visited-file-modtime]: Add handler.
(with-tramp-gvfs-error-message)
(tramp-gvfs-handle-set-visited-file-modtime)
(tramp-gvfs-fuse-file-name): Remove.
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-file-gvfs-monitor-file-process-filter): New defuns.
(tramp-gvfs-handle-write-region): Fix error in moving tmpfile.

* net/tramp-sh.el (tramp-sh-file-name-handler-alist): Order
alphabetically.
[file-notify-rm-watch ]: Use default Tramp handler.
[executable-find]: Remove private handler.
(tramp-do-copy-or-rename-file-out-of-band): Do not bind
`default-directory'.
(tramp-sh-handle-executable-find)
(tramp-sh-handle-file-notify-rm-watch): Remove functions.
(tramp-sh-file-gvfs-monitor-dir-process-filter)
(tramp-sh-file-inotifywait-process-filter, tramp-set-remote-path):
Do not use `format' in `tramp-message'.

* net/tramp-smb.el (tramp-smb-file-name-handler-alist)
[file-notify-rm-watch, set-visited-file-modtime]:
[verify-visited-file-modtime]: Add handler.
(tramp-smb-call-winexe): Do not bind `default-directory'.
2013-08-01 13:10:31 +02:00
Michael Albinus
78822e94cb * net/tramp.el (tramp-use-ssh-controlmaster-options): New customer option.
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use it.
2013-07-29 09:47:53 +02:00
Michael Albinus
d5d3c58aac * filenotify.el (file-notify-supported-p):
* net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
Remove functions.

* autorevert.el (auto-revert-use-notify):
(auto-revert-notify-add-watch):
* net/tramp.el (tramp-file-name-for-operation):
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Remove `file-notify-supported-p' entry.
2013-07-24 15:29:15 +02:00
Michael Albinus
e06ec67f56 * filenotify.el (file-notify--library): Renamed from
`file-notify-support'.  Do not autoload.  Adapt all uses.
(file-notify-supported-p): New defun.

* autorevert.el (auto-revert-use-notify): Use
`file-notify-supported-p' instead of `file-notify-support'.  Adapt
docstring.
(auto-revert-notify-add-watch): Use `file-notify-supported-p'.

* net/tramp.el (tramp-file-name-for-operation):
Add `file-notify-supported-p'.

* net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
New defun.
(tramp-sh-file-name-handler-alist): Add it as handler for
`file-notify-supported-p '.

* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `ignore' as handler for `file-notify-*' functions.
2013-07-18 12:03:49 +02:00
Michael Albinus
f6dd8b3647 * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error'. 2013-07-14 20:45:50 +02:00
Michael Albinus
88f6a93389 * net/tramp.el (tramp-methods): Extend docstring.
(tramp-connection-timeout): New defcustom.
(tramp-error-with-buffer): Reset timestamp only when appropriate.
(with-tramp-progress-reporter): Simplify.
(tramp-process-actions): Improve messages.

* net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* net/tramp-sh.el (tramp-maybe-open-connection):
Use `tramp-connection-timeout'.
(tramp-methods) [su, sudo, ksu]: Add method specific timeouts.  (Bug#14808)
2013-07-11 11:52:54 +02:00
Michael Albinus
525c5c7704 Improve error messages. (Bug#14808)
* net/tramp.el (tramp-current-connection): New defvar, moved from
tramp-sh.el.
(tramp-message-show-progress-reporter-message): Removed, not
needed anymore.
(tramp-error-with-buffer): Show message in minibuffer.  Discard
input before waiting.  Reset connection timestamp.
(with-tramp-progress-reporter): Improve messages.
(tramp-process-actions): Use progress reporter.  Delete process in
case of error.  Improve messages.

* net/tramp-sh.el (tramp-barf-if-no-shell-prompt): Use
condition-case.  Call `tramp-error-with-buffer' with vector and buffer.
(tramp-current-connection): Removed.
(tramp-maybe-open-connection): The car of
`tramp-current-connection' are the first 3 slots of the vector.
2013-07-10 16:58:26 +02:00
Michael Albinus
54a4248627 * net/tramp-sh.el (tramp-sh-file-gvfs-monitor-dir-process-filter):
(tramp-sh-file-inotifywait-process-filter): Handle file names with spaces.
2013-07-06 18:17:16 +02:00
Michael Albinus
c074775889 Fix previous patch. 2013-07-05 17:17:16 +02:00
Michael Albinus
ddbdfd6f90 * net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Support
both "gvfs-monitor-dir" and "inotifywait".
(tramp-sh-file-inotifywait-process-filter): Renamed from
`tramp-sh-file-notify-process-filter'.
(tramp-sh-file-gvfs-monitor-dir-process-filter)
(tramp-get-remote-gvfs-monitor-dir): New defuns.
2013-07-05 15:34:01 +02:00
Michael Albinus
864c58ca5f * filenotify.el: New package.
* autorevert.el (top): Require filenotify.el.
(auto-revert-notify-enabled): Remove.  Use `file-notify-support'
instead.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): Use `file-notify-*' functions.

* subr.el (file-notify-handle-event): Move function to filenotify.el.

* net/tramp.el (tramp-file-name-for-operation): Handle
`file-notify-add-watch' and `file-notify-rm-watch'.

* net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add handler
for `file-notify-add-watch' and `file-notify-rm-watch'.
(tramp-process-sentinel): Improve trace.
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-file-notify-process-filter)
(tramp-sh-handle-file-notify-rm-watch)
(tramp-get-remote-inotifywait): New defuns.
2013-07-04 11:39:36 +02:00
Michael Albinus
15b263dcf8 * net/tramp-adb.el (tramp-adb-get-toolbox): Remove function, it is
not needed.

* net/tramp-sh.el (tramp-find-shell): Don't set "busybox" property.
2013-06-19 15:14:24 +02:00
Michael Albinus
d08536296c * net/tramp-compat.el (tramp-compat-call-process): Move function ...
* net/tramp.el (tramp-call-process): ... here
(tramp-set-completion-function, tramp-parse-putty):
* net/tramp-adb.el (tramp-adb-execute-adb-command):
* net/tramp-gvfs.el (tramp-gvfs-send-command):
* net/tramp-sh.el (tramp-sh-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-sh-handle-write-region)
(tramp-call-local-coding-command): Use `tramp-call-process'
instead of `tramp-compat-call-process'.

* net/tramp-sh.el (tramp-perl-pack, tramp-perl-unpack): New defconst.
(tramp-local-coding-commands, tramp-remote-coding-commands): Use them.
(tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region):
(tramp-find-inline-compress):Improve traces.
(tramp-maybe-send-script): Check for Perl binary.
(tramp-get-inline-coding): Do not redirect STDOUT for local decoding.
2013-04-22 12:26:09 +02:00
Michael Albinus
beb42340a1 * net/tramp-sh.el (tramp-remote-process-environment): Add "TMOUT=0". 2013-04-18 14:47:01 +02:00
Michael Albinus
dba720f1d1 Fix last change. 2013-03-13 12:42:21 +01:00
Michael Albinus
85b66a2100 * net/tramp-sh.el (tramp-sh-handle-insert-directory): Check,
whether `default-file-name-coding-system' is bound.  It isn't in
XEmacs.
2013-03-13 12:38:13 +01:00
Michael Albinus
3675b1698d Major rewrite due to changed D-Bus interface of GVFS 1.14.
* net/tramp-gvfs.el (top): Extend check for gvfs availability.
(tramp-gvfs-methods-mounttracker, tramp-gvfs-listmounts)
(tramp-gvfs-mountlocation, tramp-gvfs-mountlocation-signature):
New defconst.
(tramp-gvfs-file-name-handler-alist) [directory-files]:
[directory-files-and-attributes, file-exists-p, file-modes]: Use
Tramp default handler.
[file-acl, file-selinux-context, process-file, set-file-acl]:
[set-file-modes, set-file-selinux-context, shell-command]:
[start-file-process ]: Remove handler.
[verify-visited-file-modtime]: New handler.
(tramp-gvfs-dbus-string-to-byte-array)
(tramp-gvfs-dbus-byte-array-to-string): New defuns.  Replace all
calls of `dbus-string-to-byte-array' and
`tramp-gvfs-dbus-byte-array-to-string'.
(tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file, tramp-gvfs-handle-file-attributes)
(tramp-gvfs-handle-file-directory-p)
(tramp-gvfs-handle-file-executable-p)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-file-writable-p)
(tramp-gvfs-handle-insert-directory)
(tramp-gvfs-handle-insert-file-contents)
(tramp-gvfs-handle-make-directory, tramp-gvfs-handle-rename-file)
(tramp-gvfs-handle-set-visited-file-modtime)
(tramp-gvfs-handle-write-region): Rewrite.
(tramp-gvfs-handle-file-acl)
(tramp-gvfs-handle-file-selinux-context)
(tramp-gvfs-handle-process-file, tramp-gvfs-handle-set-file-acl)
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-selinux-context)
(tramp-gvfs-handle-shell-command)
(tramp-gvfs-handle-start-file-process)
(tramp-gvfs-handle-verify-visited-file-modtime): Remove defuns.
(tramp-gvfs-url-file-name): Do not use `file-truename', we work
over the symlinks.  Fix user handling.
(top, tramp-gvfs-handler-mounted-unmounted): Handle different names
of the D-Bus signals.
(tramp-gvfs-connection-mounted-p): Handle different names of the
D-Bus methods.
(tramp-gvfs-mount-spec-entry): New defun.
(tramp-gvfs-mount-spec): Use it.
(tramp-gvfs-maybe-open-connection): Check, that in case of "smb"
there is a share name.  Handle different names of the D-Bus
signals and methods.
(tramp-gvfs-maybe-open-connection): Set connection properties
needed for `tramp-check-cached-permissions'.
(tramp-gvfs-send-command): Apply `tramp-gvfs-maybe-open-connection'.
Return t or nil.

* net/tramp.el (tramp-backtrace): Move up.
(tramp-error): Apply a backtrace into the debug buffer when
`tramp-verbose > 9.
(tramp-file-mode-type-map, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid, tramp-check-cached-permissions): Move from
tramp-sh.el.

* net/tramp-sh.el (tramp-file-mode-type-map)
(tramp-check-cached-permissions, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid): Move to tramp.el.
2013-03-09 12:06:23 +01:00
Michael Albinus
36a8b68b33 * net/tramp.el (tramp-obsolete-methods): New defconst.
(tramp-warned-obsolete-methods): New defvar.
(tramp-find-method): Check for obsolete methods.  Map them to a
replacement method if appropriate.

* net/tramp-sh.el (tramp-methods) [scp1, scp2, ssh1, ssh2, plink1]:
Remove methods.
(top): Remove completion functions for "scp1", "scp2", "ssh1",
"ssh2" and "plink1".
2013-03-01 09:13:53 +01:00
Michael Albinus
58bd4aa21a * net/tramp-sh.el (tramp-sh-handle-insert-directory): Add
"2>/dev/null" to the ls command, in case "en_US.utf8" is not
defined.  POSIX environments fall back to the "C" locale then and
emit a warning, which shall be suppressed.
2013-02-26 09:46:38 +01:00
Michael Albinus
c57a0aff3e * net/tramp.el (tramp-methods): Fix docstring.
(tramp-ssh-controlmaster-options): Rename it from
`tramp-ssh-controlmaster-template'.  Return a string.
(tramp-default-method): Adapt check for
`tramp-ssh-controlmaster-options'.

* net/tramp-sh.el (tramp-methods): Replace
`tramp-ssh-controlmaster-template' by "%c".
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use it in format spec.  Ensure,
that it is applied for the first hop only.
2013-02-23 13:40:14 +01:00
Michael Albinus
29bb19dc10 * net/tramp.el (tramp-tramp-file-p): Fix docstring.
* net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle
multibyte file names.
2013-02-22 15:05:38 +01:00
Michael Albinus
886bae77f0 * net/tramp-sh.el (tramp-sh-handle-set-file-times): Set $UTC only
temporarily, via "env".
2013-02-21 14:36:16 +01:00
Glenn Morris
872faefb07 Merge from emacs-24; up to 2012-12-20T16:09:05Z!dmantipov@yandex.ru 2013-02-18 19:29:28 -08:00
Michael Albinus
c9bcc580e8 * eshell/em-unix.el (eshell/su): Require tramp.
(eshell/sudo): Require tramp.  Remove now unnecessary check.

* net/tramp-sh.el (tramp-sh-handle-start-file-process): Let-bind
`tramp-current-connection' in order to avoid an error when several
commands are invoked in a short time in eshell and friends.
2013-02-18 20:13:21 +01:00
Michael Albinus
61addbc212 * net/tramp-cache.el (tramp-connection-properties): New customer option.
(tramp-get-connection-property): Use it.

* net/tramp-compat.el (top): Require 'trampver.

* net/tramp-sh.el (tramp-remote-process-environment): Set
tramp-autoload cookie.
2013-02-16 18:44:00 +01:00
Michael Albinus
d729103280 Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.

* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band):  Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 17:23:15 +01:00
Michael Albinus
f1f0587100 * net/tramp-adb.el (tramp-adb-handle-start-file-process): Rewrite.
* net/tramp-compat.el (top): Declare `remote-file-name-inhibit-cache'
only if it doesn't exist.

* net/tramp-sh.el (tramp-sh-handle-start-file-process): Set
process marker.
2013-02-12 15:35:10 +01:00
Michael Albinus
5870b2b1d3 * net/tramp.el (tramp-debug-message): Extend function exclude list.
(tramp-backtrace): New defun.
(tramp-handle-insert-file-contents): Use `visit' when inserting
the local copy.

* net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime): Use
`remote-file-name-inhibit-cache'.
2013-02-03 17:49:37 +01:00
Michael Albinus
61642d9a27 * net/tramp.el (tramp-tramp-file-p): Comment check for
`string-as-unibyte'.  The function does not exist on XEmacs, and
likely we need another approach.

* net/tramp-sh.el (tramp-compute-multi-hops): Check, whether
`tramp-gw-*' variables are bound.
2013-01-31 09:33:03 +01:00
Michael Albinus
8bc8712edd * net/tramp.el (tramp-process-connection-type): Fix docstring.
(tramp-completion-reread-directory-timeout): Fix type.
(tramp-connection-min-time-diff): New defcustom.

* net/tramp-sh.el (tramp-maybe-open-connection): Use it.
2013-01-30 10:16:16 +01:00
Michael Albinus
9e4ce6976d Revert changes, which were committed with 2013-01-29T16:03:40Z!michael.albinus@gmx.de by accident. 2013-01-30 08:37:12 +01:00
Michael Albinus
2f52b5608c * autorevert.el (auto-revert-use-notify): Use
`custom-initialize-default' for initialization.  (Bug#13583)
2013-01-29 17:03:40 +01:00
Michael Albinus
ea55064c0b * net/tramp-sh.el (tramp-sh-handle-start-file-process): Fix previous patch.
(tramp-gw-tunnel-method, tramp-gw-socks-method): Declare for
compatibility.
(tramp-compute-multi-hops): Check, whether
`tramp-gw-tunnel-method' and `tramp-gw-socks-method' are non-nil.
2013-01-29 15:52:20 +01:00
Michael Albinus
1b69262a7d * net/ange-ftp.el (ange-ftp-skip-msgs): Add another message.
* net/tramp-sh.el (tramp-sh-handle-start-file-process): Catch
`suppress'.  Otherwise, `tramp-run-real-handler' might be called
in `tramp-file-name-handler'.
2013-01-29 09:12:11 +01:00