* elmo-null.el: Ditto.
* elmo-internal.el (elmo-internal-folder-list): Added `null'.
* WL-ELS (ELMO-MODULES): Added elmo-access and elmo-null.
+2005-01-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * WL-ELS (ELMO-MODULES): Added elmo-access and elmo-null.
+
2005-01-01 TAKAHASHI Kaoru <kaoru@kaisei.org>
* README, README.ja: Update stable branch.
elmo-date elmo-util elmo-version elmo-vars elmo elmo-msgdb
elmo-net elmo-imap4 elmo-pop3 elmo-nntp
elmo-localdir elmo-localnews elmo-map elmo-maildir
- elmo-multi elmo-filter
+ elmo-multi elmo-access elmo-filter
elmo-archive elmo-pipe elmo-cache
- elmo-internal elmo-flag elmo-sendlog
+ elmo-internal elmo-flag elmo-sendlog elmo-null
elmo-dop elmo-nmz elmo-file elmo-split
elmo-spam elsp-bogofilter elsp-sa elsp-bsfilter elsp-spamoracle
modb modb-entity modb-legacy modb-standard
\e$B%P!<%8%g%s\e(B @value{VERSION} \e$B8=:_!"MQ0U$5$l$F$$$k%U%)%k%@$O!"\e(BIMAP, NNTP,
LocalDir(MH), Maildir, News Spool, Archive, POP, Shimbun, Namazu, Multi,
-Filter, Pipe, Internal, File \e$B$N\e(B 14 \e$B<oN`$G$9!#\e(B
+Filter, Pipe, File, Access, Internal \e$B$N\e(B 15 \e$B<oN`$G$9!#\e(B
@menu
* IMAP Folder:: @samp{%} -- IMAP \e$B%U%)%k%@\e(B
* Pipe Folder:: @samp{|} -- \e$B%Q%$%W%U%)%k%@\e(B
* Internal Folder:: @samp{'} -- \e$BFbIt%U%)%k%@\e(B
* File Folder:: -- \e$B%U%!%$%k%U%)%k%@\e(B
+* Access Folder:: -- \e$B%"%/%;%9%U%)%k%@\e(B
@end menu
\e$B%G%#%l%/%H%j\e(B (@file{~/.elmo/cache})\e$B$N%5%V%G%#%l%/%H%jL>$r;XDj$7$^$9!#\e(B
-@node File Folder, , Internal Folder, Folders
+@node File Folder, Access Folder, Internal Folder, Folders
@section \e$B%U%!%$%k%U%)%k%@\e(B
@cindex File Folder
@end example
+@node Access Folder, , File Folder, Folders
+@section \e$B%"%/%;%9%U%)%k%@\e(B
+@cindex Access Folder
+
+\e$B;XDj$5$l$?%U%)%k%@$NG[2<$N%5%V%U%)%k%@$r2>A[E*$K0l$D$N%U%)%k%@$H$7$F07$(\e(B
+\e$B$k$h$&$K$9$k%U%)%k%@$G$9!#%5%V%U%)%k%@$NA}8:$O<+F0E*$KH?1G$5$l$^$9!#\e(B
+
+\e$B=q<0\e(B:
+
+@example
+@samp{access:} @var{\e$B%k!<%H%U%)%k%@\e(B}
+@end example
+
+\e$BNc\e(B:
+
+@example
+@group
+access:%INBOX -> %INBOX \e$B0J2<$N\e(B IMAP \e$B$N%a!<%k%\%C%/%9$NA4$F\e(B
+access:'cache -> \e$BA4$F$N\e(B 'cache \e$B%U%)%k%@\e(B
+@end group
+@end example
+
+
@node Folder, Summary, Folders, Top
@chapter \e$B%U%)%k%@%b!<%I\e(B
@cindex Folder
@end table
-@node Regular Expressions Header Matching, , SpamAssassin, Spam Filter Processors
+@node Regular Expressions Header Matching, , SpamOracle, Spam Filter Processors
@subsection Regular Expressions Header Matching
@cindex Regular Expressions Header Matching
Wanderlust uses ELMO as it's interface, so you can use every folder types
supported by ELMO.
-As of version @value{VERSION}, 14 types of folders are predefined. These
+As of version @value{VERSION}, 15 types of folders are predefined. These
are IMAP, NNTP, LocalDir(MH), Maildir, News Spool, Archive, POP,
-Shimbun, Namazu, Multi, Filter, Pipe, Internal and File folder types.
+Shimbun, Namazu, Multi, Filter, Pipe, File, Access and Internal folder
+types.
@menu
* IMAP Folder:: @samp{%} -- IMAP folder
* Pipe Folder:: @samp{|} -- Pipe folder
* Internal Folder:: @samp{'} -- Internal folder
* File Folder:: -- File folder
+* Access Folder:: -- Access folder
@end menu
(@file{~/.elmo/cache}).
-@node File Folder, , Internal Folder, Folders
+@node File Folder, Access Folder, Internal Folder, Folders
@section File folder
@cindex File Folder
@end example
+@node Access Folder, , File Folder, Folders
+@section Access folder
+@cindex Access Folder
+
+A folder to access virtual folder which collects messages from a root
+folder and subfolders of one. The add and remove of the subfolder is
+automatically reflected.
+
+
+Format:
+
+@example
+@samp{access:} @var{root-folder}
+@end example
+
+Example:
+
+@example
+@group
+access:%INBOX -> All subfolders of IMAP mailbox "inbox".
+access:'cache -> All of 'cache folder
+@end group
+@end example
+
+
@node Folder, Summary, Folders, Top
@chapter Folder mode
@cindex Folder
@end table
-@node Regular Expressions Header Matching, , SpamAssassin, Spam Filter Processors
+@node Regular Expressions Header Matching, , SpamOracle, Spam Filter Processors
@subsection Regular Expressions Header Matching
@cindex Regular Expressions Header Matching
+2005-01-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo-access.el: New file.
+
+ * elmo-null.el: Ditto.
+
+ * elmo-internal.el (elmo-internal-folder-list): Added `null'.
+
2005-01-08 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-net.el (elmo-network-session-idle-timeout): New option.
--- /dev/null
+;;; elmo-access.el --- Auto Collect Multiple Folder Interface for ELMO.
+
+;; Copyright (C) 2005 Yuuichi Teranishi <teranisi@gohome.org>
+
+;; Author: Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+;; Keywords: mail, net news
+
+;; This file is part of ELMO (Elisp Library for Message Orchestration).
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+;;
+
+;;; Commentary:
+;;
+
+;;; Code:
+;;
+(require 'elmo)
+(require 'elmo-multi)
+
+(defvar elmo-access-folder-list-filename "flist"
+ "Folder list cache.")
+
+(eval-and-compile
+ (luna-define-class elmo-access-folder (elmo-multi-folder)
+ (base-folder))
+ (luna-define-internal-accessors 'elmo-access-folder))
+
+(luna-define-method elmo-folder-initialize ((folder elmo-access-folder) name)
+ (elmo-access-folder-set-base-folder-internal
+ folder
+ (elmo-make-folder name))
+ (elmo-multi-folder-set-children-internal
+ folder
+ (mapcar #'elmo-make-folder
+ (elmo-object-load
+ (expand-file-name elmo-access-folder-list-filename
+ (elmo-folder-msgdb-path folder)))))
+ (elmo-multi-folder-set-divide-number-internal
+ folder
+ elmo-multi-divide-number)
+ (elmo-access-folder-update-children folder)
+ folder)
+
+(luna-define-method elmo-folder-expand-msgdb-path ((folder elmo-access-folder))
+ (expand-file-name (elmo-replace-string-as-filename
+ (elmo-folder-name-internal folder))
+ (expand-file-name "access" elmo-msgdb-directory)))
+
+(defvar elmo-access-substitute-folder nil)
+
+(defun elmo-access-substitute-folder ()
+ (or elmo-access-substitute-folder
+ (setq elmo-access-substitute-folder
+ (elmo-make-folder "'null"))))
+
+(defun elmo-access-folder-update-children (folder &optional open expunge)
+ (elmo-multi-folder-set-children-internal
+ folder
+ (if (elmo-folder-plugged-p
+ (elmo-access-folder-base-folder-internal folder))
+ (let ((subfolders (elmo-folder-list-subfolders
+ (elmo-access-folder-base-folder-internal folder)))
+ children)
+ (dolist (child (elmo-multi-folder-children-internal folder))
+ (let ((name (elmo-folder-name-internal child)))
+ (cond ((member name subfolders)
+ (setq children (nconc children (list child))))
+ (expunge)
+ (t
+ (setq children
+ (nconc children
+ (list (elmo-access-substitute-folder))))))
+ (setq subfolders (delete name subfolders))))
+ (if subfolders
+ (nconc children
+ (mapcar (lambda (name)
+ (let ((folder (elmo-make-folder name)))
+ (when open
+ (elmo-folder-open-internal folder))
+ folder))
+ subfolders))
+ children))
+ (mapcar (lambda (f)
+ (if (elmo-folder-exists-p f)
+ f
+ (elmo-access-substitute-folder)))
+ (elmo-multi-folder-children-internal folder)))))
+
+(luna-define-method elmo-folder-open-internal
+ :before ((folder elmo-access-folder))
+ (elmo-access-folder-update-children folder))
+
+(luna-define-method elmo-folder-commit :after ((folder elmo-access-folder))
+ (when (elmo-folder-persistent-p folder)
+ (elmo-object-save
+ (expand-file-name elmo-access-folder-list-filename
+ (elmo-folder-msgdb-path folder))
+ (mapcar (lambda (f) (elmo-folder-name-internal f))
+ (elmo-multi-folder-children-internal folder)))))
+
+(luna-define-method elmo-folder-check :before ((folder elmo-access-folder))
+ (elmo-access-folder-update-children folder 'open))
+
+(luna-define-method elmo-folder-synchronize :before
+ ((folder elmo-access-folder)
+ &optional disable-killed ignore-msgdb no-check mask)
+ (when (or ignore-msgdb
+ (not no-check))
+ (elmo-access-folder-update-children folder 'open ignore-msgdb)))
+
+(luna-define-method elmo-folder-creatable-p ((folder elmo-access-folder))
+ nil)
+
+(require 'product)
+(product-provide (provide 'elmo-access) (require 'elmo-version))
+
+;;; elmo-access.el.el ends here
;;; ELMO internal folder
(luna-define-class elmo-internal-folder (elmo-folder) ())
-(defvar elmo-internal-folder-list '(flag cache sendlog))
+(defvar elmo-internal-folder-list '(flag cache sendlog null))
(defvar elmo-internal-obsolete-folder-list '((mark flag)))
(luna-define-method elmo-folder-initialize ((folder
--- /dev/null
+;;; elmo-null.el --- /dev/null Folder Interface for ELMO.
+
+;; Copyright (C) 2005 Yuuichi Teranishi <teranisi@gohome.org>
+
+;; Author: Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+;; Keywords: mail, net news
+
+;; This file is part of ELMO (Elisp Library for Message Orchestration).
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+;;
+
+;;; Commentary:
+;;
+
+;;; Code:
+;;
+(require 'elmo)
+
+(eval-and-compile
+ (luna-define-class elmo-null-folder (elmo-folder)))
+
+(luna-define-method elmo-folder-initialize ((folder elmo-null-folder) name)
+ folder)
+
+(luna-define-method elmo-folder-expand-msgdb-path ((folder elmo-null-folder))
+ (expand-file-name "null" (expand-file-name "internal" elmo-msgdb-directory)))
+
+(luna-define-method elmo-folder-open ((folder elmo-null-folder)
+ &optional load-msgdb))
+
+(luna-define-method elmo-folder-commit ((folder elmo-null-folder)))
+
+(luna-define-method elmo-folder-diff ((folder elmo-null-folder))
+ '(0 . 0))
+
+(luna-define-method elmo-folder-list-messages ((folder elmo-null-folder)
+ &optional visible-only in-msgdb)
+ nil)
+
+(luna-define-method elmo-folder-list-flagged ((folder elmo-null-folder)
+ flag &optional in-msgdb)
+ nil)
+
+(luna-define-method elmo-folder-count-flags ((folder elmo-null-folder))
+ nil)
+
+(luna-define-method elmo-folder-have-subfolder-p ((folder elmo-null-folder))
+ nil)
+
+(luna-define-method elmo-folder-exists-p ((folder elmo-null-folder))
+ t)
+
+(luna-define-method elmo-folder-writable-p ((folder elmo-null-folder))
+ t)
+
+(luna-define-method elmo-folder-append-messages ((folder elmo-null-folder)
+ src-folder
+ numbers
+ &optional
+ same-number)
+ (elmo-progress-notify 'elmo-folder-move-messages (length numbers))
+ numbers)
+
+(luna-define-method elmo-folder-synchronize ((folder elmo-null-folder)
+ &optional
+ disable-killed
+ ignore-msgdb
+ no-check
+ mask)
+ nil)
+
+(require 'product)
+(product-provide (provide 'elmo-null) (require 'elmo-version))
+
+;;; elmo-null.el.el ends here