emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el


From: Kai Großjohann
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el
Date: Thu, 22 Aug 2002 11:16:09 -0400

Index: emacs/lisp/net/tramp.el
diff -c emacs/lisp/net/tramp.el:1.21 emacs/lisp/net/tramp.el:1.22
*** emacs/lisp/net/tramp.el:1.21        Wed Aug 21 11:04:28 2002
--- emacs/lisp/net/tramp.el     Thu Aug 22 11:16:08 2002
***************
*** 72,78 ****
  ;; In the Tramp CVS repository, the version numer is auto-frobbed from
  ;; the Makefile, so you should edit the top-level Makefile to change
  ;; the version number.
! (defconst tramp-version "2.0.13"
    "This version of tramp.")
  
  (defconst tramp-bug-report-address "address@hidden"
--- 72,78 ----
  ;; In the Tramp CVS repository, the version numer is auto-frobbed from
  ;; the Makefile, so you should edit the top-level Makefile to change
  ;; the version number.
! (defconst tramp-version "2.0.14"
    "This version of tramp.")
  
  (defconst tramp-bug-report-address "address@hidden"
***************
*** 104,110 ****
    "Edit remote files with a combination of rsh and rcp or similar programs."
    :group 'files)
  
! (defcustom tramp-verbose 10
    "*Verbosity level for tramp.el.  0 means be silent, 10 is most verbose."
    :group 'tramp
    :type 'integer)
--- 104,110 ----
    "Edit remote files with a combination of rsh and rcp or similar programs."
    :group 'files)
  
! (defcustom tramp-verbose 9
    "*Verbosity level for tramp.el.  0 means be silent, 10 is most verbose."
    :group 'tramp
    :type 'integer)
***************
*** 699,704 ****
--- 699,717 ----
    :group 'tramp
    :type 'regexp)
  
+ (defcustom tramp-shell-prompt-pattern
+   "^[^#$%>\n]*[#$%>] *"
+   "Regexp to match prompts from remote shell.
+ Normally, Tramp expects you to configure `shell-prompt-pattern'
+ correctly, but sometimes it happens that you are connecting to a
+ remote host which sends a different kind of shell prompt.  Therefore,
+ Tramp recognizes things matched by `shell-prompt-pattern' as prompt,
+ and also things matched by this variable.  The default value of this
+ variable is the same as the default value of `shell-prompt-pattern',
+ which should work well in many cases."
+   :group 'tramp
+   :type 'regexp)
+ 
  (defcustom tramp-password-prompt-regexp
    "^.*\\([pP]assword\\|passphrase.*\\):address@hidden *"
    "*Regexp matching password-like prompts.
***************
*** 1070,1075 ****
--- 1083,1089 ----
    '((tramp-password-prompt-regexp tramp-action-password)
      (tramp-login-prompt-regexp tramp-action-login)
      (shell-prompt-pattern tramp-action-succeed)
+     (tramp-shell-prompt-pattern tramp-action-succeed)
      (tramp-wrong-passwd-regexp tramp-action-permission-denied)
      (tramp-yesno-prompt-regexp tramp-action-yesno)
      (tramp-yn-prompt-regexp tramp-action-yn))
***************
*** 1091,1096 ****
--- 1105,1111 ----
    '((tramp-password-prompt-regexp tramp-multi-action-password)
      (tramp-login-prompt-regexp tramp-multi-action-login)
      (shell-prompt-pattern tramp-multi-action-succeed)
+     (tramp-shell-prompt-pattern tramp-multi-action-succeed)
      (tramp-wrong-passwd-regexp tramp-multi-action-permission-denied))
    "List of pattern/action pairs.
  This list is used for each hop in multi-hop connections.
***************
*** 3468,3474 ****
  Here, we are looking for a command which has zero exit status if the
  file exists and nonzero exit status otherwise."
    (make-local-variable 'tramp-file-exists-command)
!   (tramp-message 10 "Finding command to check if file exists")
    (let ((existing
           (tramp-make-tramp-file-name
            multi-method method user host
--- 3483,3489 ----
  Here, we are looking for a command which has zero exit status if the
  file exists and nonzero exit status otherwise."
    (make-local-variable 'tramp-file-exists-command)
!   (tramp-message 9 "Finding command to check if file exists")
    (let ((existing
           (tramp-make-tramp-file-name
            multi-method method user host
***************
*** 3540,3550 ****
         (concat "PS1='$ ' exec " shell)) ;
        (unless (tramp-wait-for-regexp
                 (get-buffer-process (current-buffer))
!                60 (format "\\(\\$ *\\|\\(%s\\)\\)\\'" shell-prompt-pattern))
          (pop-to-buffer (buffer-name))
          (error "Couldn't find remote `%s' prompt." shell))
        (tramp-message
!        10 "Setting remote shell prompt...")
        (process-send-string nil (format "PS1='%s%s%s'; PS2=''; PS3=''%s"
                                         tramp-rsh-end-of-line
                                         tramp-end-of-output
--- 3555,3566 ----
         (concat "PS1='$ ' exec " shell)) ;
        (unless (tramp-wait-for-regexp
                 (get-buffer-process (current-buffer))
!                60 (format "\\(\\(%s\\)\\|\\(%s\\)\\)\\'"
!                         tramp-shell-prompt-pattern shell-prompt-pattern))
          (pop-to-buffer (buffer-name))
          (error "Couldn't find remote `%s' prompt." shell))
        (tramp-message
!        9 "Setting remote shell prompt...")
        (process-send-string nil (format "PS1='%s%s%s'; PS2=''; PS3=''%s"
                                         tramp-rsh-end-of-line
                                         tramp-end-of-output
***************
*** 3552,3558 ****
                                         tramp-rsh-end-of-line))
        (tramp-wait-for-output)
        (tramp-message
!        10 "Setting remote shell prompt...done")
  ;;       (tramp-send-command multi-method method user host "echo hello")
  ;;       (tramp-message 5 "Waiting for remote `%s' to start up..." shell)
  ;;       (unless (tramp-wait-for-output 5)
--- 3568,3574 ----
                                         tramp-rsh-end-of-line))
        (tramp-wait-for-output)
        (tramp-message
!        9 "Setting remote shell prompt...done")
  ;;       (tramp-send-command multi-method method user host "echo hello")
  ;;       (tramp-message 5 "Waiting for remote `%s' to start up..." shell)
  ;;       (unless (tramp-wait-for-output 5)
***************
*** 3715,3721 ****
          (setq item (pop todo))
          (setq pattern (symbol-value (nth 0 item)))
          (setq action (nth 1 item))
!         (tramp-message 10 "Looking for pattern %s" pattern)
          (when (re-search-forward (concat pattern "\\'") nil t)
            (setq found (funcall action p multi-method method user host)))))
        found)))
--- 3731,3738 ----
          (setq item (pop todo))
          (setq pattern (symbol-value (nth 0 item)))
          (setq action (nth 1 item))
!         (tramp-message 10 "Looking for regexp \"%s\" from remote shell"
!                        pattern)
          (when (re-search-forward (concat pattern "\\'") nil t)
            (setq found (funcall action p multi-method method user host)))))
        found)))
***************
*** 3724,3730 ****
    "Perform actions until success."
    (let (exit)
      (while (not exit)
!       (tramp-message 10 "Processing actions")
        (setq exit
            (catch 'tramp-action
              (tramp-process-one-action
--- 3741,3747 ----
    "Perform actions until success."
    (let (exit)
      (while (not exit)
!       (tramp-message 9 "Waiting for prompts from remote shell")
        (setq exit
            (catch 'tramp-action
              (tramp-process-one-action
***************
*** 3750,3756 ****
          (setq item (pop todo))
          (setq pattern (symbol-value (nth 0 item)))
          (setq action (nth 1 item))
!         (tramp-message 10 "Looking for pattern %s" pattern)
          (when (re-search-forward (concat pattern "\\'") nil t)
            (setq found (funcall action p method user host)))))
        found)))
--- 3767,3774 ----
          (setq item (pop todo))
          (setq pattern (symbol-value (nth 0 item)))
          (setq action (nth 1 item))
!         (tramp-message 10 "Looking for regexp \"%s\" from remote shell"
!                        pattern)
          (when (re-search-forward (concat pattern "\\'") nil t)
            (setq found (funcall action p method user host)))))
        found)))
***************
*** 3759,3764 ****
--- 3777,3783 ----
    "Perform actions until success."
    (let (exit)
      (while (not exit)
+       (tramp-message 9 "Waiting for prompts from remote shell")
        (setq exit
            (catch 'tramp-action
              (tramp-process-one-multi-action p method user host actions)
***************
*** 3777,3784 ****
  
  If USER is nil, uses value returned by `(user-login-name)' instead.
  
! Recognition of the remote shell prompt is based on the variable
! `shell-prompt-pattern' which must be set up correctly.
  
  Please note that it is NOT possible to use this connection method
  together with an out-of-band transfer method!  You must use an inline
--- 3796,3804 ----
  
  If USER is nil, uses value returned by `(user-login-name)' instead.
  
! Recognition of the remote shell prompt is based on the variables
! `shell-prompt-pattern' and `tramp-shell-prompt-pattern' which must be
! set up correctly.
  
  Please note that it is NOT possible to use this connection method
  together with an out-of-band transfer method!  You must use an inline
***************
*** 3840,3848 ****
  ;;         (tramp-message 9 "Waiting 30s for remote shell to come up...")
  ;;         (unless (setq found
  ;;                       (tramp-wait-for-regexp
! ;;                        p 30 (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                     tramp-wrong-passwd-regexp
! ;;                                     shell-prompt-pattern)))
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
  ;;           (error "Couldn't find remote shell prompt"))
--- 3860,3869 ----
  ;;         (tramp-message 9 "Waiting 30s for remote shell to come up...")
  ;;         (unless (setq found
  ;;                       (tramp-wait-for-regexp
! ;;                        p 30 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                     tramp-wrong-passwd-regexp
! ;;                                     shell-prompt-pattern
! ;;                                     tramp-shell-prompt-pattern)))
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
  ;;           (error "Couldn't find remote shell prompt"))
***************
*** 3865,3872 ****
  
  If USER is nil, start the command `rsh HOST'[*] instead
  
! Recognition of the remote shell prompt is based on the variable
! `shell-prompt-pattern' which must be set up correctly.
  
  Please note that it is NOT possible to use this connection method with
  an out-of-band transfer method if this function asks the user for a
--- 3886,3894 ----
  
  If USER is nil, start the command `rsh HOST'[*] instead
  
! Recognition of the remote shell prompt is based on the variables
! `shell-prompt-pattern' and `tramp-shell-prompt-pattern' which must be
! set up correctly.
  
  Please note that it is NOT possible to use this connection method with
  an out-of-band transfer method if this function asks the user for a
***************
*** 3920,3928 ****
  ;;               (tramp-wait-for-regexp
  ;;                p 60
  ;;                (format
! ;;                 "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                 tramp-password-prompt-regexp
! ;;                 shell-prompt-pattern)))
  ;;         (unless found
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
--- 3942,3950 ----
  ;;               (tramp-wait-for-regexp
  ;;                p 60
  ;;                (format
! ;;                 "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                 tramp-password-prompt-regexp
! ;;                 shell-prompt-pattern tramp-shell-prompt-pattern)))
  ;;         (unless found
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
***************
*** 3938,3947 ****
  ;;           (tramp-message 9 "Sending password...")
  ;;           (tramp-enter-password p (nth 1 found))
  ;;           (tramp-message 9 "Sent password, waiting 60s for remote shell 
prompt")
! ;;           (setq found (tramp-wait-for-regexp p 60
! ;;                                              (format 
"\\(%s\\)\\|\\(%s\\)\\'"
! ;;                                                      
tramp-wrong-passwd-regexp
! ;;                                                      
shell-prompt-pattern))))
  ;;         (unless found
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
--- 3960,3971 ----
  ;;           (tramp-message 9 "Sending password...")
  ;;           (tramp-enter-password p (nth 1 found))
  ;;           (tramp-message 9 "Sent password, waiting 60s for remote shell 
prompt")
! ;;           (setq found (tramp-wait-for-regexp
! ;;                        p 60
! ;;                        (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
! ;;                                tramp-wrong-passwd-regexp
! ;;                                shell-prompt-pattern
! ;;                                tramp-shell-prompt-pattern))))
  ;;         (unless found
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
***************
*** 3963,3972 ****
  
  If USER is nil, uses value returned by user-login-name instead.
  
! Recognition of the remote shell prompt is based on the variable
! `shell-prompt-pattern' which must be set up correctly.  Note that the
! other user may have a different shell prompt than you do, so it is not
! at all unlikely that this variable is set up wrongly!"
    (save-match-data
      (when (tramp-method-out-of-band-p multi-method method)
        (error "Cannot use out-of-band method `%s' with `su' connection method"
--- 3987,3997 ----
  
  If USER is nil, uses value returned by user-login-name instead.
  
! Recognition of the remote shell prompt is based on the variables
! `shell-prompt-pattern' and `tramp-shell-prompt-pattern' which must be
! set up correctly.  Note that the other user may have a different shell
! prompt than you do, so it is not at all unlikely that the variable
! `shell-prompt-pattern' is set up wrongly!"
    (save-match-data
      (when (tramp-method-out-of-band-p multi-method method)
        (error "Cannot use out-of-band method `%s' with `su' connection method"
***************
*** 4006,4014 ****
  ;;         (tramp-message 9 "Waiting 30s for shell or password prompt...")
  ;;         (unless (setq found (tramp-wait-for-regexp
  ;;                              p 30
! ;;                              (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                      tramp-password-prompt-regexp
! ;;                                      shell-prompt-pattern)))
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
  ;;           (error "Couldn't find shell or password prompt"))
--- 4031,4040 ----
  ;;         (tramp-message 9 "Waiting 30s for shell or password prompt...")
  ;;         (unless (setq found (tramp-wait-for-regexp
  ;;                              p 30
! ;;                              (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                      tramp-password-prompt-regexp
! ;;                                      shell-prompt-pattern
! ;;                                      tramp-shell-prompt-pattern)))
  ;;           (pop-to-buffer (buffer-name))
  ;;           (kill-process p)
  ;;           (error "Couldn't find shell or password prompt"))
***************
*** 4020,4028 ****
  ;;           (tramp-message 9 "Waiting 30s for remote shell to come up...")
  ;;           (unless (setq found
  ;;                         (tramp-wait-for-regexp
! ;;                          p 30 (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                       tramp-wrong-passwd-regexp
! ;;                                       shell-prompt-pattern)))
  ;;             (pop-to-buffer (buffer-name))
  ;;             (kill-process p)
  ;;             (error "Couldn't find remote shell prompt"))
--- 4046,4055 ----
  ;;           (tramp-message 9 "Waiting 30s for remote shell to come up...")
  ;;           (unless (setq found
  ;;                         (tramp-wait-for-regexp
! ;;                          p 30 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                       tramp-wrong-passwd-regexp
! ;;                                       shell-prompt-pattern
! ;;                                       tramp-shell-prompt-pattern)))
  ;;             (pop-to-buffer (buffer-name))
  ;;             (kill-process p)
  ;;             (error "Couldn't find remote shell prompt"))
***************
*** 4080,4086 ****
          (process-kill-without-query p)
          (tramp-message 9 "Waiting 60s for local shell to come up...")
          (unless (tramp-wait-for-regexp
!                p 60 (format "%s\\'" shell-prompt-pattern))
            (pop-to-buffer (buffer-name))
            (kill-process p)
            (error "Couldn't find local shell prompt"))
--- 4107,4114 ----
          (process-kill-without-query p)
          (tramp-message 9 "Waiting 60s for local shell to come up...")
          (unless (tramp-wait-for-regexp
!                p 60 (format "\\(%s\\)\\'\\|\\(%s\\)\\'"
!                             shell-prompt-pattern tramp-shell-prompt-pattern))
            (pop-to-buffer (buffer-name))
            (kill-process p)
            (error "Couldn't find local shell prompt"))
***************
*** 4144,4152 ****
  ;;     (process-send-string p (concat pw tramp-rsh-end-of-line))
  ;;     (tramp-message 9 "Waiting 60s for remote shell to come up...")
  ;;     (unless (setq found (tramp-wait-for-regexp
! ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                       tramp-wrong-passwd-regexp
! ;;                                       shell-prompt-pattern)))
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
  ;;       (error "Couldn't find shell prompt from host %s" host))
--- 4172,4181 ----
  ;;     (process-send-string p (concat pw tramp-rsh-end-of-line))
  ;;     (tramp-message 9 "Waiting 60s for remote shell to come up...")
  ;;     (unless (setq found (tramp-wait-for-regexp
! ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                       tramp-wrong-passwd-regexp
! ;;                                       shell-prompt-pattern
! ;;                                       tramp-shell-prompt-pattern)))
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
  ;;       (error "Couldn't find shell prompt from host %s" host))
***************
*** 4184,4192 ****
  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)
  ;;     (unless (setq found
  ;;                   (tramp-wait-for-regexp p 60
! ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                                tramp-password-prompt-regexp
! ;;                                                shell-prompt-pattern)))
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
  ;;       (error "Couldn't find remote shell or passwd prompt"))
--- 4213,4222 ----
  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)
  ;;     (unless (setq found
  ;;                   (tramp-wait-for-regexp p 60
! ;;                                        (format 
"\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                                tramp-password-prompt-regexp
! ;;                                                shell-prompt-pattern
! ;;                                                
tramp-shell-prompt-pattern)))
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
  ;;       (error "Couldn't find remote shell or passwd prompt"))
***************
*** 4196,4204 ****
  ;;       (tramp-enter-password p (nth 1 found))
  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell 
prompt")
  ;;       (setq found (tramp-wait-for-regexp p 60
! ;;                                          (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                                  tramp-wrong-passwd-regexp
! ;;                                                  shell-prompt-pattern))))
  ;;     (unless found
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
--- 4226,4235 ----
  ;;       (tramp-enter-password p (nth 1 found))
  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell 
prompt")
  ;;       (setq found (tramp-wait-for-regexp p 60
! ;;                                          (format 
"\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                                  tramp-wrong-passwd-regexp
! ;;                                                  shell-prompt-pattern
! ;;                                                  
tramp-shell-prompt-pattern))))
  ;;     (unless found
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
***************
*** 4237,4245 ****
                                 tramp-multi-actions)
  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt for %s" (or 
user (user-login-name)))
  ;;     (unless (setq found (tramp-wait-for-regexp
! ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                       tramp-password-prompt-regexp
! ;;                                       shell-prompt-pattern)))
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
  ;;       (error "Couldn't find shell or passwd prompt for %s" 
--- 4268,4277 ----
                                 tramp-multi-actions)
  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt for %s" (or 
user (user-login-name)))
  ;;     (unless (setq found (tramp-wait-for-regexp
! ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                       tramp-password-prompt-regexp
! ;;                                       shell-prompt-pattern
! ;;                                       tramp-shell-prompt-pattern)))
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
  ;;       (error "Couldn't find shell or passwd prompt for %s" 
***************
*** 4250,4258 ****
  ;;       (erase-buffer)
  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell 
prompt")
  ;;       (setq found (tramp-wait-for-regexp p 60
! ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                                tramp-wrong-passwd-regexp
! ;;                                                shell-prompt-pattern))))
  ;;     (unless found
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
--- 4282,4291 ----
  ;;       (erase-buffer)
  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell 
prompt")
  ;;       (setq found (tramp-wait-for-regexp p 60
! ;;                                        (format 
"\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
  ;;                                                tramp-wrong-passwd-regexp
! ;;                                                shell-prompt-pattern
! ;;                                                
tramp-shell-prompt-pattern))))
  ;;     (unless found
  ;;       (pop-to-buffer (buffer-name))
  ;;       (kill-process p)
***************
*** 4350,4356 ****
    (tramp-message 9 "Waiting 30s for remote `%s' to come up..."
                 (tramp-get-remote-sh multi-method method))
    (unless (tramp-wait-for-regexp
!          p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Remote `%s' didn't come up.  See buffer `%s' for details"
             (tramp-get-remote-sh multi-method method) (buffer-name)))
--- 4383,4390 ----
    (tramp-message 9 "Waiting 30s for remote `%s' to come up..."
                 (tramp-get-remote-sh multi-method method))
    (unless (tramp-wait-for-regexp
!          p 30 (format "\\(%s\\|%s\\)\\'"
!                       shell-prompt-pattern tramp-shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Remote `%s' didn't come up.  See buffer `%s' for details"
             (tramp-get-remote-sh multi-method method) (buffer-name)))
***************
*** 4359,4372 ****
    (process-send-string
     nil (format "stty -inlcr -echo kill '^U'%s" tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!          p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `stty -echo', see buffer `%s'" (buffer-name)))
    (erase-buffer)
    (process-send-string nil (format "TERM=dumb; export TERM%s"
                                     tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!          p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `TERM=dumb; export TERM', see buffer `%s'" 
(buffer-name)))
    ;; Try to set up the coding system correctly.
--- 4393,4408 ----
    (process-send-string
     nil (format "stty -inlcr -echo kill '^U'%s" tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!          p 30 (format "\\(%s\\|%s\\)\\'"
!                       shell-prompt-pattern tramp-shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `stty -echo', see buffer `%s'" (buffer-name)))
    (erase-buffer)
    (process-send-string nil (format "TERM=dumb; export TERM%s"
                                     tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!          p 30 (format "\\(%s\\|%s\\)\\'"
!                       shell-prompt-pattern tramp-shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `TERM=dumb; export TERM', see buffer `%s'" 
(buffer-name)))
    ;; Try to set up the coding system correctly.
***************
*** 4377,4383 ****
      (process-send-string nil (format "echo foo ; echo bar %s"
                                       tramp-rsh-end-of-line))
      (unless (tramp-wait-for-regexp
!              p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
        (pop-to-buffer (buffer-name))
        (error "Couldn't `echo foo; echo bar' to determine line endings'"))
      (goto-char (point-min))
--- 4413,4420 ----
      (process-send-string nil (format "echo foo ; echo bar %s"
                                       tramp-rsh-end-of-line))
      (unless (tramp-wait-for-regexp
!              p 30 (format "\\(%s\\|%s\\)\\'"
!                         shell-prompt-pattern tramp-shell-prompt-pattern))
        (pop-to-buffer (buffer-name))
        (error "Couldn't `echo foo; echo bar' to determine line endings'"))
      (goto-char (point-min))
***************
*** 4405,4411 ****
          (tramp-message 9 "Trying `stty -onlcr'")
          (process-send-string nil (format "stty -onlcr%s" 
tramp-rsh-end-of-line))
          (unless (tramp-wait-for-regexp
!                  p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
            (pop-to-buffer (buffer-name))
            (error "Couldn't `stty -onlcr', see buffer `%s'" (buffer-name))))))
    (erase-buffer)
--- 4442,4449 ----
          (tramp-message 9 "Trying `stty -onlcr'")
          (process-send-string nil (format "stty -onlcr%s" 
tramp-rsh-end-of-line))
          (unless (tramp-wait-for-regexp
!                  p 30 (format "\\(%s\\|%s\\)\\'"
!                             shell-prompt-pattern tramp-shell-prompt-pattern))
            (pop-to-buffer (buffer-name))
            (error "Couldn't `stty -onlcr', see buffer `%s'" (buffer-name))))))
    (erase-buffer)
***************
*** 4415,4421 ****
     nil (format "HISTFILE=$HOME/.tramp_history; HISTSIZE=1%s"
                 tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error (concat "Couldn't `HISTFILE=$HOME/.tramp_history; "
                     "HISTSIZE=1', see buffer `%s'")
--- 4453,4460 ----
     nil (format "HISTFILE=$HOME/.tramp_history; HISTSIZE=1%s"
                 tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(%s\\|%s\\)\\'"
!                       shell-prompt-pattern tramp-shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error (concat "Couldn't `HISTFILE=$HOME/.tramp_history; "
                     "HISTSIZE=1', see buffer `%s'")
***************
*** 4426,4432 ****
     nil (format "set +o vi +o emacs%s"      ;mustn't `>/dev/null' with AIX?
                 tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `set +o vi +o emacs', see buffer `%s'"
             (buffer-name)))
--- 4465,4472 ----
     nil (format "set +o vi +o emacs%s"      ;mustn't `>/dev/null' with AIX?
                 tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(%s\\|%s\\)\\'"
!                       shell-prompt-pattern tramp-shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `set +o vi +o emacs', see buffer `%s'"
             (buffer-name)))
***************
*** 4436,4442 ****
     nil (format "unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null%s"
                 tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `unset MAIL MAILCHECK MAILPATH', see buffer `%s'"
             (buffer-name)))
--- 4476,4483 ----
     nil (format "unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null%s"
                 tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(%s\\|%s\\)\\'"
!                       shell-prompt-pattern tramp-shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `unset MAIL MAILCHECK MAILPATH', see buffer `%s'"
             (buffer-name)))
***************
*** 4445,4451 ****
    (process-send-string
     nil (format "unset CDPATH%s" tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `unset CDPATH', see buffer `%s'"
             (buffer-name)))
--- 4486,4493 ----
    (process-send-string
     nil (format "unset CDPATH%s" tramp-rsh-end-of-line))
    (unless (tramp-wait-for-regexp
!            p 30 (format "\\(%s\\|%s\\)\\'"
!                       shell-prompt-pattern tramp-shell-prompt-pattern))
      (pop-to-buffer (buffer-name))
      (error "Couldn't `unset CDPATH', see buffer `%s'"
             (buffer-name)))
***************
*** 4699,4712 ****
          ;; remotely with null input and output.  This makes sure there
          ;; are no syntax errors and the command is really found.
          (tramp-message-for-buffer
!          multi-method method user host 10
           "Checking remote encoding command `%s' for sanity" ec)
          (unless (zerop (tramp-send-command-and-check
                          multi-method method user host
                          (format "%s </dev/null >/dev/null" ec) t))
            (throw 'wont-work nil))
          (tramp-message-for-buffer
!          multi-method method user host 10
           "Checking remote decoding command `%s' for sanity" dc)
          (unless (zerop (tramp-send-command-and-check
                          multi-method method user host
--- 4741,4754 ----
          ;; remotely with null input and output.  This makes sure there
          ;; are no syntax errors and the command is really found.
          (tramp-message-for-buffer
!          multi-method method user host 9
           "Checking remote encoding command `%s' for sanity" ec)
          (unless (zerop (tramp-send-command-and-check
                          multi-method method user host
                          (format "%s </dev/null >/dev/null" ec) t))
            (throw 'wont-work nil))
          (tramp-message-for-buffer
!          multi-method method user host 9
           "Checking remote decoding command `%s' for sanity" dc)
          (unless (zerop (tramp-send-command-and-check
                          multi-method method user host
***************
*** 4717,4723 ****
          ;; locally.
          (when (not (fboundp ef))
            (tramp-message-for-buffer
!            multi-method method user host 10
             "Checking local encoding command `%s' for sanity" ec)
            (unless (zerop (call-process
                            tramp-sh-program ;program
--- 4759,4765 ----
          ;; locally.
          (when (not (fboundp ef))
            (tramp-message-for-buffer
!            multi-method method user host 9
             "Checking local encoding command `%s' for sanity" ec)
            (unless (zerop (call-process
                            tramp-sh-program ;program
***************
*** 4729,4735 ****
              (throw 'wont-work nil)))
          (when (not (fboundp df))
            (tramp-message-for-buffer
!            multi-method method user host 10
             "Checking local decoding command `%s' for sanity" dc)
            (unless (zerop (call-process
                            tramp-sh-program ;program
--- 4771,4777 ----
              (throw 'wont-work nil)))
          (when (not (fboundp df))
            (tramp-message-for-buffer
!            multi-method method user host 9
             "Checking local decoding command `%s' for sanity" dc)
            (unless (zerop (call-process
                            tramp-sh-program ;program
***************
*** 5711,5716 ****
--- 5753,5759 ----
         tramp-actions-before-shell
         tramp-multi-actions
         tramp-terminal-type
+        tramp-shell-prompt-pattern
  
         ;; Non-tramp variables of interest
         shell-prompt-pattern




reply via email to

[Prev in Thread] Current Thread [Next in Thread]