aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-11-17 18:23:03 +0000
committerDave Love2000-11-17 18:23:03 +0000
commit2eebe218ba7557e4f8473dc58f2826b41758782a (patch)
tree9550ce0033c570a03f66aecccd04ed18ae454fa9
parentc129b5ef1ea021b3a28d67e2c763833fc5e4087d (diff)
downloademacs-2eebe218ba7557e4f8473dc58f2826b41758782a.tar.gz
emacs-2eebe218ba7557e4f8473dc58f2826b41758782a.zip
2000-11-17 Katsumi Yamaoka <yamaoka@jpl.org>
* nntp.el (nntp-open-telnet): Wait for the telnet prompt before sending a command; allow the rtelnet prompt as well. 2000-11-17 Simon Josefsson <simon@josefsson.org> * nntp.el (nntp-async-trigger): Fix authinfo in asynchronous prefetch. 2000-11-17 ShengHuo ZHU <zsh@cs.rochester.edu> * nntp.el (nntp-decode-text): Delete bogus status lines. (nntp-open-connection): Kill process buffer when quit. (nntp-connection-timeout): Add a note. SIGALRM is ignored in both FSF Emacs 20 and XEmacs 21. (nntp-retrieve-data): Don't ignore quit.
-rw-r--r--lisp/gnus/ChangeLog18
-rw-r--r--lisp/gnus/nntp.el28
2 files changed, 38 insertions, 8 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index fbac3dc8f75..33893a8c363 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,21 @@
12000-11-17 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * nntp.el (nntp-open-telnet): Wait for the telnet prompt before
4 sending a command; allow the rtelnet prompt as well.
5
62000-11-17 Simon Josefsson <simon@josefsson.org>
7
8 * nntp.el (nntp-async-trigger): Fix authinfo in asynchronous
9 prefetch.
10
112000-11-17 ShengHuo ZHU <zsh@cs.rochester.edu>
12
13 * nntp.el (nntp-decode-text): Delete bogus status lines.
14 (nntp-open-connection): Kill process buffer when quit.
15 (nntp-connection-timeout): Add a note. SIGALRM is ignored in both
16 FSF Emacs 20 and XEmacs 21.
17 (nntp-retrieve-data): Don't ignore quit.
18
12000-11-17 Dave Love <fx@gnu.org> 192000-11-17 Dave Love <fx@gnu.org>
2 20
3 * uudecode.el (uudecode-insert-char): Fix bogus feature test. 21 * uudecode.el (uudecode-insert-char): Fix bogus feature test.
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 5ced1d77d82..52322137052 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -180,7 +180,8 @@ server there that you can connect to. See also
180 180
181(defvoo nntp-connection-timeout nil 181(defvoo nntp-connection-timeout nil
182 "*Number of seconds to wait before an nntp connection times out. 182 "*Number of seconds to wait before an nntp connection times out.
183If this variable is nil, which is the default, no timers are set.") 183If this variable is nil, which is the default, no timers are set.
184NOTE: This variable is never seen to work in Emacs 20 and XEmacs 21.")
184 185
185;;; Internal variables. 186;;; Internal variables.
186 187
@@ -352,7 +353,10 @@ noticing asynchronous data.")
352 (error 353 (error
353 (nnheader-report 'nntp "Couldn't open connection to %s: %s" 354 (nnheader-report 'nntp "Couldn't open connection to %s: %s"
354 address err)) 355 address err))
355 (quit nil))))) 356 (quit
357 (message "Quit retrieving data from nntp")
358 (signal 'quit nil)
359 nil)))))
356 360
357(defsubst nntp-send-command (wait-for &rest strings) 361(defsubst nntp-send-command (wait-for &rest strings)
358 "Send STRINGS to server and wait until WAIT-FOR returns." 362 "Send STRINGS to server and wait until WAIT-FOR returns."
@@ -800,8 +804,9 @@ If SEND-IF-FORCE, only send authinfo to the server if the
800 (or passwd 804 (or passwd
801 nntp-authinfo-password 805 nntp-authinfo-password
802 (setq nntp-authinfo-password 806 (setq nntp-authinfo-password
803 (mail-source-read-passwd (format "NNTP (%s@%s) password: " 807 (mail-source-read-passwd
804 user nntp-address)))))))))) 808 (format "NNTP (%s@%s) password: "
809 user nntp-address))))))))))
805 810
806(defun nntp-send-nosy-authinfo () 811(defun nntp-send-nosy-authinfo ()
807 "Send the AUTHINFO to the nntp server." 812 "Send the AUTHINFO to the nntp server."
@@ -873,7 +878,11 @@ password contained in '~/.nntp-authinfo'."
873 (coding-system-for-write nntp-coding-system-for-write)) 878 (coding-system-for-write nntp-coding-system-for-write))
874 (funcall nntp-open-connection-function pbuffer)) 879 (funcall nntp-open-connection-function pbuffer))
875 (error nil) 880 (error nil)
876 (quit nil)))) 881 (quit
882 (message "Quit opening connection")
883 (nntp-kill-buffer pbuffer)
884 (signal 'quit nil)
885 nil))))
877 (when timer 886 (when timer
878 (nnheader-cancel-timer timer)) 887 (nnheader-cancel-timer timer))
879 (when (and (buffer-name pbuffer) 888 (when (and (buffer-name pbuffer)
@@ -982,7 +991,7 @@ password contained in '~/.nntp-authinfo'."
982 (if (memq (following-char) '(?4 ?5)) 991 (if (memq (following-char) '(?4 ?5))
983 ;; wants credentials? 992 ;; wants credentials?
984 (if (looking-at "480") 993 (if (looking-at "480")
985 (nntp-handle-authinfo nntp-process-to-buffer) 994 (nntp-handle-authinfo process)
986 ;; report error message. 995 ;; report error message.
987 (nntp-snarf-error-message) 996 (nntp-snarf-error-message)
988 (nntp-do-callback nil)) 997 (nntp-do-callback nil))
@@ -1073,7 +1082,9 @@ password contained in '~/.nntp-authinfo'."
1073 (delete-char 2)) 1082 (delete-char 2))
1074 ;; Delete status line. 1083 ;; Delete status line.
1075 (goto-char (point-min)) 1084 (goto-char (point-min))
1076 (delete-region (point) (progn (forward-line 1) (point))) 1085 (while (looking-at "[1-5][0-9][0-9] .*\n")
1086 ;; For some unknown reason, there is more than one status line.
1087 (delete-region (point) (progn (forward-line 1) (point))))
1077 ;; Remove "." -> ".." encoding. 1088 ;; Remove "." -> ".." encoding.
1078 (while (search-forward "\n.." nil t) 1089 (while (search-forward "\n.." nil t)
1079 (delete-char -1)))) 1090 (delete-char -1))))
@@ -1272,6 +1283,7 @@ password contained in '~/.nntp-authinfo'."
1272 "nntpd" buffer nntp-telnet-command nntp-telnet-switches)) 1283 "nntpd" buffer nntp-telnet-command nntp-telnet-switches))
1273 (case-fold-search t)) 1284 (case-fold-search t))
1274 (when (memq (process-status proc) '(open run)) 1285 (when (memq (process-status proc) '(open run))
1286 (nntp-wait-for-string "^r?telnet")
1275 (process-send-string proc "set escape \^X\n") 1287 (process-send-string proc "set escape \^X\n")
1276 (cond 1288 (cond
1277 ((and nntp-open-telnet-envuser nntp-telnet-user-name) 1289 ((and nntp-open-telnet-envuser nntp-telnet-user-name)
@@ -1301,7 +1313,7 @@ password contained in '~/.nntp-authinfo'."
1301 (beginning-of-line) 1313 (beginning-of-line)
1302 (delete-region (point-min) (point)) 1314 (delete-region (point-min) (point))
1303 (process-send-string proc "\^]") 1315 (process-send-string proc "\^]")
1304 (nntp-wait-for-string "^telnet") 1316 (nntp-wait-for-string "^r?telnet")
1305 (process-send-string proc "mode character\n") 1317 (process-send-string proc "mode character\n")
1306 (accept-process-output proc 1) 1318 (accept-process-output proc 1)
1307 (sit-for 1) 1319 (sit-for 1)