-;;; elmo-multi.el -- Multiple Folder Interface for ELMO.
+;;; elmo-multi.el --- Multiple Folder Interface for ELMO.
;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
;;
;;; Commentary:
-;;
+;;
;;; Code:
-;;
+;;
(require 'elmo)
(require 'luna)
(luna-define-method elmo-folder-expand-msgdb-path ((folder
elmo-multi-folder))
- (expand-file-name (elmo-replace-string-as-filename
+ (expand-file-name (elmo-replace-string-as-filename
(elmo-folder-name-internal folder))
(expand-file-name "multi"
- elmo-msgdb-dir)))
+ elmo-msgdb-directory)))
+
+(luna-define-method elmo-folder-newsgroups ((folder elmo-multi-folder))
+ (delq nil
+ (elmo-flatten
+ (mapcar
+ 'elmo-folder-newsgroups
+ (elmo-flatten
+ (mapcar
+ 'elmo-folder-get-primitive-list
+ (elmo-multi-folder-children-internal folder)))))))
(luna-define-method elmo-folder-get-primitive-list ((folder elmo-multi-folder))
(elmo-flatten
- (mapcar
+ (mapcar
'elmo-folder-get-primitive-list
(elmo-multi-folder-children-internal folder))))
(setq children (cdr children)))
match))
-(luna-define-method elmo-message-use-cache-p ((folder elmo-multi-folder)
- number)
- (elmo-message-use-cache-p
- (nth (- (/ number (elmo-multi-folder-divide-number-internal folder)) 1)
- (elmo-multi-folder-children-internal folder))
- (% number (elmo-multi-folder-divide-number-internal folder))))
-
(luna-define-method elmo-message-folder ((folder elmo-multi-folder)
number)
(nth (- (/ number (elmo-multi-folder-divide-number-internal folder)) 1)
(if (setq same (rassoc (cdr (car cur)) all-alist))
(unless (= (/ (car (car cur))
(elmo-multi-folder-divide-number-internal folder))
- (/ (car same)
+ (/ (car same)
(elmo-multi-folder-divide-number-internal folder)))
;; base is also same...delete it!
(setq to-be-deleted
(unsync 0)
(messages 0)
num-list
- diffs)
+ diffs nums)
;; If first time, dummy numbers is used as current number list.
(unless numbers
(let ((i 0)
(elmo-number-set-to-number-list killed)
numbers))))
(while flds
- (setq diffs (nconc diffs (list (elmo-folder-diff
- (car flds)
- (car num-list)))))
+ (setq nums (elmo-folder-diff (car flds) (car num-list))
+ nums (cons (elmo-diff-unread nums) (elmo-diff-all nums)))
+ (setq diffs (nconc diffs (list nums)))
(setq count (+ 1 count))
(setq num-list (cdr num-list))
(setq flds (cdr flds)))
(luna-define-method elmo-message-file-name ((folder elmo-multi-folder) number)
(let ((pair (elmo-multi-real-folder-number folder number)))
(elmo-message-file-name (car pair) (cdr pair))))
-
+
(luna-define-method elmo-folder-plugged-p ((folder elmo-multi-folder))
(let ((flds (elmo-multi-folder-children-internal folder)))
(catch 'plugged
(elmo-folder-mark-as-important (car folder-numbers)
(cdr folder-numbers)))
t)
-
+
(luna-define-method elmo-folder-unmark-important ((folder elmo-multi-folder)
numbers)
(dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))