[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el |
Date: |
Tue, 04 Feb 2003 08:17:20 -0500 |
Index: emacs/lisp/net/tramp.el
diff -c emacs/lisp/net/tramp.el:1.30 emacs/lisp/net/tramp.el:1.31
*** emacs/lisp/net/tramp.el:1.30 Thu Dec 26 15:47:51 2002
--- emacs/lisp/net/tramp.el Tue Feb 4 08:17:16 2003
***************
*** 2,8 ****
;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
! ;; Author: address@hidden
;; Keywords: comm, processes
;; This file is part of GNU Emacs.
--- 2,8 ----
;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
! ;; Author: address@hidden
;; Keywords: comm, processes
;; This file is part of GNU Emacs.
***************
*** 34,40 ****
;;
;; Notes:
;; -----
! ;;
;; This package only works for Emacs 20 and higher, and for XEmacs 21
;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs
;; 19 is reported to have other problems. For XEmacs 21, you need the
--- 34,40 ----
;;
;; Notes:
;; -----
! ;;
;; This package only works for Emacs 20 and higher, and for XEmacs 21
;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs
;; 19 is reported to have other problems. For XEmacs 21, you need the
***************
*** 95,101 ****
(unless (fboundp 'uudecode-decode-region)
(autoload 'uudecode-decode-region "uudecode"))
! ;; ;; It does not work to load EFS after loading TRAMP.
;; (when (fboundp 'efs-file-handler-function)
;; (require 'efs))
--- 95,101 ----
(unless (fboundp 'uudecode-decode-region)
(autoload 'uudecode-decode-region "uudecode"))
! ;; ;; It does not work to load EFS after loading TRAMP.
;; (when (fboundp 'efs-file-handler-function)
;; (require 'efs))
***************
*** 483,489 ****
(tramp-su-args nil)
(tramp-telnet-program nil)
(tramp-telnet-args nil))
! ("fcp"
(tramp-connection-function tramp-open-connection-rsh)
(tramp-rsh-program "fsh")
(tramp-rcp-program "fcp")
--- 483,489 ----
(tramp-su-args nil)
(tramp-telnet-program nil)
(tramp-telnet-args nil))
! ("fcp"
(tramp-connection-function tramp-open-connection-rsh)
(tramp-rsh-program "fsh")
(tramp-rcp-program "fcp")
***************
*** 1782,1788 ****
(setq filename (tramp-file-name-path
(tramp-dissect-file-name
(expand-file-name filename)))))
!
;; Right, they are on the same host, regardless of user, method, etc.
;; We now make the link on the remote machine. This will occur as the
user
;; that FILENAME belongs to.
--- 1782,1788 ----
(setq filename (tramp-file-name-path
(tramp-dissect-file-name
(expand-file-name filename)))))
!
;; Right, they are on the same host, regardless of user, method, etc.
;; We now make the link on the remote machine. This will occur as the
user
;; that FILENAME belongs to.
***************
*** 1791,1797 ****
l-multi-method l-method l-user l-host
(format "cd %s && %s -sf %s %s"
cwd ln
! filename
l-path)
t)))))
--- 1791,1797 ----
l-multi-method l-method l-user l-host
(format "cd %s && %s -sf %s %s"
cwd ln
! filename
l-path)
t)))))
***************
*** 2063,2069 ****
multi-method method user host path))
(tramp-send-command
multi-method method user host
! (format "tramp_file_attributes %s"
(tramp-shell-quote-argument path)))
(tramp-wait-for-output)
(let ((result (read (current-buffer))))
--- 2063,2069 ----
multi-method method user host path))
(tramp-send-command
multi-method method user host
! (format "tramp_file_attributes %s"
(tramp-shell-quote-argument path)))
(tramp-wait-for-output)
(let ((result (read (current-buffer))))
***************
*** 2403,2409 ****
(push (buffer-substring (point)
(tramp-line-end-position))
result))
!
(tramp-send-command multi-method method user host "cd")
(tramp-wait-for-output)
--- 2403,2409 ----
(push (buffer-substring (point)
(tramp-line-end-position))
result))
!
(tramp-send-command multi-method method user host "cd")
(tramp-wait-for-output)
***************
*** 2647,2653 ****
'file-error
(list "Removing old file name" "no such directory" filename)))
;; Which is better, -r or -R? (-r works for me <address@hidden>)
! (tramp-send-command multi-method method user host
(format "rm -r %s" (tramp-shell-quote-argument path)))
;; Wait for the remote system to return to us...
;; This might take a while, allow it plenty of time.
--- 2647,2653 ----
'file-error
(list "Removing old file name" "no such directory" filename)))
;; Which is better, -r or -R? (-r works for me <address@hidden>)
! (tramp-send-command multi-method method user host
(format "rm -r %s" (tramp-shell-quote-argument path)))
;; Wait for the remote system to return to us...
;; This might take a while, allow it plenty of time.
***************
*** 2655,2661 ****
;; Make sure that it worked...
(and (tramp-handle-file-exists-p filename)
(error "Failed to recusively delete %s" filename))))
!
(defun tramp-handle-dired-call-process (program discard &rest arguments)
"Like `dired-call-process' for tramp files."
--- 2655,2661 ----
;; Make sure that it worked...
(and (tramp-handle-file-exists-p filename)
(error "Failed to recusively delete %s" filename))))
!
(defun tramp-handle-dired-call-process (program discard &rest arguments)
"Like `dired-call-process' for tramp files."
***************
*** 3505,3511 ****
;; `tramp-completion-file-name-regexp-unified' aren't different.
;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to
;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.
! ;; Using `last-input-event' is a little bit risky, because completing a file
;; might require loading other files, like "~/.netrc", and for them it
;; shouldn't be decided based on that variable. On the other hand, those files
;; shouldn't have partial tramp file name syntax. Maybe another variable
should
--- 3505,3511 ----
;; `tramp-completion-file-name-regexp-unified' aren't different.
;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to
;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.
! ;; Using `last-input-event' is a little bit risky, because completing a file
;; might require loading other files, like "~/.netrc", and for them it
;; shouldn't be decided based on that variable. On the other hand, those files
;; shouldn't have partial tramp file name syntax. Maybe another variable
should
***************
*** 3594,3600 ****
(funcall (nth 0 x) (nth 1 x)))))
(tramp-get-completion-function m))
! (setq result (append result
(mapcar
(lambda (x)
(tramp-get-completion-user-host
--- 3594,3600 ----
(funcall (nth 0 x) (nth 1 x)))))
(tramp-get-completion-function m))
! (setq result (append result
(mapcar
(lambda (x)
(tramp-get-completion-user-host
***************
*** 3635,3641 ****
;; [nil nil "x" nil nil]
;; [nil "x" nil nil nil]
! ;; "/x:" "/x:y" "/x:y:"
;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""]
;; "/[x/" "/[x/y"
;; [nil "x" nil "" nil] [nil "x" nil "y" nil]
--- 3635,3641 ----
;; [nil nil "x" nil nil]
;; [nil "x" nil nil nil]
! ;; "/x:" "/x:y" "/x:y:"
;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""]
;; "/[x/" "/[x/y"
;; [nil "x" nil "" nil] [nil "x" nil "y" nil]
***************
*** 4154,4160 ****
(tramp-handle-file-exists-p existing)
(not (tramp-handle-file-exists-p nonexisting))))
(error "Couldn't find command to check if file exists."))))
!
;; CCC test ksh or bash found for tilde expansion?
(defun tramp-find-shell (multi-method method user host)
--- 4154,4160 ----
(tramp-handle-file-exists-p existing)
(not (tramp-handle-file-exists-p nonexisting))))
(error "Couldn't find command to check if file exists."))))
!
;; CCC test ksh or bash found for tilde expansion?
(defun tramp-find-shell (multi-method method user host)
***************
*** 4253,4261 ****
(tramp-check-ls-commands multi-method method user host "gnuls"
tramp-remote-path)
(tramp-check-ls-commands multi-method method user host "gls"
tramp-remote-path)))
! ;; ------------------------------------------------------------
! ;; -- Functions for establishing connection --
! ;; ------------------------------------------------------------
;; The following functions are actions to be taken when seeing certain
;; prompts from the remote host. See the variable
--- 4253,4261 ----
(tramp-check-ls-commands multi-method method user host "gnuls"
tramp-remote-path)
(tramp-check-ls-commands multi-method method user host "gls"
tramp-remote-path)))
! ;; ------------------------------------------------------------
! ;; -- Functions for establishing connection --
! ;; ------------------------------------------------------------
;; The following functions are actions to be taken when seeing certain
;; prompts from the remote host. See the variable
***************
*** 4454,4460 ****
(when multi-method
(error "Cannot multi-connect using telnet connection method"))
(tramp-pre-connection multi-method method user host)
! (tramp-message 7 "Opening connection for address@hidden using %s..."
(or user (user-login-name)) host method)
(let ((process-environment (copy-sequence process-environment)))
(setenv "TERM" tramp-terminal-type)
--- 4454,4460 ----
(when multi-method
(error "Cannot multi-connect using telnet connection method"))
(tramp-pre-connection multi-method method user host)
! (tramp-message 7 "Opening connection for address@hidden using %s..."
(or user (user-login-name)) host method)
(let ((process-environment (copy-sequence process-environment)))
(setenv "TERM" tramp-terminal-type)
***************
*** 4488,4494 ****
p multi-method method user host)
(tramp-post-connection multi-method method user host)))))
!
(defun tramp-open-connection-rsh (multi-method method user host)
"Open a connection using an rsh METHOD.
This starts the command `rsh HOST -l USER'[*], then waits for a remote
--- 4488,4494 ----
p multi-method method user host)
(tramp-post-connection multi-method method user host)))))
!
(defun tramp-open-connection-rsh (multi-method method user host)
"Open a connection using an rsh METHOD.
This starts the command `rsh HOST -l USER'[*], then waits for a remote
***************
*** 4519,4525 ****
(error "Cannot multi-connect using rsh connection method"))
(tramp-pre-connection multi-method method user host)
(if (and user (not (string= user "")))
! (tramp-message 7 "Opening connection for address@hidden using %s..."
user host method)
(tramp-message 7 "Opening connection at %s using %s..." host method))
(let ((process-environment (copy-sequence process-environment))
--- 4519,4525 ----
(error "Cannot multi-connect using rsh connection method"))
(tramp-pre-connection multi-method method user host)
(if (and user (not (string= user "")))
! (tramp-message 7 "Opening connection for address@hidden using %s..."
user host method)
(tramp-message 7 "Opening connection at %s using %s..." host method))
(let ((process-environment (copy-sequence process-environment))
***************
*** 4547,4555 ****
(> emacs-major-version 20))
tramp-dos-coding-system))
(p (if (and user (not (string= user "")))
! (apply #'start-process bufnam buf rsh-program
host "-l" user rsh-args)
! (apply #'start-process bufnam buf rsh-program
host rsh-args)))
(found nil))
(process-kill-without-query p)
--- 4547,4555 ----
(> emacs-major-version 20))
tramp-dos-coding-system))
(p (if (and user (not (string= user "")))
! (apply #'start-process bufnam buf rsh-program
host "-l" user rsh-args)
! (apply #'start-process bufnam buf rsh-program
host rsh-args)))
(found nil))
(process-kill-without-query p)
***************
*** 4619,4628 ****
tramp-actions-before-shell)
(tramp-open-connection-setup-interactive-shell
p multi-method method user host)
! (tramp-post-connection multi-method method
user host)))))
! ;; HHH: Not Changed. Multi method. It is not clear to me how this can
;; handle not giving a user name in the "file name".
;;
;; This is more difficult than for the single-hop method. In the
--- 4619,4628 ----
tramp-actions-before-shell)
(tramp-open-connection-setup-interactive-shell
p multi-method method user host)
! (tramp-post-connection multi-method method
user host)))))
! ;; HHH: Not Changed. Multi method. It is not clear to me how this can
;; handle not giving a user name in the "file name".
;;
;; This is more difficult than for the single-hop method. In the
***************
*** 4692,4698 ****
(tramp-post-connection multi-method method user host)))))
;; HHH: Changed. Multi method. Don't know how to handle this in the case
! ;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-telnet (p method user host command)
--- 4692,4698 ----
(tramp-post-connection multi-method method user host)))))
;; HHH: Changed. Multi method. Don't know how to handle this in the case
! ;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-telnet (p method user host command)
***************
*** 4714,4721 ****
(tramp-process-multi-actions p method user host
tramp-multi-actions)))
! ;; HHH: Changed. Multi method. Don't know how to handle this in the case
! ;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-rlogin (p method user host command)
--- 4714,4721 ----
(tramp-process-multi-actions p method user host
tramp-multi-actions)))
! ;; HHH: Changed. Multi method. Don't know how to handle this in the case
! ;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-rlogin (p method user host command)
***************
*** 4740,4747 ****
(tramp-process-multi-actions p method user host
tramp-multi-actions)))
! ;; HHH: Changed. Multi method. Don't know how to handle this in the case
! ;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-su (p method user host command)
--- 4740,4747 ----
(tramp-process-multi-actions p method user host
tramp-multi-actions)))
! ;; HHH: Changed. Multi method. Don't know how to handle this in the case
! ;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-su (p method user host command)
***************
*** 5700,5708 ****
""))
! ;; ------------------------------------------------------------
! ;; -- TRAMP file names --
! ;; ------------------------------------------------------------
;; Conversion functions between external representation and
;; internal data structure. Convenience functions for internal
;; data structure.
--- 5700,5708 ----
""))
! ;; ------------------------------------------------------------
! ;; -- TRAMP file names --
! ;; ------------------------------------------------------------
;; Conversion functions between external representation and
;; internal data structure. Convenience functions for internal
;; data structure.
***************
*** 5713,5719 ****
"Return t iff NAME is a tramp file."
(save-match-data
(string-match tramp-file-name-regexp name)))
!
;; HHH: Changed. Used to assign the return value of (user-login-name)
;; to the `user' part of the structure if a user name was not
;; provided, now it assigns nil.
--- 5713,5719 ----
"Return t iff NAME is a tramp file."
(save-match-data
(string-match tramp-file-name-regexp name)))
!
;; HHH: Changed. Used to assign the return value of (user-login-name)
;; to the `user' part of the structure if a user name was not
;; provided, now it assigns nil.
***************
*** 5766,5772 ****
If both MULTI-METHOD and METHOD are nil, do a lookup in
`tramp-default-method-alist'."
(or multi-method method (tramp-find-default-method user host)))
!
;; HHH: Not Changed. Multi method. Will probably not handle the case where
;; a user name is not provided in the "file name" very well.
(defun tramp-dissect-multi-file-name (name)
--- 5766,5772 ----
If both MULTI-METHOD and METHOD are nil, do a lookup in
`tramp-default-method-alist'."
(or multi-method method (tramp-find-default-method user host)))
!
;; HHH: Not Changed. Multi method. Will probably not handle the case where
;; a user name is not provided in the "file name" very well.
(defun tramp-dissect-multi-file-name (name)
***************
*** 6137,6145 ****
it does the right thing."
(delete "" (split-string string pattern)))
! ;; ------------------------------------------------------------
! ;; -- Kludges section --
! ;; ------------------------------------------------------------
;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
;; does not deal well with newline characters. Newline is replaced by
--- 6137,6145 ----
it does the right thing."
(delete "" (split-string string pattern)))
! ;; ------------------------------------------------------------
! ;; -- Kludges section --
! ;; ------------------------------------------------------------
;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
;; does not deal well with newline characters. Newline is replaced by
***************
*** 6394,6400 ****
;; strange when doing zerop, we should kill the process and start
;; again. (Greg Stark)
;; * Add caching for filename completion. (Greg Stark)
! ;; Of course, this has issues with usability (stale cache bites)
;; -- <address@hidden>
;; * Provide a local cache of old versions of remote files for the rsync
;; transfer method to use. (Greg Stark)
--- 6394,6400 ----
;; strange when doing zerop, we should kill the process and start
;; again. (Greg Stark)
;; * Add caching for filename completion. (Greg Stark)
! ;; Of course, this has issues with usability (stale cache bites)
;; -- <address@hidden>
;; * Provide a local cache of old versions of remote files for the rsync
;; transfer method to use. (Greg Stark)
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,
Juanma Barranquero <=