[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/pop3.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/pop3.el [emacs-unicode-2] |
Date: |
Fri, 22 Oct 2004 06:42:39 -0400 |
Index: emacs/lisp/gnus/pop3.el
diff -c emacs/lisp/gnus/pop3.el:1.21.2.3 emacs/lisp/gnus/pop3.el:1.21.2.4
*** emacs/lisp/gnus/pop3.el:1.21.2.3 Thu Oct 14 08:50:05 2004
--- emacs/lisp/gnus/pop3.el Fri Oct 22 10:13:32 2004
***************
*** 83,89 ****
:group 'pop3)
(defcustom pop3-leave-mail-on-server nil
! "*Non-nil if the mail is to be left on the POP server after fetching."
:version "21.4" ;; Oort Gnus
:type 'boolean
:group 'pop3)
--- 83,96 ----
:group 'pop3)
(defcustom pop3-leave-mail-on-server nil
! "*Non-nil if the mail is to be left on the POP server after fetching.
!
! If the `pop3-leave-mail-on-server' is non-`nil' the mail is to be
! left on the POP server after fetching. Note that POP servers
! maintain no state information between sessions, so what the
! client believes is there and what is actually there may not match
! up. If they do not, then the whole thing can fall apart and
! leave you with a corrupt mailbox."
:version "21.4" ;; Oort Gnus
:type 'boolean
:group 'pop3)
***************
*** 95,100 ****
--- 102,133 ----
(defvar pop3-read-point nil)
(defvar pop3-debug nil)
+ ;; Borrowed from nnheader-accept-process-output in nnheader.el.
+ (defvar pop3-read-timeout
+ (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
+ (symbol-name system-type))
+ ;; http://thread.gmane.org/address@hidden
+ ;;
+ ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS.
+ ;;
+ ;; There should probably be a runtime test to determine the timing
+ ;; resolution, or a primitive to report it. I don't know off-hand
+ ;; what's possible. Perhaps better, maybe the Windows/DOS primitive
+ ;; could round up non-zero timeouts to a minimum of 1.0?
+ 1.0
+ 0.1)
+ "How long pop3 should wait between checking for the end of output.
+ Shorter values mean quicker response, but are more CPU intensive.")
+
+ ;; Borrowed from nnheader-accept-process-output in nnheader.el.
+ (defun pop3-accept-process-output (process)
+ (accept-process-output
+ process
+ (truncate pop3-read-timeout)
+ (truncate (* (- pop3-read-timeout
+ (truncate pop3-read-timeout))
+ 1000))))
+
(defun pop3-movemail (&optional crashbox)
"Transfer contents of a maildrop to the specified CRASHBOX."
(or crashbox (setq crashbox (expand-file-name "~/.crashbox")))
***************
*** 207,213 ****
(goto-char pop3-read-point)
(while (and (memq (process-status process) '(open run))
(not (search-forward "\r\n" nil t)))
! (nnheader-accept-process-output process)
(goto-char pop3-read-point))
(setq match-end (point))
(goto-char pop3-read-point)
--- 240,246 ----
(goto-char pop3-read-point)
(while (and (memq (process-status process) '(open run))
(not (search-forward "\r\n" nil t)))
! (pop3-accept-process-output process)
(goto-char pop3-read-point))
(setq match-end (point))
(goto-char pop3-read-point)
***************
*** 381,388 ****
(save-excursion
(set-buffer (process-buffer process))
(while (not (re-search-forward "^\\.\r\n" nil t))
! ;; Fixme: Shouldn't depend on nnheader.
! (nnheader-accept-process-output process)
(goto-char start))
(setq pop3-read-point (point-marker))
;; this code does not seem to work for some POP servers...
--- 414,420 ----
(save-excursion
(set-buffer (process-buffer process))
(while (not (re-search-forward "^\\.\r\n" nil t))
! (pop3-accept-process-output process)
(goto-char start))
(setq pop3-read-point (point-marker))
;; this code does not seem to work for some POP servers...