emacs-devel
[Top][All Lists]
Advanced

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

[PATCKH] Suggestion for tramp


From: Kim F. Storm
Subject: [PATCKH] Suggestion for tramp
Date: 22 Apr 2004 01:50:47 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

If something goes wrong with tramp, I think the 60s timeout
is way too long (I have fast machines and networks here).

What do you think about this patch:

Index: tramp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.42
diff -c -r1.42 tramp.el
*** tramp.el    29 Feb 2004 17:51:39 -0000      1.42
--- tramp.el    21 Apr 2004 21:49:05 -0000
***************
*** 624,629 ****
--- 624,634 ----
                       (regexp :tag "User regexp")
                       (string :tag "Method"))))
  
+ (defcustom tramp-action-timeout 60
+   "*Timeout in seconds for remote commands to complete."
+   :group 'tramp
+   :type 'integer)
+ 
  ;; Default values for non-Unices seeked
  (defconst tramp-completion-function-alist-rsh
    (unless (memq system-type '(windows-nt))
***************
*** 4847,4854 ****
    "Wait for output from the shell and perform one action."
    (let (found item pattern action todo)
      (erase-buffer)
!     (tramp-message 9 "Waiting 60s for prompt from remote shell")
!     (with-timeout (60 (throw 'tramp-action 'timeout))
        (while (not found)
        (accept-process-output p 1)
        (goto-char (point-min))
--- 4852,4860 ----
    "Wait for output from the shell and perform one action."
    (let (found item pattern action todo)
      (erase-buffer)
!     (tramp-message 9 "Waiting %ds for prompt from remote shell at \"%S\""
!                  tramp-action-timeout host)
!     (with-timeout (tramp-action-timeout (throw 'tramp-action 'timeout))
        (while (not found)
        (accept-process-output p 1)
        (goto-char (point-min))

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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