Commit graph

398 commits

Author SHA1 Message Date
Michael Albinus
60f2c210c0 * net/tramp.el (tramp-methods): Fix again tramp-copy-args of
"pscp" and "psftp".  Reported by Gilles Pion <gpion@lfdj.com>.
2008-04-07 19:29:09 +00:00
Stefan Monnier
343bb7bdd1 (after-init-hook): Don't wrap a lambda around
tramp-register-completion-file-name-handler.
2008-04-04 17:38:44 +00:00
Glenn Morris
628c97b2cf (tramp-drop-volume-letter): Move definition before use. 2008-04-03 03:33:18 +00:00
Michael Albinus
113e2a8447 * net/tramp.el (tramp-make-tramp-temp-file): Use
`tramp-drop-volume-letter' for the local file name part.
2008-04-02 18:58:45 +00:00
Michael Albinus
da1975d727 * net/tramp.el (tramp-do-copy-or-rename-file): Fix check for
overwriting when NEWNAME is a local file.
2008-03-30 18:08:20 +00:00
Michael Albinus
12aeeb576a * tramp.el (tramp-methods): Fix tramp-copy-args of "pscp" and "psftp". 2008-03-21 18:04:42 +00:00
Stefan Monnier
cdd44874a7 Fix up encoding. 2008-03-20 13:42:38 +00:00
Michael Albinus
aff67808c1 * net/tramp.el (tramp-let-maybe): Removed.
(tramp-drop-volume-letter): Don't use `replace-regexp-in-string'.
It does not exist under XEmacs.
(tramp-handle-file-truename, tramp-handle-expand-file-name)
(tramp-completion-file-name-handler): Let-bind
`directory-sep-char'.
2008-03-19 21:06:37 +00:00
Glenn Morris
699a11fbb6 (tramp-drop-volume-letter): Evaluate when compiling. 2008-03-19 07:11:57 +00:00
Juanma Barranquero
78f8b19b35 Fix typos in comments. 2008-03-18 09:17:44 +00:00
Michael Albinus
57671b7218 * net/tramp.el (tramp-root-regexp): Simplify.
(tramp-completion-file-name-regexp-separate): Don't insist on
leading "[".  This prevents method or user or host completion.
(tramp-let-maybe): Autoload it.
(tramp-drop-volume-letter): Don't autoload.  When not on W32, it is
an alias for `identity'.
(tramp-handle-write-region): Protect `last-coding-system-used'
over the trailing statements.
(tramp-completion-file-name-handler-post-function): Removed.
(tramp-completion-file-name-handler): Let-bind
`directory-sep-char' instead of calling
`tramp-drop-volume-letter'.
(top): Move coding cookie at the end.
2008-03-17 22:57:15 +00:00
Stefan Monnier
800a97b891 (tramp-completion-mode-p): Don't use char-equal for
elements which may be something else than characters.
2008-03-17 20:19:00 +00:00
Michael Albinus
8a798e4193 * tramp.el (tramp-root-regexp): New defconst.
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate)
(tramp-completion-file-name-regexp-url): Use it.
(tramp-do-copy-or-rename-file-via-buffer): Set
`enable-multibyte-characters' to nil.  Set `jka-compr-inhibit' to
t for `insert-file-contents-literally'.
(tramp-drop-volume-letter): Rewrite, using `tramp-root-regexp'.
Autoload it.
(tramp-completion-file-name-handler-post-function): New defconst.
(tramp-completion-file-name-handler): Use it.
(tramp-maybe-open-connection): Update calls to
`tramp-flush-connection-property' for removed 2nd argument.
2008-03-15 21:54:02 +00:00
Michael Olson
fd35d9d668 net/tramp.el (tramp-process-sentinel): Avoid error when process buffer killed. 2008-02-09 05:52:07 +00:00
Michael Albinus
cfb5c0dbc6 * net/tramp.el (tramp-process-sentinel): New defun.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use it as process sentinel.
(tramp-handle-delete-directory): Don't use the "-f" option; it
isn't portable.
(tramp-handle-start-file-process): Echo `tramp-end-of-output'
after the command.
(tramp-handle-shell-command): Set `mode-line-process' in the
asynchronous case.
2008-02-03 12:05:05 +00:00
Michael Albinus
42bc9b6d9d * net/tramp.el (tramp-methods): Use "-H" option for "sudo". Suggested
by Trent W. Buck <trentbuck@gmail.com>.  Make ("%h") a single
element in "plinkx".
(tramp-handle-shell-command): Reuse "*Async Shell Command*" or
"*Shell Command Output*" buffers.  Check, whether there is already
an asynchronous process running.  Display always the buffer of the
asynchronous process.
(tramp-compute-multi-hops): Adapt error message.
2008-01-29 21:14:04 +00:00
Michael Albinus
b8bfcf96e8 * net/tramp.el (tramp-handle-shell-command): Use "/bin/sh -c" for
the command.
2008-01-28 21:25:26 +00:00
Michael Albinus
2991e49f20 * net/tramp.el (tramp-compute-multi-hops): In case of su(do)?
methods, the host name must be a local host.
2008-01-27 16:20:57 +00:00
Michael Albinus
5d449a36cc * net/tramp.el (tramp-dissect-file-name): Raise an error when
Tramp 2.0 syntax is used.  Suggested by Trent W. Buck
<trentbuck@gmail.com>.
2008-01-26 14:54:55 +00:00
Michael Albinus
484ea0b6c9 * net/tramp.el (tramp-do-copy-or-rename-file): Flush the cache of
the source file in case of `rename'.  Reported by Pete Forman
<pete.forman@westerngeco.com>.
2008-01-24 21:28:56 +00:00
Michael Albinus
a0a5183aa3 * net/tramp.el (tramp-remote-process-environment): Set "LC_ALL=C".
(tramp-end-of-output): Add `tramp-rsh-end-of-line' into the
regexp.
(tramp-find-shell, tramp-open-connection-setup-interactive-shell):
Don't send `tramp-rsh-end-of-line' additionally, when setting the
prompt.
(tramp-wait-for-output): Distinguish different prompt formats.
(tramp-get-test-nt-command): Don't check for "\n" in the prompt.
(tramp-local-host-p): Check whether temp directory is writable.
2008-01-23 20:45:03 +00:00
Michael Albinus
c992abdbc6 * net/tramp.el (tramp-local-host-p): Use `tramp-file-name-host'
instead of `tramp-file-name-real-host'.
2008-01-14 19:36:07 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Michael Albinus
0664ff7221 * vc-git.el (vc-git--call): Apply `process-file' instead of
`call-process'.

* net/tramp.el (tramp-remote-process-environment): Add "LC_CTYPE=C".
Reported by Pete Forman <pete.forman@westerngeco.com>.
(tramp-perl-encode, tramp-perl-decode): Update copyrights.
(tramp-handle-process-file): Handle the case where DESTINATION is
a consp with t as car.
(tramp-wait-for-output): We shall remove exactly what has been
find by the search.
2008-01-08 20:07:21 +00:00
Glenn Morris
2f043267ee Add 2008 to copyright years. 2008-01-07 02:00:47 +00:00
Michael Albinus
adb671295c Sync with Tramp 2.1.12.
* net/tramp.el: New todo item.

* net/tramp-smb.el (tramp-smb-handle-insert-directory): Handle "-F"
switch.  Reported by Mark T. Kennedy <mkennedy@diamondbackcap.com>.

* net/trampver.el: Update release number.
2007-12-23 13:25:27 +00:00
Michael Albinus
9fa0d3aabb * files.el (cd-absolute): Set `list-buffers-directory' in order to
show correct path in buffer list.

* net/tramp.el (tramp-open-connection-setup-interactive-shell)
(tramp-find-shell): Send only single prompt setting commands, in
order to avoid double-prompt.

* net/tramp-compat.el (top): Require cl only when compiling.
Reported by Glenn Morris <rgm@gnu.org>.
2007-12-18 21:02:53 +00:00
Glenn Morris
fd48cd1850 Require password-cache or password. 2007-12-04 04:32:47 +00:00
Michael Albinus
8950769ab6 * net/tramp.el (tramp-open-connection-setup-interactive-shell):
Still some tuning in case of an echoing shell.
(tramp-send-command): Connection property "remote-echo" is not
persistent; cache key is the process therefore.
2007-11-19 20:04:51 +00:00
Dan Nicolaescu
282e1e37cb * net/tramp.el (tramp-terminal-type): Remove duplicated
definition.
2007-11-19 00:25:31 +00:00
Michael Albinus
b50dd0d2b6 * net/tramp.el (tramp-completion-reread-directory-timeout): New
defcustom.
(tramp-handle-file-name-all-completions): Flush directory contents
from cache regularly.
(tramp-set-auto-save-file-modes): Check also for
`buffer-modified-p'.
(tramp-open-connection-setup-interactive-shell): Call
`tramp-cleanup-connection' via funcall.

* net/tramp-ftp.el (tramp-ftp-file-name-handler): Temp file is already
created when copying.
2007-11-18 10:24:51 +00:00
Michael Albinus
e42c6bbc41 * net/tramp.el (tramp-open-connection-setup-interactive-shell): Check
whether the output of "uname -sr" has been changed.
2007-11-12 20:04:13 +00:00
Michael Albinus
67932d9460 * net/tramp.el (tramp-maybe-open-connection): Use a local copy of
`process-environment'.
2007-11-08 20:15:25 +00:00
Michael Albinus
b08104a01d * net/tramp.el (tramp-handle-substitute-in-file-name): Don't
expand the remote connection identification.
(tramp-find-shell, tramp-open-connection-setup-interactive-shell):
Set also $PS2 and $PS3 when setting $PS1.  Check for shell echoing
before calling stty.

* net/tramp-cache.el (tramp-cache-print)
(tramp-dump-connection-properties): Fix docstring.
(tramp-list-connections): Renamed from
`tramp-cache-list-connections'.

* net/tramp-cmds.el (tramp-cleanup-connection): Apply it.

* net/tramp-ftp.el (tramp-ftp-file-name-handler): Don't expand the
remote connection identification when setting connection property.

* net/tramp-smb.el (tramp-smb-handle-substitute-in-file-name):
"//" substitutes only in the local filename part.
2007-11-07 20:41:15 +00:00
Michael Albinus
726f027253 * net/tramp.el (top): Don't autoload `tramp-cache-print'.
* net/tramp-cache (tramp-cache-print): Move down.
(tramp-cache-list-connections): New defun.

* net/tramp-cmds.el (tramp-cleanup-connection): Use it.
2007-11-06 21:17:36 +00:00
Michael Albinus
bdbeca7b20 * tramp.el (tramp-wait-for-output): Ignore escape sequences in the
prompt.
2007-11-05 20:52:29 +00:00
Michael Albinus
f2196d5741 *** empty log message *** 2007-10-31 20:48:52 +00:00
Michael Albinus
3412f35d0f * net/tramp.el (tramp-handle-shell-command): Call `start-file-process'
directly.  Fix bug in deleting temp file.
2007-10-31 20:04:42 +00:00
Michael Albinus
a7580c1c8f * net/tramp.el (tramp-maybe-open-connection): Set $LC_ALL to "C".
* net/tramp-cache.el (tramp-flush-file-function): Check also
`default-directory' if `buffer-file-name' does not return a
string.  Added to `eshell-pre-command-hook'.
2007-10-30 20:27:22 +00:00
Michael Albinus
a4aeb9a424 * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
(tramp-get-remote-tmpdir): New defun.
(tramp-make-tramp-temp-file): Use it.
(tramp-local-call-process): New defun.  Replace all calls of
`call-process' by this when appropriate.
(tramp-handle-write-region): Replace calls of `file-attributes' by
`tramp-compat-file-attributes'.
(tramp-find-shell, tramp-open-connection-setup-interactive-shell):
Make the first command a `tramp-send-command' call, with let-bind
of `tramp-end-of-output'.
(tramp-version, tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers): Move to
tramp-cmds.el.

* net/tramp-fish.el (tramp-fish-handle-copy-file)
(tramp-fish-do-copy-or-rename-file)
(tramp-fish-do-copy-or-rename-file-directly):
* net/tramp-smb.el (tramp-smb-handle-copy-file):
Add parameter PRESERVE-UID-GID.
2007-10-27 13:57:43 +00:00
Michael Albinus
3bde9f241c * net/tramp.el (tramp-set-file-uid-gid): Protect `call-process'
when we are local.
2007-10-23 21:56:54 +00:00
Michael Albinus
7e780ff12c * net/tramp.el (tramp-find-shell)
(tramp-open-connection-setup-interactive-shell): Improve sending
initial commands.
(tramp-action-terminal): Send debug message.
(tramp-wait-for-shell-prompt, tramp-send-command-internal): Removed.
(tramp-barf-if-no-shell-prompt): Insert code of
`tramp-wait-for-shell-prompt'.
2007-10-22 19:09:51 +00:00
Juanma Barranquero
e8308ca760 (tramp-handle-expand-many-files): Remove.
(PC-expand-many-files): Remove advice.
2007-10-22 09:43:42 +00:00
Michael Albinus
9c13938d8e * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Require tramp-cmds.el.
(tramp-make-tramp-temp-file): We can get rid of DONT-CREATE.
(tramp-handle-file-name-all-completions): Expand DIRECTORY.
 (tramp-do-copy-or-rename-file-directly): Make more rigid checks.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use `make-temp-name'.  This is
possible, because we don't need to create the temporary file, but
we need a prefix for ssh, which has its own temporary file
handling.
(tramp-handle-delete-directory): Add "-f" to rmdir.
(tramp-handle-dired-recursive-delete-directory): Call "rm -rf".
(tramp-handle-insert-file-contents): Don't raise a tramp-error but
a signal, in order to give the callee a chance to suppress.
(tramp-handle-write-region): Set owner also in case of short
track.  Don't use compatibility calls for `write-region' anymore.
(tramp-clear-passwd): Add parameter VEC.  Adapt all callees.
(tramp-append-tramp-buffers): Apply `tramp-list-tramp-buffers'.

* net/tramp-cmds.el: New file.

* net/tramp-gw.el (tramp-gw-basic-authentication): Apply VEC to
`tramp-clear-passwd'.

* net/trampver.el: Update release number.
2007-10-21 14:02:38 +00:00
Katsumi Yamaoka
bd31647430 From_ Johan Bockgrd, <http://article.gmane.org/gmane.emacs.devel/81056>
* net/tramp.el (tramp-rfn-eshadow-update-overlay): Save excursion.
Use `save-restriction' rather than `widen'.
2007-10-18 22:49:05 +00:00
Michael Albinus
311dd93fa2 Sync with Tramp 2.1.11. 2007-10-10 04:55:30 +00:00
Michael Albinus
1834b39f16 * net/tramp.el (tramp-find-foreign-file-name-handler): Check also
host.
(tramp-maybe-send-script): Apply `member' but `memq'.
(tramp-advice-file-expand-wildcards): Simplify implementation.
2007-10-08 20:07:16 +00:00
Michael Albinus
893895d310 * net/tramp.el (tramp-completion-mode): Extend doc-string.
(tramp-completion-mode-p): Revert change from 2007-09-24.
Checking for `return' etc as last character is not sufficient, for
example in dired-mode when entering <g> (revert-buffer) or
<s> (dired-sort).
2007-10-06 15:25:50 +00:00
Michael Albinus
a6e9632782 * net/tramp.el (top): Move loading of tramp-util.el and
tramp-vc.el to tramp-compat.el.
(tramp-make-tramp-temp-file): Complete rewrite.  Create remote
temporary file if possible, in order to avoid a security hole.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Call `tramp-make-tramp-temp-file'
with DONT-CREATE, because the connection is not setup yet.
(tramp-handle-process-file): Rewrite temporary file handling.
(tramp-completion-mode): New defvar.
(tramp-completion-mode-p): Use it.

* net/tramp-compat.el (top):  Load tramp-util.el and tramp-vc.el.

* net/tramp-fish.el (tramp-fish-handle-process-file): Rewrite
temporary file handling.
2007-10-06 12:00:42 +00:00
Michael Albinus
258800f85f * net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
(tramp-do-copy-or-rename-file-directly): Handle tmpfile only in
the cond clauses where needed.
(tramp-handle-write-region): Rearrange code for proper handling of
tmpfile.

* net/tramp-compat.el (tramp-compat-make-temp-file): New defsubst.

* net/tramp.el:
* net/tramp-fish.el:
* net/tramp-ftp.el:
* net/tramp-smb.el: Rename `tramp-make-temp-file' to
`tramp-compat-make-temp-file'.
2007-10-04 20:09:32 +00:00