unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCKH] Suggestion for tramp
@ 2004-04-21 23:50 Kim F. Storm
  0 siblings, 0 replies; only message in thread
From: Kim F. Storm @ 2004-04-21 23:50 UTC (permalink / raw)



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 <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-21 23:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-21 23:50 [PATCKH] Suggestion for tramp Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).