/[emacs]/emacs/lisp/gnus/pop3.el
ViewVC logotype

Diff of /emacs/lisp/gnus/pop3.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21.2.3 by miles, Thu Oct 14 08:50:05 2004 UTC revision 1.21.2.4 by miles, Fri Oct 22 10:13:32 2004 UTC
# Line 83  values are 'apop." Line 83  values are 'apop."
83    :group 'pop3)    :group 'pop3)
84    
85  (defcustom pop3-leave-mail-on-server nil  (defcustom pop3-leave-mail-on-server nil
86    "*Non-nil if the mail is to be left on the POP server after fetching."    "*Non-nil if the mail is to be left on the POP server after fetching.
87    
88    If the `pop3-leave-mail-on-server' is non-`nil' the mail is to be
89    left on the POP server after fetching.  Note that POP servers
90    maintain no state information between sessions, so what the
91    client believes is there and what is actually there may not match
92    up.  If they do not, then the whole thing can fall apart and
93    leave you with a corrupt mailbox."
94    :version "21.4" ;; Oort Gnus    :version "21.4" ;; Oort Gnus
95    :type 'boolean    :type 'boolean
96    :group 'pop3)    :group 'pop3)
# Line 95  Used for APOP authentication.") Line 102  Used for APOP authentication.")
102  (defvar pop3-read-point nil)  (defvar pop3-read-point nil)
103  (defvar pop3-debug nil)  (defvar pop3-debug nil)
104    
105    ;; Borrowed from nnheader-accept-process-output in nnheader.el.
106    (defvar pop3-read-timeout
107      (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
108                        (symbol-name system-type))
109          ;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de
110          ;;
111          ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS.
112          ;;
113          ;; There should probably be a runtime test to determine the timing
114          ;; resolution, or a primitive to report it.  I don't know off-hand
115          ;; what's possible.  Perhaps better, maybe the Windows/DOS primitive
116          ;; could round up non-zero timeouts to a minimum of 1.0?
117          1.0
118        0.1)
119      "How long pop3 should wait between checking for the end of output.
120    Shorter values mean quicker response, but are more CPU intensive.")
121    
122    ;; Borrowed from nnheader-accept-process-output in nnheader.el.
123    (defun pop3-accept-process-output (process)
124      (accept-process-output
125       process
126       (truncate pop3-read-timeout)
127       (truncate (* (- pop3-read-timeout
128                       (truncate pop3-read-timeout))
129                    1000))))
130    
131  (defun pop3-movemail (&optional crashbox)  (defun pop3-movemail (&optional crashbox)
132    "Transfer contents of a maildrop to the specified CRASHBOX."    "Transfer contents of a maildrop to the specified CRASHBOX."
133    (or crashbox (setq crashbox (expand-file-name "~/.crashbox")))    (or crashbox (setq crashbox (expand-file-name "~/.crashbox")))
# Line 207  Return the response string if optional s Line 240  Return the response string if optional s
240        (goto-char pop3-read-point)        (goto-char pop3-read-point)
241        (while (and (memq (process-status process) '(open run))        (while (and (memq (process-status process) '(open run))
242                    (not (search-forward "\r\n" nil t)))                    (not (search-forward "\r\n" nil t)))
243          (nnheader-accept-process-output process)          (pop3-accept-process-output process)
244          (goto-char pop3-read-point))          (goto-char pop3-read-point))
245        (setq match-end (point))        (setq match-end (point))
246        (goto-char pop3-read-point)        (goto-char pop3-read-point)
# Line 381  This function currently does nothing.") Line 414  This function currently does nothing.")
414      (save-excursion      (save-excursion
415        (set-buffer (process-buffer process))        (set-buffer (process-buffer process))
416        (while (not (re-search-forward "^\\.\r\n" nil t))        (while (not (re-search-forward "^\\.\r\n" nil t))
417          ;; Fixme: Shouldn't depend on nnheader.          (pop3-accept-process-output process)
         (nnheader-accept-process-output process)  
418          (goto-char start))          (goto-char start))
419        (setq pop3-read-point (point-marker))        (setq pop3-read-point (point-marker))
420        ;; this code does not seem to work for some POP servers...        ;; this code does not seem to work for some POP servers...

Legend:
Removed from v.1.21.2.3  
changed lines
  Added in v.1.21.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26