bug-gnu-emacs
[Top][All Lists]
Advanced

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

[patch] 20.6 telnet.el generalizations (w32 Cygwin, multilingual)


From: Jari Aalto+mail.emacs
Subject: [patch] 20.6 telnet.el generalizations (w32 Cygwin, multilingual)
Date: 03 Jan 2001 23:11:40 +0200
User-agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.6 (i386-*-windows98.1998)

Index: changeLog
===================================================================
RCS file: 
/cygdrive/K/data/version-control/cvsroot/emacs/gnu-emacs/lisp/changeLog,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.10.1
diff -u -IId: -b -w -c -r1.1.1.1 -r1.1.1.1.10.1
*** changeLog   2000/12/10 19:53:54     1.1.1.1
--- changeLog   2001/01/03 11:30:08     1.1.1.1.10.1
***************
*** 1,3 ****
--- 1,23 ----
+ 2001-01-03 Wed  Jari Aalto  <jari.aalto@poboxes.com>
+
+       * telnet.el
+       (telnet-login-wait-timeout): New. user configurable.
+       (telnet-regexp-host-type-unix): New.
+       User configurable.
+       Regexp to detect Unix type host at telnet welcome message.
+       'unix\\|SunOS\\|HP-UX'. The old value used in code was 'unix'.
+       (telnet-regexp-login-no-host): New. User configurable.
+       (telnet-regexp-login-passwd): New.
+       User configurable. Default value 'passwd\\|kennwort' (german)
+       (telnet-check-software-type-initialize): Use
+       `telnet-regexp-host-type-unix'
+       (telnet-initial-filter): Use `telnet-regexp-login-no-host'
+       and `telnet-regexp-login-passwd'
+       (telnet): Added timeout `telnet-login-wait-timeout'
+       to `accept-process-output'.
+       This will fix the so called invisible prompt in
+       Win32 Cygwin V1.1 telnet and the function is able to continue.
+
  2000-02-26  Gerd Moellmann  <gerd@gnu.org>

        * Version 20.6 released.
Index: telnet.el
===================================================================
RCS file: 
/cygdrive/K/data/version-control/cvsroot/emacs/gnu-emacs/lisp/telnet.el,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.12.1
diff -u -IId: -b -w -c -r1.1.1.1 -r1.1.1.1.12.1
*** telnet.el   2000/12/10 19:54:00     1.1.1.1
--- telnet.el   2001/01/03 11:30:11     1.1.1.1.12.1
***************
*** 87,92 ****
--- 87,105 ----
  Should be set to the number of terminal writes telnet will make
  rejecting one login and prompting again for a username and password.")

+ (defvar telnet-login-wait-timeout 5000
+   "*Time to wait for telnet> prompt to appear.")
+
+ (defvar telnet-regexp-host-type-unix "unix\\|SunOS\\|HP-UX"
+   "*Regexp to detect Unix type host at telnet welcome message.")
+
+ (defvar telnet-regexp-login-no-host "No such host"
+   "*Regexp to detect invalid host.")
+
+ (defvar telnet-regexp-login-passwd "passwd\\|kennwort"
+   "*Regexp to detect password prompt.")
+
+
  (defun telnet-interrupt-subjob ()
    (interactive)
    "Interrupt the program running through telnet on the remote host."
***************
*** 118,124 ****
  (defun telnet-check-software-type-initialize (string)
    "Tries to put correct initializations in.  Needs work."
    (let ((case-fold-search t))
!     (cond ((string-match "unix" string)
         (setq telnet-prompt-pattern comint-prompt-regexp)
         (setq telnet-new-line "\n"))
        ((string-match "tops-20" string) ;;maybe add telnet-replace-c-g
--- 131,137 ----
  (defun telnet-check-software-type-initialize (string)
    "Tries to put correct initializations in.  Needs work."
    (let ((case-fold-search t))
!     (cond ((string-match telnet-regexp-host-type-unix string)
         (setq telnet-prompt-pattern comint-prompt-regexp)
         (setq telnet-new-line "\n"))
        ((string-match "tops-20" string) ;;maybe add telnet-replace-c-g
***************
*** 134,143 ****
    (save-current-buffer
      (set-buffer (process-buffer proc))
      (let ((case-fold-search t))
!       (cond ((string-match "No such host" string)
             (kill-buffer (process-buffer proc))
             (error "No such host"))
!           ((string-match "passw" string)
             (telnet-filter proc string)
             (setq telnet-count 0)
             (send-string proc (concat (comint-read-noecho "Password: " t)
--- 147,156 ----
    (save-current-buffer
      (set-buffer (process-buffer proc))
      (let ((case-fold-search t))
!       (cond ((string-match telnet-regexp-login-no-host string)
             (kill-buffer (process-buffer proc))
             (error "No such host"))
!           ((string-match telnet-regexp-login-passwd string)
             (telnet-filter proc string)
             (setq telnet-count 0)
             (send-string proc (concat (comint-read-noecho "Password: " t)
***************
*** 215,221 ****
        (setq process (get-buffer-process (current-buffer)))
        (set-process-filter process 'telnet-initial-filter)
        ;; Don't send the `open' cmd till telnet is ready for it.
!       (accept-process-output process)
        (erase-buffer)
        (send-string process (concat "open " host "\n"))
        (telnet-mode)
--- 228,236 ----
        (setq process (get-buffer-process (current-buffer)))
        (set-process-filter process 'telnet-initial-filter)
        ;; Don't send the `open' cmd till telnet is ready for it.
!       ;; Cygwin v1.1 doesn't show prompt inside Emacs, so the
!       ;; timeout takes care of it.
!       (accept-process-output process 'timeout telnet-login-wait-timeout)
        (erase-buffer)
        (send-string process (concat "open " host "\n"))
        (telnet-mode)



reply via email to

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