+2001-07-30 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-shimbun.el (elmo-shimbun-use-cache): New user option.
+ (elmo-message-use-cache-p): Define.
+ (elmo-folder-msgdb-create): Treat cache.
+
2001-07-28 Kenichi OKADA <okada@opaopa.org>
* elmo-nntp.el (elmo-network-initialize-session): Call
(integer :tag "number"))
:group 'elmo)
+(defcustom elmo-shimbun-use-cache t
+ "*If non-nil, use cache for each article."
+ :type :boolean
+ :group 'elmo)
+
(defcustom elmo-shimbun-index-range-alist nil
"*Alist of FOLDER-REGEXP and RANGE.
FOLDER-REGEXP is the regexp for shimbun folder name.
(luna-define-method elmo-folder-reserve-status-p ((folder elmo-shimbun-folder))
t)
+(luna-define-method elmo-message-use-cache-p ((folder elmo-shimbun-folder)
+ number)
+ elmo-shimbun-use-cache)
+
(luna-define-method elmo-folder-close-internal :after ((folder
elmo-shimbun-folder))
(shimbun-close-group
important-mark
seen-list)
(let* (overview number-alist mark-alist entity
- i percent num pair)
- (setq num (length numlist))
+ i percent number length pair msgid)
+ (setq length (length numlist))
(setq i 0)
(message "Creating msgdb...")
(while numlist
(setq overview
(elmo-msgdb-append-element
overview entity))
+ (setq number (elmo-msgdb-overview-entity-get-number entity))
+ (setq msgid (elmo-msgdb-overview-entity-get-id entity))
(setq number-alist
(elmo-msgdb-number-add number-alist
- (elmo-msgdb-overview-entity-get-number
- entity)
- (elmo-msgdb-overview-entity-get-id
- entity)))
- (setq mark-alist
- (elmo-msgdb-mark-append
- mark-alist
- (elmo-msgdb-overview-entity-get-number
- entity)
- (or (elmo-msgdb-global-mark-get
- (elmo-msgdb-overview-entity-get-id
- entity))
- new-mark))))
- (when (> num elmo-display-progress-threshold)
+ number msgid))
+ (setq seen (member msgid seen-list))
+ (if (setq gmark (or (elmo-msgdb-global-mark-get msgid)
+ (if (elmo-file-cache-status
+ (elmo-file-cache-get msgid))
+ (if seen nil already-mark)
+ (if seen
+ (if elmo-shimbun-use-cache
+ seen-mark)
+ new-mark))))
+ (setq mark-alist
+ (elmo-msgdb-mark-append mark-alist
+ number gmark))))
+ (when (> length elmo-display-progress-threshold)
(setq i (1+ i))
- (setq percent (/ (* i 100) num))
+ (setq percent (/ (* i 100) length))
(elmo-display-progress
'elmo-folder-msgdb-create "Creating msgdb..."
percent))