Commit graph

398 commits

Author SHA1 Message Date
Michael Albinus
94be87e8b7 * net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
(tramp-file-name-handler-alist): Add
`tramp-handle-insert-file-contents-literally'.  Neded for XEmacs.
(tramp-make-temp-file): Use `make-temp-name'. `make-temp-file',
used before, creates the file already, which is not desired.
(tramp-do-copy-or-rename-file-directly): Simplify handling of
temporary file.
(tramp-handle-insert-file-contents): Assign the result in the
short track case.
(tramp-handle-insert-file-contents-literally): New defun.
(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).

* net/tramp-compat.el (top): Add also compatibility code for loading
appropriate timer package.
(tramp-compat-copy-tree): Check for `subrp' and `symbol-file' in
order to avoid autoloading problems.

* net/tramp-fish.el:
* net/tramp-smb.el: Move further compatibility code to
tramp-compat.el.

* net/tramp-ftp.el (tramp-ftp-file-name-handler): Handle the case
where the second parameter of `copy-file' or `rename-file' is a
remote file but not via ftp.
2007-10-03 10:54:03 +00:00
Michael Albinus
9e6ab520d0 * net/tramp-compat.el: New file.
* net/tramp.el:
* net/tramp-fish.el:
* net/tramp-smb.el:
* net/tramp-uu.el:
* net/trampver.el: Move compatibility code to tramp-compat.el.
Apply `mapc' instead of `mapcar' when the code needs side effects
only.  Move utf-8 coding cookie to the second line.
2007-09-30 16:43:07 +00:00
Michael Albinus
9ce8462a49 * net/tramp.el (with-file-property, with-connection-property):
Highlight as keyword.
(tramp-rfn-eshadow-setup-minibuffer)
(tramp-rfn-eshadow-update-overlay, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-shell-command, tramp-get-debug-buffer)
(tramp-send-command-and-read, tramp-equal-remote)
(tramp-get-local-gid): Pacify byte-compiler.
(tramp-handle-file-name-directory): Result shall not be expanded.
(tramp-find-foreign-file-name-handler): Rewrite.
(tramp-dissect-file-name): Add optional parameter NODEFAULT.

* net/tramp-cache.el (tramp-cache-print): Pacify byte-compiler.

* net/tramp-fish.el (tramp-fish-handle-expand-file-name): Apply
`tramp-completion-mode-p'.
(tramp-fish-handle-set-file-times)
(tramp-fish-handle-executable-find)
(tramp-fish-handle-process-file, tramp-fish-get-file-entries)
(tramp-fish-retrieve-data): Pacify byte-compiler.

* net/tramp-gw.el (tramp-gw-basic-authentication): Call
`tramp-read-passwd' with first parameter `nil'.
2007-09-28 16:05:49 +00:00
Michael Albinus
1437876ce3 * net/tramp.el (tramp-maybe-open-connection): Make test for alive
connection more robust.
2007-09-27 04:37:33 +00:00
Michael Albinus
7a3cdcc52a * net/tramp.el (tramp-completion-mode-p): Rename from
`tramp-completion-mode'. Revert logic, check `return', `newline'
and such alike. Packages like Icicles tend to use other completion
characters but `tab' and `space' only.
(top): Require cl.el, when `copy-tree' is not available otherwise.

* net/tramp-vc.el (tramp-vc-user-login-name): Get argument by
`ad-get-arg'.  Use `vc-find-version' instead of `process-file' to check
whether we have a new enough vc that doesn't need the defadvice.
2007-09-24 05:42:34 +00:00
Michael Albinus
6c4e47fa46 * net/tramp.el (tramp-completion-mode-p): Rename from
`tramp-completion-mode'. Revert logic, check `return', `newline'
and such alike. Packages like Icicles tend to use other completion
characters but `tab' and `space' only.
2007-09-24 05:29:29 +00:00
Michael Albinus
d037d50168 * rfn-eshadow.el (rfn-eshadow-setup-minibuffer-hook)
(rfn-eshadow-update-overlay-hook): New defvars.
(rfn-eshadow-setup-minibuffer, rfn-eshadow-update-overlay): Run
the hooks.

* net/tramp.el (tramp-rfn-eshadow-overlay): New defvar.
(tramp-rfn-eshadow-setup-minibuffer)
(tramp-rfn-eshadow-update-overlay): New defuns.  Hook into
rfn-eshadow.el.

* net/tramp-smb.el (tramp-smb-errors): Add error message for call
timeout.
2007-09-21 05:24:06 +00:00
Michael Albinus
8a4438b672 * net/tramp.el (top): Remove declarations of `tramp-gw-*' symbols,
they are useless with the byte compiler.
(tramp-make-temp-file, tramp-make-tramp-temp-file): Move up.
(tramp-do-copy-or-rename-file-directly): Rearrange let-bindings.
(tramp-compute-multi-hops): Mask `tramp-gw-*' symbols.
(tramp-file-name-real-host, tramp-file-name-port)
(tramp-find-method, tramp-find-user, tramp-find-host): Make them
defuns.

* net/tramp-cache.el (top): Improve error message when
`tramp-persistency-file-name' is corrupted.
2007-09-09 08:31:27 +00:00
Michael Albinus
8d60099b80 * net/tramp.el (tramp-handle-set-file-times): Flush the file
properties.
(tramp-set-file-uid-gid, tramp-get-local-uid)
(tramp-get-local-gid): New defuns.
(tramp-handle-copy-file): Handle new parameter PRESERVE-UID-GID.
(tramp-do-copy-or-rename-file): New parameter PRESERVE-UID-GID.
Improve fast track.
(tramp-do-copy-or-rename-file-directly): Sync parameter list with
the other tramp-do-copy-or-rename-file-* functions.  Major
rewrite.
(tramp-handle-file-local-copy, tramp-handle-insert-file-contents)
(tramp-handle-write-region): Improve fast track.
(tramp-handle-file-remote-p): IDENTIFICATION can also be
'localname.
(tramp-maybe-open-connection): Let `process-adaptive-read-buffering'
be nil.
2007-08-28 20:09:58 +00:00
Michael Albinus
0f205eeefa * net/tramp.el (tramp-local-host-p): New defun.
(tramp-handle-file-local-copy, tramp-handle-write-region):
Implement fast track when being on the local host.
(tramp-file-name-handler): Don't set "started" property.  It shall
be reserved for the "ftp" method.
(tramp-make-copy-program-file-name): Use `tramp-file-name-real-host'.

* net/tramp-ftp.el (top): Autoload `tramp-set-connection-property'.
(tramp-ftp-file-name-handler):  Set "started" property.
2007-08-24 05:27:22 +00:00
Michael Albinus
f84638eb6b * net/tramp.el (top): Require cl.el, when `copy-tree' is not available
otherwise.
(tramp-get-remote-path): New defun.  Replace occurences of
`tramp-default-remote-path' by this function.
(tramp-set-remote-path): Move most of the code to
`tramp-get-remote-path'.
(tramp-get-ls-command, tramp-get-remote-id): Don't check for not
existing directories, this is done already in
`tramp-get-remote-path'.
2007-08-22 05:47:42 +00:00
Glenn Morris
e7f767c25e Replace `iff' in doc-strings and comments. 2007-08-08 07:34:30 +00:00
Michael Albinus
27e813fe4b * net/tramp.el (tramp-wrong-passwd-regexp): Make the regexp more
global matching.
(tramp-handle-process-file): Fix bug inserting
resulting output.
(tramp-handle-shell-command): Handle OUTPUT-BUFFER and
ERROR-BUFFER more robust.  Display output.
(tramp-file-name-handler): Add a connection property when we found
a foreign file name handler.  This allows backends like ftp to
profit also from usr/host name completion based on connection
cache.
(tramp-send-command-and-read): Search for trash after the regexp
until eol only.  In XEmacs, there is a problem with \n.

* net/tramp-cache.el (top): Read persistent connection history
when cache is empty.
2007-08-07 20:30:20 +00:00
Michael Albinus
d62c9a33c4 * net/tramp.el (tramp-handle-file-remote-p): Handle optional
parameters IDENTIFICATION and CONNECTED.
(tramp-handle-insert-file-contents): VISIT must be handled after
insertion of the local copy.  Reported by Peter Gordon
<peter@pg-consultants.com>.
(tramp-file-name-handler): No special handling for
`expand-file-name'.  But for `file-name-as-directory'.
(tramp-find-shell, tramp-open-connection-telnet)
(tramp-open-connection-rsh, tramp-open-connection-su)
(tramp-open-connection-multi)
(tramp-open-connection-setup-interactive-shell): Guard against
$PROMPT_COMMAND shell var.  Reported by Steve Youngs
<steve@sxemacs.org>.
(tramp-append-tramp-buffers): Replace "sensible" by "sensitive" in
the hint.

* net/trampver.el: Update release number.
2007-08-07 20:04:27 +00:00
Michael Albinus
6435918d3d * net/tramp.el (tramp-handle-file-remote-p): Return a string as
remote identification.
2007-08-05 12:43:06 +00:00
Michael Albinus
bce04feefd * net/tramp.el:
* net/tramp-uu.el:
* net/trampver.el: Use utf-8 encoding with coding cookie.

* net/tramp-cache.el:
* net/tramp-fish.el:
* net/tramp-ftp.el:
* net/tramp-gw.el:
* net/tramp-smb.el: Remove coding cookie.

* net/tramp.el (tramp-handle-verify-visited-file-modtime): Flush
buffer file-name's file property.
(tramp-handle-file-remote-p): The first parameter is FILENAME.

* net/trampver.el: Update release number.
2007-07-29 15:32:56 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
ceaeecb0c9 Switch license to GPLv3 or later. 2007-07-25 04:27:24 +00:00
Michael Albinus
d4443a0d7d * net/tramp.el (tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-handle-file-attributes-with-stat)
(tramp-handle-directory-files-and-attributes-with-stat(
(tramp-convert-file-attributes): Handle huge file sizes.
2007-07-23 20:37:33 +00:00
Michael Albinus
31c7000226 Sync with Tramp 2.1.10. 2007-07-22 16:50:21 +00:00
Michael Albinus
ce3f516fed * net/tramp.el (tramp-handle-file-remote-p): Handle optional
parameter IDENTIFICATION.
(tramp-handle-set-file-times): New defun.  Replaces `tramp-touch'.
(tramp-file-name-handler-alist, tramp-file-name-for-operation):
Add entry for `set-file-times'.
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-out-of-band): Use `set-file-times'.
(tramp-handle-unhandled-file-name-directory): Rewrite.
(tramp-convert-file-attributes): Add error handling when inode is
extraordinary big.
(tramp-get-inode): Change parameter from FILE to VEC.
(tramp-handle-start-file-process ): Use (current-buffer) if BUFFER
is NIL.  This is according to the specification.  Goto (point-max)
when ready.
(tramp-handle-shell-command): Rewrite completely, using
`process-file' and `start-file-process'.
(tramp-methods, tramp-find-shell)
(tramp-open-connection-setup-interactive-shell)
(tramp-maybe-open-connection): Guard against $PROMPT_COMMAND shell
var.  Reported by Steve Youngs <steve@sxemacs.org>.

* net/tramp-fish.el (tramp-fish-file-name-handler-alist): Add
entry for `set-file-times'.  Rename `start-process' into
`start-file-process'.  Remove `call-process' entry.
(tramp-fish-handle-set-file-times): New defun.
(tramp-fish-handle-executable-find): Use `process-file'.
(tramp-fish-handle-process-file): New defun.  Replaces
`tramp-fish-handle-call-process'.
(tramp-fish-do-copy-or-rename-file-directly): Use
`set-file-times'.
(tramp-fish-get-file-entries): Change `tramp-get-inode' parameter.

* net/tramp-smb.el (tramp-smb-handle-file-attributes): Change
`tramp-get-inode' parameter.
2007-07-17 21:10:07 +00:00
Michael Albinus
00d6fd04d8 * files.el (file-remote-p): Introduce optional parameter CONNECTED.
* net/tramp.el:
* net/tramp-ftp.el:
* net/tramp-smb.el:
* net/tramp-uu.el:
* net/trampver.el: Migrate to Tramp 2.1.

* net/tramp-cache.el:
* net/tramp-fish.el:
* net/tramp-gw.el: New Tramp packages.

* net/tramp-util.el:
* net/tramp-vc.el: Removed.

* net/ange-ftp.el: Add ange-ftp property to 'start-file-process
(ange-ftp-file-remote-p): Handle optional parameter CONNECTED.

* net/rcompile.el (remote-compile): Handle Tramp 2.1 arguments.

* progmodes/compile.el (compilation-start): Redefine
`start-process' temporarily when `default-directory' is remote.
Remove case of synchronous compilation, this won't happen ever.
(compilation-setup): Make local variable `comint-file-name-prefix'
for remote compilation.
2007-07-08 18:03:20 +00:00
Michael Albinus
9ee5e81e95 Sync with Tramp 2.0.56. 2007-06-07 20:14:45 +00:00
Michael Albinus
f3c071dda5 *** empty log message *** 2007-05-28 10:32:54 +00:00
Michael Albinus
69cee87364 * net/tramp.el (tramp-register-file-name-handler)
(tramp-register-completion-file-name-handler): New defsubst,
derived from `tramp-register-file-name-handlers'.  The split is
necessary because Tramp's file name handlers must be registered at
different startup places.
2007-03-31 18:38:18 +00:00
Michael Albinus
bba31a09c8 * net/tramp.el (tramp-make-temp-file): New parameter FILENAME.
Append its extension to the resulting temporary file name.
(tramp-handle-file-local-copy, tramp-handle-write-region): Apply
it.

* net/tramp-smb.el (tramp-smb-handle-file-local-copy)
(tramp-smb-handle-write-region): Apply it.
2007-03-05 06:41:59 +00:00
Chong Yidong
e762677c59 (tramp-file-name-handler): Revert last change. 2007-02-28 22:22:20 +00:00
Chong Yidong
cd00d0a053 (tramp-file-name-handler): Inhibit modification hooks to avoid
confusion when combining after-change calls.
2007-02-28 01:35:20 +00:00
Michael Albinus
bf0503cba9 * net/tramp.el (tramp-get-ls-command, tramp-get-file-exists-command)
(tramp-get-remote-ln): Handle error case.  Reported by Chris Moore
<dooglus@gmail.com>.
2007-02-12 06:19:54 +00:00
Michael Albinus
00e10871c5 * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Set
default-directory to a sane value when calling start-process.
2007-01-27 14:40:08 +00:00
Glenn Morris
cbd12ed70a (tramp-perl-encode, tramp-perl-decode): Update copyrights. 2007-01-21 20:38:00 +00:00
Michael Albinus
d8bba37c56 * net/tramp.el (tramp-handle-file-local-copy): Set
`enable-multibyte-characters' to nil.  Reported by Chris Moore
<christopher.ian.moore@gmail.com>.
2007-01-11 20:08:04 +00:00
Michael Albinus
e64666972e * net/tramp.el: (tramp-process-one-action): Remove `with-timeout'.
(tramp-process-actions): Add optional parameter TIMEOUT.
(tramp-open-connection-telnet, tramp-open-connection-rsh)
(tramp-open-connection-su): Add timeout of 60".
2007-01-09 05:04:15 +00:00
Michael Albinus
496f830892 * net/tramp.el (tramp-default-method): Don't call `symbol-function'.
Apply `funcall' directly on 'executable-find.
2006-12-31 15:03:51 +00:00
Michael Albinus
658052a2ce Sync with Tramp 2.0.55. 2006-12-30 16:17:10 +00:00
Michael Albinus
83e20b5c89 * net/tramp.el (tramp-default-method): We still need to check for
`executable-find', because it is not bound under Emacs 20.
2006-12-20 21:29:46 +00:00
Michael Albinus
e1e17cae49 * net/ange-ftp.el (ange-ftp-file-name-completion): Handle optional
parameter PREDICATE.

* lisp/tramp.el (tramp-handle-file-name-completion)
(tramp-completion-handle-file-name-completion): Handle optional
parameter PREDICATE.
(tramp-find-default-method): Add code for default values.
2006-12-20 05:57:41 +00:00
Michael Albinus
bb8792de32 *** empty log message *** 2006-12-19 07:26:25 +00:00
Michael Albinus
572b79d819 * net/tramp.el (tramp-methods): Introduce new method `scpc'.
Remove "ControlMaster" option from the other `scp*' methods.
(tramp-default-method): Check for ssh-agent before setting to
`scp'.
2006-12-19 06:56:27 +00:00
Michael Albinus
210a7c2c92 * net/tramp.el (tramp-default-method): Before setting to "pscp",
check whether package password.el is loaded, or Pageant is running.
2006-12-17 12:58:04 +00:00
Michael Albinus
5717642238 * net/tramp.el (tramp-methods): Add "ControlPath" and
"ControlMaster" to scp, scp1 and scp2 methods.  Suggested by
Andreas Schwab <schwab@suse.de>.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-open-connection-rsh): Compute format spec for ?t.
(tramp-process-actions): Trace command parameters.
2006-12-04 06:51:21 +00:00
Lars Hansen
6b2633cced (tramp-default-method): Under Windows, change from plink to pscp.
(tramp-copy-failed-regexp, tramp-action-copy-failed): Add.
(tramp-actions-copy-out-of-band): Add pair (tramp-copy-failed-regexp tramp-action-copy-failed).
(tramp-action-out-of-band): Move "Permission denied" handling to tramp-action-copy-failed.
(tramp-do-copy-or-rename-file-out-of-band): unwind-protect killing of process buffer.
2006-11-24 19:14:46 +00:00
Michael Albinus
d8d555f293 * net/tramp.el (top): cl and custom are always required. 2006-11-18 17:42:32 +00:00
Glenn Morris
95bb178f0c (tramp-unified-filenames): Improve previos doc fix. 2006-11-11 04:01:02 +00:00
Glenn Morris
3b004a2d9e (tramp-unified-filenames): Doc fix (Nil -> nil). 2006-11-10 09:10:07 +00:00
Michael Albinus
1d1c19ca25 * lisp/net/tramp.el (tramp-default-method): scp is the default method.
* man/tramp.texi (Configuration): scp is the default method.
(Default Method): Use ssh as example for another method.
2006-11-07 10:58:19 +00:00
Lars Hansen
8e7225a262 (with-parsed-tramp-file-name): Correct debug spec. Highlight as keyword.
(tramp-do-copy-or-rename-file): Correct data for 'file-already-exists.
Don't call tramp-method-out-of-band-p for local files.
(tramp-touch): Quote file name.
2006-10-29 12:55:35 +00:00
Michael Albinus
1a762140f1 Sync with Tramp 2.0.54. 2006-08-29 05:48:40 +00:00
Michael Albinus
d163f71e86 * net/tramp.el (tramp-handle-shell-command): Preserve current-buffer. 2006-07-02 20:29:20 +00:00
Michael Albinus
08b1eb21d5 * net/rcompile.el (remote-compile): Replace ange-ftp based
implementation by Tramp functions.  Based on a patch published by
Marc Abramowitz <msabramo@gmail.com>.

* net/tramp.el (tramp-unload-tramp): Provide a doc string.
2006-06-25 21:05:03 +00:00