(const :format "" "password")
(string :format "Password: %v")))))))
+(make-obsolete 'nntp-authinfo-file nil "Emacs 24.1")
+
\f
(defvoo nntp-connection-timeout nil
"Record the command STRING."
(with-current-buffer (get-buffer-create "*nntp-log*")
(goto-char (point-max))
- (let ((time (current-time)))
- (insert (format-time-string "%Y%m%dT%H%M%S" time)
- "." (format "%03d" (/ (nth 2 time) 1000))
- " " nntp-address " " string "\n"))))
+ (insert (format-time-string "%Y%m%dT%H%M%S.%3N")
+ " " nntp-address " " string "\n")))
(defun nntp-report (&rest args)
"Report an error from the nntp backend. The first string in ARGS
(defun nntp-kill-buffer (buffer)
(when (buffer-name buffer)
+ (let ((process (get-buffer-process buffer)))
+ (when process
+ (delete-process process)))
(kill-buffer buffer)
(nnheader-init-server-buffer)))
(process-buffer -process))))
;; When I an able to identify the
;; connection to the server AND I've
- ;; received NO reponse for
+ ;; received NO response for
;; nntp-connection-timeout seconds.
(when (and -buffer (eq 0 (buffer-size -buffer)))
;; Close the connection. Take no
(require 'netrc)
(let* ((list (netrc-parse nntp-authinfo-file))
(alist (netrc-machine list nntp-address "nntp"))
- (force (or (netrc-get alist "force") nntp-authinfo-force))
(auth-info
(nth 0 (auth-source-search :max 1
;; TODO: allow the virtual server name too
:host nntp-address
:port '("119" "nntp"))))
(auth-user (plist-get auth-info :user))
+ (auth-force (plist-get auth-info :force))
(auth-passwd (plist-get auth-info :secret))
(auth-passwd (if (functionp auth-passwd)
(funcall auth-passwd)
auth-passwd))
+ (force (or (netrc-get alist "force")
+ nntp-authinfo-force
+ auth-force))
(user (or
;; this is preferred to netrc-*
auth-user
;; for the first available article. Obviously, a client can
;; use that entry to avoid making unnecessary requests. The
;; only problem is for a client that assumes that the response
- ;; will always be within the requested ranage. For such a
+ ;; will always be within the requested range. For such a
;; client, we can get N copies of the same entry (one for each
;; XOVER command sent to the server).