+2002-02-09 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * 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 <larsi@gnus.org>
* gnus-topic.el (gnus-topic-goto-missing-topic): Just move to the
: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.
(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)))))
(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)))))))
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 ()
(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))
;; 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)))))))