Commit 530b8957 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen Committed by Katsumi Yamaoka
Browse files

pop3.el (pop3-write-to-file): Don't output messages when saving;...

pop3.el (pop3-write-to-file): Don't output messages when saving; mail-source.el (mail-source-delete-crash-box): Really only check the incoming files once in a while; nnml.el (nnml-save-nov): Message around nnml-save-nov so that the culprit is more visible; pop3.el (pop3-send-streaming-command): Off-by-one error on the request loop (for debugging purposes) removed.
parent ff3eb82e
2010-09-04 Lars Magne Ingebrigtsen <larsi@gnus.org> 2010-09-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
   
* nnml.el (nnml-save-nov): Message around nnml-save-nov so that the
culprit is more visible.
* mail-source.el (mail-source-delete-crash-box): Really only check the
incoming files once in a while.
* pop3.el (pop3-streaming-movemail): Always close the pop3 connection. * pop3.el (pop3-streaming-movemail): Always close the pop3 connection.
   
* mail-source.el (mail-source-delete-crash-box): Only check the * mail-source.el (mail-source-delete-crash-box): Only check the
......
...@@ -637,20 +637,20 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile) ...@@ -637,20 +637,20 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
(> (time-to-seconds (> (time-to-seconds
(time-since mail-source-incoming-last-checked-time)) (time-since mail-source-incoming-last-checked-time))
(* 24 60 60))) (* 24 60 60)))
(setq mail-source-incoming-last-checked-time (current-time))) (setq mail-source-incoming-last-checked-time (current-time))
(let ((incoming (let ((incoming
(mm-make-temp-file (mm-make-temp-file
(expand-file-name (expand-file-name
mail-source-incoming-file-prefix mail-source-incoming-file-prefix
mail-source-directory)))) mail-source-directory))))
(unless (file-exists-p (file-name-directory incoming)) (unless (file-exists-p (file-name-directory incoming))
(make-directory (file-name-directory incoming) t)) (make-directory (file-name-directory incoming) t))
(rename-file mail-source-crash-box incoming t) (rename-file mail-source-crash-box incoming t)
;; remove old incoming files? ;; remove old incoming files?
(when (natnump mail-source-delete-incoming) (when (natnump mail-source-delete-incoming)
(mail-source-delete-old-incoming (mail-source-delete-old-incoming
mail-source-delete-incoming mail-source-delete-incoming
mail-source-delete-old-incoming-confirm)))))) mail-source-delete-old-incoming-confirm)))))))
(defun mail-source-movemail (from to) (defun mail-source-movemail (from to)
"Move FROM to TO using movemail." "Move FROM to TO using movemail."
......
...@@ -824,6 +824,7 @@ article number. This function is called narrowed to an article." ...@@ -824,6 +824,7 @@ article number. This function is called narrowed to an article."
buffer))) buffer)))
(defun nnml-save-nov () (defun nnml-save-nov ()
(message "nnml saving nov...")
(save-excursion (save-excursion
(while nnml-nov-buffer-alist (while nnml-nov-buffer-alist
(when (buffer-name (cdar nnml-nov-buffer-alist)) (when (buffer-name (cdar nnml-nov-buffer-alist))
...@@ -833,7 +834,8 @@ article number. This function is called narrowed to an article." ...@@ -833,7 +834,8 @@ article number. This function is called narrowed to an article."
nnml-nov-buffer-file-name nil 'nomesg)) nnml-nov-buffer-file-name nil 'nomesg))
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(kill-buffer (current-buffer))) (kill-buffer (current-buffer)))
(setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist))))) (setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist))))
(message "nnml saving nov...done"))
;;;###autoload ;;;###autoload
(defun nnml-generate-nov-databases (&optional server) (defun nnml-generate-nov-databases (&optional server)
......
...@@ -150,7 +150,7 @@ Use streaming commands." ...@@ -150,7 +150,7 @@ Use streaming commands."
(defun pop3-send-streaming-command (process command count total-size) (defun pop3-send-streaming-command (process command count total-size)
(erase-buffer) (erase-buffer)
(let ((i 1)) (let ((i 1))
(while (>= (1+ count) i) (while (>= count i)
(process-send-string process (format "%s %d\r\n" command i)) (process-send-string process (format "%s %d\r\n" command i))
;; Only do 100 messages at a time to avoid pipe stalls. ;; Only do 100 messages at a time to avoid pipe stalls.
(when (zerop (% i 100)) (when (zerop (% i 100))
...@@ -197,7 +197,7 @@ Use streaming commands." ...@@ -197,7 +197,7 @@ Use streaming commands."
;; delete it. ;; delete it.
(when (eolp) (when (eolp)
(delete-char 1)) (delete-char 1))
(write-region (point-min) (point-max) file))))) (write-region (point-min) (point-max) file nil 'nomesg)))))
(defun pop3-number-of-responses (endp) (defun pop3-number-of-responses (endp)
(let ((responses 0)) (let ((responses 0))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment