comparison lisp/gnus/gnus-agent.el @ 90428:a8190f7e546e

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 285-296) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: admin/FOR-RELEASE: Update refcard section. * gnus--rel--5.10 (patch 102-104) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-64
author Miles Bader <miles@gnu.org>
date Wed, 07 Jun 2006 18:05:10 +0000
parents e6bf73e43cf4 70b055c73c8c
children 7eeafaaa9eab
comparison
equal deleted inserted replaced
90427:ddb25860d044 90428:a8190f7e546e
823 "Synchronize flags according to `gnus-agent-synchronize-flags'." 823 "Synchronize flags according to `gnus-agent-synchronize-flags'."
824 (interactive) 824 (interactive)
825 (save-excursion 825 (save-excursion
826 (dolist (gnus-command-method (gnus-agent-covered-methods)) 826 (dolist (gnus-command-method (gnus-agent-covered-methods))
827 (when (and (file-exists-p (gnus-agent-lib-file "flags")) 827 (when (and (file-exists-p (gnus-agent-lib-file "flags"))
828 (not (eq (gnus-server-status gnus-command-method) 'offline))) 828 (eq (gnus-server-status gnus-command-method) 'ok))
829 (gnus-agent-possibly-synchronize-flags-server gnus-command-method))))) 829 (gnus-agent-possibly-synchronize-flags-server gnus-command-method)))))
830 830
831 (defun gnus-agent-synchronize-flags-server (method) 831 (defun gnus-agent-synchronize-flags-server (method)
832 "Synchronize flags set when unplugged for server." 832 "Synchronize flags set when unplugged for server."
833 (let ((gnus-command-method method) 833 (let ((gnus-command-method method)
2131 (while (not (eobp)) 2131 (while (not (eobp))
2132 (condition-case err 2132 (condition-case err
2133 (let (group 2133 (let (group
2134 min 2134 min
2135 max 2135 max
2136 (cur (current-buffer))) 2136 (cur (current-buffer))
2137 (obarray my-obarray))
2137 (setq group (read cur) 2138 (setq group (read cur)
2138 min (read cur) 2139 min (read cur)
2139 max (read cur)) 2140 max (read cur))
2140 2141
2141 (when (stringp group) 2142 (when (stringp group)
2212 (symb (intern gmane local)) 2213 (symb (intern gmane local))
2213 (minmax (and (boundp symb) (symbol-value symb)))) 2214 (minmax (and (boundp symb) (symbol-value symb))))
2214 2215
2215 (if (cond ((and minmax 2216 (if (cond ((and minmax
2216 (or (not (eq min (car minmax))) 2217 (or (not (eq min (car minmax)))
2217 (not (eq max (cdr minmax))))) 2218 (not (eq max (cdr minmax))))
2219 min
2220 max)
2218 (setcar minmax min) 2221 (setcar minmax min)
2219 (setcdr minmax max) 2222 (setcdr minmax max)
2220 t) 2223 t)
2221 (minmax 2224 (minmax
2222 nil) 2225 nil)
3741 (gnus-find-method-for-group group))) 3744 (gnus-find-method-for-group group)))
3742 (file (gnus-agent-article-name ".overview" group)) 3745 (file (gnus-agent-article-name ".overview" group))
3743 (dir (file-name-directory file)) 3746 (dir (file-name-directory file))
3744 point 3747 point
3745 (downloaded (if (file-exists-p dir) 3748 (downloaded (if (file-exists-p dir)
3746 (sort (mapcar (lambda (name) (string-to-number name)) 3749 (sort (delq nil (mapcar (lambda (name)
3747 (directory-files dir nil "^[0-9]+$" t)) 3750 (and (not (file-directory-p (nnheader-concat dir name)))
3751 (string-to-number name)))
3752 (directory-files dir nil "^[0-9]+$" t)))
3748 '>) 3753 '>)
3749 (progn (gnus-make-directory dir) nil))) 3754 (progn (gnus-make-directory dir) nil)))
3750 dl nov-arts 3755 dl nov-arts
3751 alist header 3756 alist header
3752 regenerated) 3757 regenerated)