* elmo.el (elmo-folder-newsgroups): New generic function.
* elmo-localnews.el (elmo-localnews-folder): Added `group' slot.
(elmo-folder-initialize): Set it.
(elmo-folder-expand-msgdb-path): Use it.
(elmo-folder-newsgroups): Define.
* elmo-filter.el (elmo-folder-newsgroups): Define.
* elmo-pipe.el (elmo-folder-newsgroups): Ditto.
* elmo-nntp.el (elmo-folder-newsgroups): Ditto.
* elmo-multi.el (elmo-folder-newsgroups): Ditto.
+2001-11-19 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo.el (elmo-folder-newsgroups): New generic function.
+
+ * elmo-localnews.el (elmo-localnews-folder): Added `group' slot.
+ (elmo-folder-initialize): Set it.
+ (elmo-folder-expand-msgdb-path): Use it.
+ (elmo-folder-newsgroups): Define.
+
+ * elmo-filter.el (elmo-folder-newsgroups): Define.
+
+ * elmo-pipe.el (elmo-folder-newsgroups): Ditto.
+
+ * elmo-nntp.el (elmo-folder-newsgroups): Ditto.
+
+ * elmo-multi.el (elmo-folder-newsgroups): Ditto.
+
2001-11-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* elmo-shimbun.el (elmo-shimbun-update-overview-folder-list): New
(elmo-replace-string-as-filename (elmo-folder-name-internal folder))
(expand-file-name "filter" elmo-msgdb-dir)))
+(luna-define-method elmo-folder-newsgroups ((folder elmo-filter-folder))
+ (elmo-folder-newsgroups (elmo-filter-folder-target-internal folder)))
+
(luna-define-method elmo-find-fetch-strategy
((folder elmo-filter-folder) entity &optional ignore-cache)
(elmo-find-fetch-strategy
;;; Code:
;;
(require 'elmo-localdir)
-(luna-define-class elmo-localnews-folder (elmo-localdir-folder) ())
+
+(eval-and-compile
+ (luna-define-class elmo-localnews-folder (elmo-localdir-folder) (group))
+ (luna-define-internal-accessors 'elmo-localnews-folder))
+
+(luna-define-method elmo-folder-initialize :before ((folder
+ elmo-localnews-folder)
+ name)
+ (elmo-localnews-folder-set-group-internal folder
+ (elmo-replace-in-string
+ name "/" "\\.")))
(luna-define-method elmo-localdir-folder-path ((folder elmo-localnews-folder))
elmo-localnews-folder-path)
(luna-define-method elmo-folder-expand-msgdb-path ((folder
elmo-localnews-folder))
(expand-file-name
- (elmo-replace-in-string (elmo-localdir-folder-dir-name-internal folder)
- "/" "\\.")
+ (elmo-localnews-folder-group-internal folder)
(expand-file-name
(symbol-name (elmo-folder-type-internal folder))
elmo-msgdb-dir)))
+(luna-define-method elmo-folder-newsgroups ((folder elmo-localnews-folder))
+ (list (elmo-localnews-folder-group-internal folder)))
+
(require 'product)
(product-provide (provide 'elmo-localnews) (require 'elmo-version))
(expand-file-name "multi"
elmo-msgdb-dir)))
+(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
(expand-file-name "nntp"
elmo-msgdb-dir)))))
+(luna-define-method elmo-folder-newsgroups ((folder elmo-nntp-folder))
+ (list (elmo-nntp-folder-group-internal folder)))
+
;;; NNTP Session
(eval-and-compile
(luna-define-class elmo-nntp-session (elmo-network-session)
;; Share with destination...OK?
(elmo-folder-expand-msgdb-path (elmo-pipe-folder-dst-internal folder)))
+(luna-define-method elmo-folder-newsgroups ((folder elmo-pipe-folder))
+ (elmo-folder-newsgroups (elmo-pipe-folder-target-internal folder)))
+
(luna-define-method elmo-folder-creatable-p ((folder elmo-pipe-folder))
(and (elmo-folder-creatable-p (elmo-pipe-folder-src-internal folder))
(elmo-folder-creatable-p (elmo-pipe-folder-dst-internal folder))))
(luna-define-generic elmo-folder-append-msgdb (folder append-msgdb)
"Append APPEND-MSGDB to the current msgdb of the folder.")
+(luna-define-generic elmo-folder-newsgroups (folder)
+ "Return list of newsgroup name of FOLDER.")
+
+(luna-define-method elmo-folder-newsgroups ((folder elmo-folder))
+ nil)
+
(luna-define-method elmo-folder-open ((folder elmo-folder)
&optional load-msgdb)
(elmo-generic-folder-open folder load-msgdb))
+2001-11-19 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-folder.el (wl-folder-get-newsgroups): Use
+ `elmo-folder-newsgroups'.
+
2001-11-18 Kenichi OKADA <okada@opaopa.org>
* wl-draft.el (wl-draft-config-sub-header-top): New fucntion.
(defun wl-folder-get-newsgroups (folder)
"Return Newsgroups field value string for FOLDER newsgroup.
If FOLDER is multi, return comma separated string (cross post)."
- (let ((flist (elmo-folder-get-primitive-list
- (wl-folder-get-elmo-folder folder))) ; multi
- newsgroups fld ret)
- (while (setq fld (car flist))
- (if (setq ret
- (cond ((eq 'nntp (elmo-folder-type-internal fld))
- (elmo-nntp-folder-group-internal fld))
- ((eq 'localnews (elmo-folder-type-internal fld))
- (elmo-replace-in-string
- (elmo-localdir-folder-dir-name-internal fld)
- "/" "\\."))))
- ;; append newsgroup
- (setq newsgroups (if (stringp newsgroups)
- (concat newsgroups "," ret)
- ret)))
- (setq flist (cdr flist)))
- (list nil nil newsgroups)))
+ (list nil nil (mapconcat 'identity
+ (elmo-folder-newsgroups folder)
+ ",")))
(defun wl-folder-guess-mailing-list-by-refile-rule (entity)
"Return ML address guess by FOLDER.