From: yamaoka Date: Sun, 9 Feb 2003 22:31:17 +0000 (+0000) Subject: Synch to Oort Gnus. X-Git-Tag: t-gnus-6_15_17-00-quimby~76 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8de8126f9d608fd77e6b360d28d4710f100e1260;p=elisp%2Fgnus.git- Synch to Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 520259b..8316c38 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2002-02-09 Kevin Greiner + + * gnus-agent.el (gnus-agent-expire-days): + gnus-request-move-article depends on gnus-agent-expire to clean up + the cache after moving the article. Therefore, g-a-e-d can NOT + default to nil or can gnus-agent-expire be disabled by doing so. + If you don't want to run gnus-agent-expire, don't call it. + (gnus-agent-expire): The broken test to disable gnus-agent-expire + when g-a-e-d was NOT nil was removed. + (gnus-agent-article-name): Removed unnecessary input test as + article IDs are always strings. + (gnus-agent-regenerate-group): Added check to protect against + servers that generate absurdly long article IDs. Valid IDs are + less than 10 digits to avoid overflow errors. Fixed logic error + when ensuring that the final article ID is present in the new + alist. + 2003-02-09 Lars Magne Ingebrigtsen * gnus-topic.el (gnus-topic-goto-missing-topic): Just move to the diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 14506d5..5f5ad61 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -63,14 +63,14 @@ :group 'gnus-agent :type 'integer) -(defcustom gnus-agent-expire-days nil +(defcustom gnus-agent-expire-days 7 "Read articles older than this will be expired. This can also be a list of regexp/day pairs. The regexps will be matched against group names. If nil, articles in the agent cache are never expired." :group 'gnus-agent :type '(choice (number :tag "days") - (const :tag "never" nil))) + (sexp :tag "List" nil))) (defcustom gnus-agent-expire-all nil "If non-nil, also expire unread, ticked and dormant articles. @@ -1552,7 +1552,7 @@ FILE and places the combined headers into `nntp-server-buffer'." (insert "\n")))) (defun gnus-agent-article-name (article group) - (expand-file-name (if (stringp article) article (string-to-number article)) + (expand-file-name article (file-name-as-directory (expand-file-name (gnus-agent-group-path group) (gnus-agent-directory))))) @@ -1635,9 +1635,9 @@ FILE and places the combined headers into `nntp-server-buffer'." (let ((marked-articles gnus-newsgroup-downloadable)) ;; Identify the articles marked for download (unless gnus-newsgroup-active - ;; This needs to be a gnus-summary local variable that is - ;; NOT bound to any value above (its global value should - ;; default to nil). + ;; The variable gnus-newsgroup-active was selected as I need + ;; a gnus-summary local variable that is NOT bound to any + ;; value (its global value should default to nil). (dolist (mark gnus-agent-download-marks) (let ((arts (cdr (assq mark (gnus-info-marks (setq info (gnus-get-info group))))))) @@ -2469,14 +2469,13 @@ The articles on which the expiration process runs are selected as follows: Setting GROUP will limit expiration to that group. FORCE is equivalent to setting gnus-agent-expire-days to zero(0)." (interactive) - (if (and (not gnus-agent-expire-days) - (or (not (eq articles t)) - (yes-or-no-p (concat "Are you sure that you want to expire all " - "articles in " (if group group - "every agentized group") - ".")))) - (gnus-agent-expire-1 articles group force) - (gnus-message 4 "Expiry...done"))) + (if (or (not (eq articles t)) + (yes-or-no-p (concat "Are you sure that you want to expire all " + "articles in " (if group group + "every agentized group") + "."))) + (gnus-agent-expire-1 articles group force)) + (gnus-message 4 "Expiry...done")) ;;;###autoload (defun gnus-agent-batch () @@ -2726,7 +2725,8 @@ If REREAD is not nil, downloaded articles are marked as unread." (setq load nil) (goto-char (point-min)) (while (< (point) (point-max)) - (cond ((looking-at "[0-9]+\t") + (cond ((and (looking-at "[0-9]+\t") + (<= (- (match-end 0) (match-beginning 0)) 9)) (push (read (current-buffer)) nov-arts) (forward-line 1) (let ((l1 (car nov-arts)) @@ -2821,9 +2821,10 @@ If REREAD is not nil, downloaded articles are marked as unread." ;; Restore the last article ID if it is not already in the new alist (let ((n (last alist)) (o (last (gnus-agent-load-alist group)))) - (cond ((not n) - (when o - (push (cons (caar o) nil) alist))) + (cond ((not o) + nil) + ((not n) + (push (cons (caar o) nil) alist)) ((< (caar n) (caar o)) (setcdr n (list (car o)))))))