;;; gnus-cache.el --- cache interface for Gnus
-;; Copyright (C) 1995,96,97 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
;; Keywords: news
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-int)
(require 'gnus-range)
:type 'file)
(defcustom gnus-cache-enter-articles '(ticked dormant)
- "Classes of articles to enter into the cache."
+ "*Classes of articles to enter into the cache."
:group 'gnus-cache
:type '(set (const ticked) (const dormant) (const unread) (const read)))
(defcustom gnus-cache-remove-articles '(read)
- "Classes of articles to remove from the cache."
+ "*Classes of articles to remove from the cache."
:group 'gnus-cache
:type '(set (const ticked) (const dormant) (const unread) (const read)))
If not given a prefix, use the process marked articles instead.
Returns the list of articles entered."
(interactive "P")
- (gnus-set-global-variables)
(let ((articles (gnus-summary-work-articles n))
article out)
(while (setq article (pop articles))
If not given a prefix, use the process marked articles instead.
Returns the list of articles removed."
(interactive "P")
- (gnus-set-global-variables)
(gnus-cache-change-buffer gnus-newsgroup-name)
(let ((articles (gnus-summary-work-articles n))
article out)
(let ((cached gnus-newsgroup-cached)
(gnus-verbose (max 6 gnus-verbose)))
(unless cached
- (error "No cached articles for this group"))
+ (gnus-message 3 "No cached articles for this group"))
(while cached
(gnus-summary-goto-subject (pop cached) t))))
+(defalias 'gnus-summary-limit-include-cached
+ 'gnus-summary-insert-cached-articles)
+
;;; Internal functions.
(defun gnus-cache-change-buffer (group)
"Read the cache active file."
(gnus-make-directory gnus-cache-directory)
(if (or (not (file-exists-p gnus-cache-active-file))
+ (not (zerop (nth 7 (file-attributes gnus-cache-active-file))))
force)
;; There is no active file, so we generate one.
(gnus-cache-generate-active)