/[emacs]/emacs/lisp/net/tramp.el
ViewVC logotype

Diff of /emacs/lisp/net/tramp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by sds, Sun Dec 5 21:42:44 2004 UTC revision 1.59 by albinus, Fri Dec 17 19:35:45 2004 UTC
# Line 34  Line 34 
34  ;;  ;;
35  ;; Notes:  ;; Notes:
36  ;; -----  ;; -----
37  ;;  ;;
38  ;; This package only works for Emacs 20 and higher, and for XEmacs 21  ;; This package only works for Emacs 20 and higher, and for XEmacs 21
39  ;; and higher.  (XEmacs 20 is missing the `with-timeout' macro.  Emacs  ;; and higher.  (XEmacs 20 is missing the `with-timeout' macro.  Emacs
40  ;; 19 is reported to have other problems.  For XEmacs 21, you need the  ;; 19 is reported to have other problems.  For XEmacs 21, you need the
# Line 205  file name, the backup directory is prepe Line 205  file name, the backup directory is prepe
205    
206  gives the same backup policy for Tramp files on their hosts like the  gives the same backup policy for Tramp files on their hosts like the
207  policy for local files."  policy for local files."
208        :type '(repeat        :type '(repeat
209                (list (regexp :tag "File regexp")                (list (regexp :tag "File regexp")
210                      (string :tag "Backup Dir")                      (string :tag "Backup Dir")
211                      (set :inline t                      (set :inline t
# Line 506  This variable defaults to the value of ` Line 506  This variable defaults to the value of `
506                (tramp-copy-args            nil)                (tramp-copy-args            nil)
507                (tramp-copy-keep-date-arg   "-p")                (tramp-copy-keep-date-arg   "-p")
508                (tramp-password-end-of-line "xy")) ;see docstring for "xy"                (tramp-password-end-of-line "xy")) ;see docstring for "xy"
509       ("fcp"       ("fcp"  
510                (tramp-connection-function  tramp-open-connection-rsh)                (tramp-connection-function  tramp-open-connection-rsh)
511                (tramp-login-program        "fsh")                (tramp-login-program        "fsh")
512                (tramp-copy-program         "fcp")                (tramp-copy-program         "fcp")
# Line 633  variable `tramp-methods'." Line 633  variable `tramp-methods'."
633      ("rsh"    tramp-multi-connect-rlogin "rsh %h -l %u%n")      ("rsh"    tramp-multi-connect-rlogin "rsh %h -l %u%n")
634      ("remsh"  tramp-multi-connect-rlogin "remsh %h -l %u%n")      ("remsh"  tramp-multi-connect-rlogin "remsh %h -l %u%n")
635      ("ssh"    tramp-multi-connect-rlogin "ssh %h -l %u%n")      ("ssh"    tramp-multi-connect-rlogin "ssh %h -l %u%n")
636      ("ssht"   tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")      ("ssht"   tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")    
637      ("su"     tramp-multi-connect-su     "su - %u%n")      ("su"     tramp-multi-connect-su     "su - %u%n")
638      ("sudo"   tramp-multi-connect-su     "sudo -u %u -s -p Password:%n"))      ("sudo"   tramp-multi-connect-su     "sudo -u %u -s -p Password:%n"))
639    "*List of connection functions for multi-hop methods.    "*List of connection functions for multi-hop methods.
# Line 777  the info pages.") Line 777  the info pages.")
777        "sudo" tramp-completion-function-alist-su)        "sudo" tramp-completion-function-alist-su)
778       (tramp-set-completion-function       (tramp-set-completion-function
779        "multi" nil)        "multi" nil)
780       (tramp-set-completion-function       (tramp-set-completion-function
781        "scpx" tramp-completion-function-alist-ssh)        "scpx" tramp-completion-function-alist-ssh)
782       (tramp-set-completion-function       (tramp-set-completion-function
783        "sshx" tramp-completion-function-alist-ssh)        "sshx" tramp-completion-function-alist-ssh)
# Line 1536  cat /tmp/tramp.$$ Line 1536  cat /tmp/tramp.$$
1536  rm -f /tmp/tramp.$$  rm -f /tmp/tramp.$$
1537  }"  }"
1538    "Shell function to implement `uudecode' to standard output.    "Shell function to implement `uudecode' to standard output.
1539  Many systems support `uudecode -o /dev/stdout' for this or  Many systems support `uudecode -o /dev/stdout' or `uudecode -o -'
1540  `uudecode -o -' or `uudecode -p', but some systems don't, and for  for this or `uudecode -p', but some systems don't, and for them
1541  them we have this shell function.")  we have this shell function.")
1542    
1543  ;; Perl script to implement `file-attributes' in a Lisp `read'able  ;; Perl script to implement `file-attributes' in a Lisp `read'able
1544  ;; output.  If you are hacking on this, note that you get *no* output  ;; output.  If you are hacking on this, note that you get *no* output
# Line 1960  If VAR is nil, then we bind `v' to the s Line 1960  If VAR is nil, then we bind `v' to the s
1960  (put 'with-parsed-tramp-file-name 'lisp-indent-function 2)  (put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
1961  ;; To be activated for debugging containing this macro  ;; To be activated for debugging containing this macro
1962  ;; It works only when VAR is nil.  Otherwise, it can be deactivated by  ;; It works only when VAR is nil.  Otherwise, it can be deactivated by
1963  ;; (def-edebug-spec with-parsed-tramp-file-name 0)  ;; (put 'with-parsed-tramp-file-name 'edebug-form-spec 0)
1964  ;; I'm too stupid to write a precise SPEC for it.  ;; I'm too stupid to write a precise SPEC for it.
1965  (if (functionp 'def-edebug-spec)  (put 'with-parsed-tramp-file-name 'edebug-form-spec t)
   (def-edebug-spec with-parsed-tramp-file-name t))  
1966    
1967  (defmacro tramp-let-maybe (variable value &rest body)  (defmacro tramp-let-maybe (variable value &rest body)
1968    "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete.    "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete.
# Line 2056  target of the symlink differ." Line 2055  target of the symlink differ."
2055          (setq filename (tramp-file-name-localname          (setq filename (tramp-file-name-localname
2056                          (tramp-dissect-file-name                          (tramp-dissect-file-name
2057                           (expand-file-name filename)))))                           (expand-file-name filename)))))
2058        
2059        ;; Right, they are on the same host, regardless of user, method, etc.        ;; Right, they are on the same host, regardless of user, method, etc.
2060        ;; We now make the link on the remote machine. This will occur as the user        ;; We now make the link on the remote machine. This will occur as the user
2061        ;; that FILENAME belongs to.        ;; that FILENAME belongs to.
# Line 2065  target of the symlink differ." Line 2064  target of the symlink differ."
2064          l-multi-method l-method l-user l-host          l-multi-method l-method l-user l-host
2065          (format "cd %s && %s -sf %s %s"          (format "cd %s && %s -sf %s %s"
2066                  cwd ln                  cwd ln
2067                  filename                  filename
2068                  l-localname)                  l-localname)
2069          t)))))          t)))))
2070    
# Line 2347  target of the symlink differ." Line 2346  target of the symlink differ."
2346                              "file attributes with perl: %s"                              "file attributes with perl: %s"
2347                              (tramp-make-tramp-file-name                              (tramp-make-tramp-file-name
2348                               multi-method method user host localname))                               multi-method method user host localname))
2349    (tramp-maybe-send-perl-script tramp-perl-file-attributes    (tramp-maybe-send-perl-script multi-method method user host
2350                                  "tramp_file_attributes"                                  tramp-perl-file-attributes
2351                                  multi-method method user host)                                  "tramp_file_attributes")
2352    (tramp-send-command multi-method method user host    (tramp-send-command multi-method method user host
2353                        (format "tramp_file_attributes %s %s"                        (format "tramp_file_attributes %s %s"
2354                                (tramp-shell-quote-argument localname) id-format))                                (tramp-shell-quote-argument localname) id-format))
# Line 2394  target of the symlink differ." Line 2393  target of the symlink differ."
2393  ;; This function makes the same assumption as  ;; This function makes the same assumption as
2394  ;; `tramp-handle-set-visited-file-modtime'.  ;; `tramp-handle-set-visited-file-modtime'.
2395  (defun tramp-handle-verify-visited-file-modtime (buf)  (defun tramp-handle-verify-visited-file-modtime (buf)
2396    "Like `verify-visited-file-modtime' for tramp files."    "Like `verify-visited-file-modtime' for tramp files.
2397    At the time `verify-visited-file-modtime' calls this function, we
2398    already know that the buffer is visiting a file and that
2399    `visited-file-modtime' does not return 0.  Do not call this
2400    function directly, unless those two cases are already taken care
2401    of."
2402    (with-current-buffer buf    (with-current-buffer buf
2403      ;; There is no file visiting the buffer, or the buffer has no      ;; There is no file visiting the buffer, or the buffer has no
2404      ;; recorded last modification time.      ;; recorded last modification time.
# Line 2406  target of the symlink differ." Line 2410  target of the symlink differ."
2410            (let* ((attr (file-attributes f))            (let* ((attr (file-attributes f))
2411                   (modtime (nth 5 attr))                   (modtime (nth 5 attr))
2412                   (mt (visited-file-modtime)))                   (mt (visited-file-modtime)))
2413                
2414              (cond              (cond
2415               ;; file exists, and has a known modtime.               ;; file exists, and has a known modtime.
2416               ((and attr (not (equal modtime '(0 0))))               ((and attr (not (equal modtime '(0 0))))
# Line 2689  if the remote host can't provide the mod Line 2693  if the remote host can't provide the mod
2693      (save-excursion      (save-excursion
2694        (setq directory (tramp-handle-expand-file-name directory))        (setq directory (tramp-handle-expand-file-name directory))
2695        (with-parsed-tramp-file-name directory nil        (with-parsed-tramp-file-name directory nil
2696          (tramp-maybe-send-perl-script tramp-perl-directory-files-and-attributes          (tramp-maybe-send-perl-script multi-method method user host
2697                                        "tramp_directory_files_and_attributes"                                        tramp-perl-directory-files-and-attributes
2698                                        multi-method method user host)                                        "tramp_directory_files_and_attributes")
2699          (tramp-send-command multi-method method user host          (tramp-send-command multi-method method user host
2700                              (format "tramp_directory_files_and_attributes %s %s"                              (format "tramp_directory_files_and_attributes %s %s"
2701                                      (tramp-shell-quote-argument localname)                                      (tramp-shell-quote-argument localname)
# Line 2753  if the remote host can't provide the mod Line 2757  if the remote host can't provide the mod
2757              (push (buffer-substring (point)              (push (buffer-substring (point)
2758                                      (tramp-line-end-position))                                      (tramp-line-end-position))
2759                    result))                    result))
2760            
2761            (tramp-send-command multi-method method user host "cd")            (tramp-send-command multi-method method user host "cd")
2762            (tramp-wait-for-output)            (tramp-wait-for-output)
2763    
# Line 3096  be a local filename.  The method used mu Line 3100  be a local filename.  The method used mu
3100    
3101      ;; Use an asynchronous process.  By this, password can be handled.      ;; Use an asynchronous process.  By this, password can be handled.
3102      (save-excursion      (save-excursion
3103    
3104          ;; Check for program.
3105          (when (and (fboundp 'executable-find)
3106                     (not (executable-find copy-program)))
3107            (error "Cannot find copy program: %s" copy-program))
3108    
3109        (set-buffer trampbuf)        (set-buffer trampbuf)
3110        (setq tramp-current-multi-method multi-method        (setq tramp-current-multi-method multi-method
3111              tramp-current-method method              tramp-current-method method
# Line 3170  This is like `dired-recursive-delete-dir Line 3180  This is like `dired-recursive-delete-dir
3180           'file-error           'file-error
3181           (list "Removing old file name" "no such directory" filename)))           (list "Removing old file name" "no such directory" filename)))
3182      ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>)      ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>)
3183      (tramp-send-command multi-method method user host      (tramp-send-command multi-method method user host
3184                          (format "rm -r %s" (tramp-shell-quote-argument localname)))                          (format "rm -r %s" (tramp-shell-quote-argument localname)))
3185      ;; Wait for the remote system to return to us...      ;; Wait for the remote system to return to us...
3186      ;; This might take a while, allow it plenty of time.      ;; This might take a while, allow it plenty of time.
3187      (tramp-wait-for-output 120)      (tramp-wait-for-output 120)
3188      ;; Make sure that it worked...      ;; Make sure that it worked...
3189      (and (file-exists-p filename)      (and (file-exists-p filename)
3190           (error "Failed to recusively delete %s" filename))))           (error "Failed to recursively delete %s" filename))))
3191            
3192  (defun tramp-handle-dired-call-process (program discard &rest arguments)  (defun tramp-handle-dired-call-process (program discard &rest arguments)
3193    "Like `dired-call-process' for tramp files."    "Like `dired-call-process' for tramp files."
3194    (with-parsed-tramp-file-name default-directory nil    (with-parsed-tramp-file-name default-directory nil
# Line 3200  This is like `dired-recursive-delete-dir Line 3210  This is like `dired-recursive-delete-dir
3210            (tramp-send-command-and-check multi-method method user host nil)            (tramp-send-command-and-check multi-method method user host nil)
3211          (tramp-send-command multi-method method user host "cd")          (tramp-send-command multi-method method user host "cd")
3212          (tramp-wait-for-output)))))          (tramp-wait-for-output)))))
3213            
3214  (defun tramp-handle-dired-compress-file (file &rest ok-flag)  (defun tramp-handle-dired-compress-file (file &rest ok-flag)
3215    "Like `dired-compress-file' for tramp files."    "Like `dired-compress-file' for tramp files."
3216    ;; OK-FLAG is valid for XEmacs only, but not implemented.    ;; OK-FLAG is valid for XEmacs only, but not implemented.
# Line 3568  This will break if COMMAND prints a newl Line 3578  This will break if COMMAND prints a newl
3578    (when (and (numberp buffer) (zerop buffer))    (when (and (numberp buffer) (zerop buffer))
3579      (error "Implementation does not handle immediate return"))      (error "Implementation does not handle immediate return"))
3580    (when (consp buffer) (error "Implementation does not handle error files"))    (when (consp buffer) (error "Implementation does not handle error files"))
3581    (shell-command    (shell-command
3582     (mapconcat 'tramp-shell-quote-argument     (mapconcat 'tramp-shell-quote-argument
3583                (cons program args)                (cons program args)
3584                " ")                " ")
# Line 4250  necessary anymore." Line 4260  necessary anymore."
4260  ;; `tramp-completion-file-name-regexp-unified' aren't different.  ;; `tramp-completion-file-name-regexp-unified' aren't different.
4261  ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to  ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to
4262  ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.  ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.
4263  ;; Using `last-input-event' is a little bit risky, because completing a file  ;; Using `last-input-event' is a little bit risky, because completing a file
4264  ;; might require loading other files, like "~/.netrc", and for them it  ;; might require loading other files, like "~/.netrc", and for them it
4265  ;; shouldn't be decided based on that variable. On the other hand, those files  ;; shouldn't be decided based on that variable. On the other hand, those files
4266  ;; shouldn't have partial tramp file name syntax. Maybe another variable should  ;; shouldn't have partial tramp file name syntax. Maybe another variable should
# Line 4354  necessary anymore." Line 4364  necessary anymore."
4364                                 (funcall (nth 0 x) (nth 1 x)))))                                 (funcall (nth 0 x) (nth 1 x)))))
4365                 (tramp-get-completion-function m))                 (tramp-get-completion-function m))
4366    
4367                (setq result (append result                (setq result (append result
4368                  (mapcar                  (mapcar
4369                   (lambda (x)                   (lambda (x)
4370                     (tramp-get-completion-user-host                     (tramp-get-completion-user-host
# Line 4395  necessary anymore." Line 4405  necessary anymore."
4405  ;; [nil nil "x" nil nil]  ;; [nil nil "x" nil nil]
4406  ;; [nil "x" nil nil nil]  ;; [nil "x" nil nil nil]
4407    
4408  ;; "/x:"                    "/x:y"                   "/x:y:"  ;; "/x:"                    "/x:y"                   "/x:y:"                  
4409  ;; [nil nil nil "x" ""]     [nil nil nil "x" "y"]    [nil "x" nil "y" ""]  ;; [nil nil nil "x" ""]     [nil nil nil "x" "y"]    [nil "x" nil "y" ""]
4410  ;;       "/[x/"                   "/[x/y"  ;;       "/[x/"                   "/[x/y"
4411  ;; [nil "x" nil "" nil]     [nil "x" nil "y" nil]  ;; [nil "x" nil "" nil]     [nil "x" nil "y" nil]
# Line 4769  User may be nil." Line 4779  User may be nil."
4779    
4780  ;;; Internal Functions:  ;;; Internal Functions:
4781    
4782  (defun tramp-maybe-send-perl-script (script name multi-method method user host)  (defun tramp-maybe-send-perl-script (multi-method method user host script name)
4783    "Define in remote shell function NAME implemented as perl SCRIPT.    "Define in remote shell function NAME implemented as perl SCRIPT.
4784  Only send the definition if it has not already been done.  Only send the definition if it has not already been done.
4785  Function may have 0-3 parameters."  Function may have 0-3 parameters."
# Line 4864  TIME is an Emacs internal time value as Line 4874  TIME is an Emacs internal time value as
4874                          "touch" nil (current-buffer) nil "-t" touch-time file))                          "touch" nil (current-buffer) nil "-t" touch-time file))
4875                (pop-to-buffer (current-buffer))                (pop-to-buffer (current-buffer))
4876                (error "tramp-touch: touch failed"))))))                (error "tramp-touch: touch failed"))))))
4877    
4878  (defun tramp-buffer-name (multi-method method user host)  (defun tramp-buffer-name (multi-method method user host)
4879    "A name for the connection buffer for USER at HOST using METHOD."    "A name for the connection buffer for USER at HOST using METHOD."
4880    (if multi-method    (if multi-method
# Line 5022  file exists and nonzero exit status othe Line 5032  file exists and nonzero exit status othe
5032                    (file-exists-p existing)                    (file-exists-p existing)
5033                    (not (file-exists-p nonexisting))))                    (not (file-exists-p nonexisting))))
5034        (error "Couldn't find command to check if file exists."))))        (error "Couldn't find command to check if file exists."))))
5035        
5036    
5037  ;; CCC test ksh or bash found for tilde expansion?  ;; CCC test ksh or bash found for tilde expansion?
5038  (defun tramp-find-shell (multi-method method user host)  (defun tramp-find-shell (multi-method method user host)
# Line 5121  Returns nil if none was found, else the Line 5131  Returns nil if none was found, else the
5131     (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path)     (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path)
5132     (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path)))     (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path)))
5133    
5134  ;; ------------------------------------------------------------  ;; ------------------------------------------------------------
5135  ;; -- Functions for establishing connection --  ;; -- Functions for establishing connection --
5136  ;; ------------------------------------------------------------  ;; ------------------------------------------------------------
5137    
5138  ;; The following functions are actions to be taken when seeing certain  ;; The following functions are actions to be taken when seeing certain
5139  ;; prompts from the remote host.  See the variable  ;; prompts from the remote host.  See the variable
# Line 5364  Maybe the different regular expressions Line 5374  Maybe the different regular expressions
5374      (when multi-method      (when multi-method
5375        (error "Cannot multi-connect using telnet connection method"))        (error "Cannot multi-connect using telnet connection method"))
5376      (tramp-pre-connection multi-method method user host)      (tramp-pre-connection multi-method method user host)
5377      (tramp-message 7 "Opening connection for %s@%s using %s..."      (tramp-message 7 "Opening connection for %s@%s using %s..."
5378                     (or user (user-login-name)) host method)                     (or user (user-login-name)) host method)
5379      (let ((process-environment (copy-sequence process-environment)))      (let ((process-environment (copy-sequence process-environment)))
5380        (setenv "TERM" tramp-terminal-type)        (setenv "TERM" tramp-terminal-type)
# Line 5398  Maybe the different regular expressions Line 5408  Maybe the different regular expressions
5408           p multi-method method user host)           p multi-method method user host)
5409          (tramp-post-connection multi-method method user host)))))          (tramp-post-connection multi-method method user host)))))
5410    
5411                
5412  (defun tramp-open-connection-rsh (multi-method method user host)  (defun tramp-open-connection-rsh (multi-method method user host)
5413    "Open a connection using an rsh METHOD.    "Open a connection using an rsh METHOD.
5414  This starts the command `rsh HOST -l USER'[*], then waits for a remote  This starts the command `rsh HOST -l USER'[*], then waits for a remote
# Line 5423  arguments, and xx will be used as the ho Line 5433  arguments, and xx will be used as the ho
5433        (error "Cannot multi-connect using rsh connection method"))        (error "Cannot multi-connect using rsh connection method"))
5434      (tramp-pre-connection multi-method method user host)      (tramp-pre-connection multi-method method user host)
5435      (if (and user (not (string= user "")))      (if (and user (not (string= user "")))
5436          (tramp-message 7 "Opening connection for %s@%s using %s..."          (tramp-message 7 "Opening connection for %s@%s using %s..."
5437                         user host method)                         user host method)
5438        (tramp-message 7 "Opening connection at %s using %s..." host method))        (tramp-message 7 "Opening connection at %s using %s..." host method))
5439      (let ((process-environment (copy-sequence process-environment))      (let ((process-environment (copy-sequence process-environment))
# Line 5452  arguments, and xx will be used as the ho Line 5462  arguments, and xx will be used as the ho
5462                                                    (> emacs-major-version 20))                                                    (> emacs-major-version 20))
5463                                         tramp-dos-coding-system))                                         tramp-dos-coding-system))
5464               (p (if (and user (not (string= user "")))               (p (if (and user (not (string= user "")))
5465                      (apply #'start-process bufnam buf login-program                      (apply #'start-process bufnam buf login-program  
5466                             real-host "-l" user login-args)                             real-host "-l" user login-args)
5467                    (apply #'start-process bufnam buf login-program                    (apply #'start-process bufnam buf login-program
5468                           real-host login-args)))                           real-host login-args)))
5469               (found nil))               (found nil))
5470          (tramp-set-process-query-on-exit-flag p nil)          (tramp-set-process-query-on-exit-flag p nil)
# Line 5524  prompt than you do, so it is not at all Line 5534  prompt than you do, so it is not at all
5534                                 tramp-actions-before-shell)                                 tramp-actions-before-shell)
5535          (tramp-open-connection-setup-interactive-shell          (tramp-open-connection-setup-interactive-shell
5536           p multi-method method user host)           p multi-method method user host)
5537          (tramp-post-connection multi-method method          (tramp-post-connection multi-method method
5538                                 user host)))))                                 user host)))))
5539    
5540  ;; HHH: Not Changed.  Multi method.  It is not clear to me how this can  ;; HHH: Not Changed.  Multi method.  It is not clear to me how this can
5541  ;;      handle not giving a user name in the "file name".  ;;      handle not giving a user name in the "file name".
5542  ;;  ;;
5543  ;;      This is more difficult than for the single-hop method.  In the  ;;      This is more difficult than for the single-hop method.  In the
# Line 5597  log in as u2 to h2." Line 5607  log in as u2 to h2."
5607          (tramp-post-connection multi-method method user host)))))          (tramp-post-connection multi-method method user host)))))
5608    
5609  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
5610  ;;      of no user name provided.  Hack to make it work as it did before:  ;;      of no user name provided.  Hack to make it work as it did before:  
5611  ;;      changed `user' to `(or user (user-login-name))' in the places where  ;;      changed `user' to `(or user (user-login-name))' in the places where
5612  ;;      the value is actually used.  ;;      the value is actually used.
5613  (defun tramp-multi-connect-telnet (p method user host command)  (defun tramp-multi-connect-telnet (p method user host command)
# Line 5619  If USER is nil, uses the return value of Line 5629  If USER is nil, uses the return value of
5629      (tramp-process-multi-actions p method user host      (tramp-process-multi-actions p method user host
5630                                   tramp-multi-actions)))                                   tramp-multi-actions)))
5631    
5632  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
5633  ;;      of no user name provided.  Hack to make it work as it did before:  ;;      of no user name provided.  Hack to make it work as it did before:  
5634  ;;      changed `user' to `(or user (user-login-name))' in the places where  ;;      changed `user' to `(or user (user-login-name))' in the places where
5635  ;;      the value is actually used.  ;;      the value is actually used.
5636  (defun tramp-multi-connect-rlogin (p method user host command)  (defun tramp-multi-connect-rlogin (p method user host command)
# Line 5645  If USER is nil, uses the return value of Line 5655  If USER is nil, uses the return value of
5655      (tramp-process-multi-actions p method user host      (tramp-process-multi-actions p method user host
5656                                   tramp-multi-actions)))                                   tramp-multi-actions)))
5657    
5658  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
5659  ;;      of no user name provided.  Hack to make it work as it did before:  ;;      of no user name provided.  Hack to make it work as it did before:  
5660  ;;      changed `user' to `(or user (user-login-name))' in the places where  ;;      changed `user' to `(or user (user-login-name))' in the places where
5661  ;;      the value is actually used.  ;;      the value is actually used.
5662  (defun tramp-multi-connect-su (p method user host command)  (defun tramp-multi-connect-su (p method user host command)
# Line 6276  Sends COMMAND, then waits 30 seconds for Line 6286  Sends COMMAND, then waits 30 seconds for
6286    (tramp-barf-if-no-shell-prompt    (tramp-barf-if-no-shell-prompt
6287     nil 30     nil 30
6288     "Couldn't `%s', see buffer `%s'" command (buffer-name)))     "Couldn't `%s', see buffer `%s'" command (buffer-name)))
6289      
6290  (defun tramp-wait-for-output (&optional timeout)  (defun tramp-wait-for-output (&optional timeout)
6291    "Wait for output from remote rsh command."    "Wait for output from remote rsh command."
6292    (let ((proc (get-buffer-process (current-buffer)))    (let ((proc (get-buffer-process (current-buffer)))
# Line 6609  Not actually used.  Use `(format \"%o\" Line 6619  Not actually used.  Use `(format \"%o\"
6619     ""))     ""))
6620    
6621    
6622  ;; ------------------------------------------------------------  ;; ------------------------------------------------------------
6623  ;; -- TRAMP file names --  ;; -- TRAMP file names --
6624  ;; ------------------------------------------------------------  ;; ------------------------------------------------------------
6625  ;; Conversion functions between external representation and  ;; Conversion functions between external representation and
6626  ;; internal data structure.  Convenience functions for internal  ;; internal data structure.  Convenience functions for internal
6627  ;; data structure.  ;; data structure.
# Line 6622  Not actually used.  Use `(format \"%o\" Line 6632  Not actually used.  Use `(format \"%o\"
6632    "Return t iff NAME is a tramp file."    "Return t iff NAME is a tramp file."
6633    (save-match-data    (save-match-data
6634      (string-match tramp-file-name-regexp name)))      (string-match tramp-file-name-regexp name)))
6635    
6636  ;; HHH: Changed.  Used to assign the return value of (user-login-name)  ;; HHH: Changed.  Used to assign the return value of (user-login-name)
6637  ;;      to the `user' part of the structure if a user name was not  ;;      to the `user' part of the structure if a user name was not
6638  ;;      provided, now it assigns nil.  ;;      provided, now it assigns nil.
# Line 6675  This is MULTI-METHOD, if non-nil.  Other Line 6685  This is MULTI-METHOD, if non-nil.  Other
6685  If both MULTI-METHOD and METHOD are nil, do a lookup in  If both MULTI-METHOD and METHOD are nil, do a lookup in
6686  `tramp-default-method-alist'."  `tramp-default-method-alist'."
6687    (or multi-method method (tramp-find-default-method user host)))    (or multi-method method (tramp-find-default-method user host)))
6688        
6689  ;; HHH: Not Changed.  Multi method.  Will probably not handle the case where  ;; HHH: Not Changed.  Multi method.  Will probably not handle the case where
6690  ;;      a user name is not provided in the "file name" very well.  ;;      a user name is not provided in the "file name" very well.
6691  (defun tramp-dissect-multi-file-name (name)  (defun tramp-dissect-multi-file-name (name)
# Line 6847  as default." Line 6857  as default."
6857      (if entry      (if entry
6858          (second entry)          (second entry)
6859        (symbol-value param))))        (symbol-value param))))
6860          
6861    
6862  ;; Auto saving to a special directory.  ;; Auto saving to a special directory.
6863    
# Line 7039  exiting if process is running." Line 7049  exiting if process is running."
7049               process flag)))               process flag)))
7050    
7051    
7052  ;; ------------------------------------------------------------  ;; ------------------------------------------------------------
7053  ;; -- Kludges section --  ;; -- Kludges section --
7054  ;; ------------------------------------------------------------  ;; ------------------------------------------------------------
7055    
7056  ;; Currently (as of Emacs 20.5), the function `shell-quote-argument'  ;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
7057  ;; does not deal well with newline characters.  Newline is replaced by  ;; does not deal well with newline characters.  Newline is replaced by
# Line 7304  report. Line 7314  report.
7314  ;;   strange when doing zerop, we should kill the process and start  ;;   strange when doing zerop, we should kill the process and start
7315  ;;   again.  (Greg Stark)  ;;   again.  (Greg Stark)
7316  ;; * Add caching for filename completion.  (Greg Stark)  ;; * Add caching for filename completion.  (Greg Stark)
7317  ;;   Of course, this has issues with usability (stale cache bites)  ;;   Of course, this has issues with usability (stale cache bites)
7318  ;;      -- <daniel@danann.net>  ;;      -- <daniel@danann.net>
7319  ;; * Provide a local cache of old versions of remote files for the rsync  ;; * Provide a local cache of old versions of remote files for the rsync
7320  ;;   transfer method to use.  (Greg Stark)  ;;   transfer method to use.  (Greg Stark)

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26