(Renamed from `elmo-nntp-use-killed-list').
(elmo-nntp-use-killed-list): Eliminated.
* elmo-msgdb.el (elmo-msgdb-expand-path):
Changed expanding msgdb path for elmo-multi.
* elmo-archive.el, elmo-cache.el, elmo-database.el, elmo-date.el,
elmo-dop.el, elmo-filter.el, elmo-imap4.el, elmo-internal.el,
elmo-localdir.el, elmo-localnews.el, elmo-maildir.el, elmo-msgdb.el,
elmo-multi.el, elmo-nntp.el, elmo-pipe.el, elmo-pop3.el,
elmo-util.el, elmo-vars.el, elmo2.el, mmelmo-1.el, mmelmo-2.el,
mmelmo-imap4-1.el, mmelmo-imap4-2.el, mmelmo-imap4.el, mmelmo.el
(toplevel): Deleted time-stamp line.
* elmo2.el (elmo-clear-killed ): Defined as function
(Abolished defining as a backend function).
All other related modules are changed.
(defun elmo-archive-list-folder (spec)
(let* ((type (nth 2 spec))
(prefix (nth 3 spec))
- (arc (elmo-archive-get-archive-name (nth 1 spec) type spec)))
- (elmo-archive-list-folder-subr arc type prefix)))
+ (arc (elmo-archive-get-archive-name (nth 1 spec) type spec))
+ (killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers (elmo-archive-list-folder-subr arc type prefix))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-archive-max-of-folder (spec)
(let* ((type (nth 2 spec))
(defalias 'elmo-archive-list-folder-important
'elmo-generic-list-folder-important)
(defalias 'elmo-archive-commit 'elmo-generic-commit)
-(defalias 'elmo-archive-clear-killed 'elmo-generic-clear-killed)
;;; End
(run-hooks 'elmo-archive-load-hook)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Kenichi OKADA <okada@opaopa.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/03/01 09:57:55 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
msgs)))))
(defun elmo-cache-list-folder (spec); called by elmo-cache-search()
- (elmo-cache-list-folder-subr spec))
+ (let ((killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers (elmo-cache-list-folder-subr spec))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-cache-max-of-folder (spec)
(elmo-cache-list-folder-subr spec t))
(defalias 'elmo-cache-list-folder-important
'elmo-generic-list-folder-important)
(defalias 'elmo-cache-commit 'elmo-generic-commit)
-(defalias 'elmo-cache-clear-killed 'elmo-generic-clear-killed)
(provide 'elmo-cache)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <2000-01-07 00:19:44 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/03/14 19:38:44 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <2000-04-07 09:41:13 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 17:55:56 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(defun elmo-filter-list-folder (spec)
(let ((filter (nth 1 spec))
(folder (nth 2 spec))
- msgs)
+ numbers)
(cond
((vectorp filter)
(cond ((string= (elmo-filter-key filter)
"last")
- (setq msgs (elmo-list-folder folder))
- (nthcdr (max (- (length msgs)
+ (setq numbers (elmo-list-folder folder))
+ (nthcdr (max (- (length numbers)
(string-to-int (elmo-filter-value filter)))
0)
- msgs))
+ numbers))
((string= (elmo-filter-key filter)
"first")
- (setq msgs (elmo-list-folder folder))
+ (setq numbers (elmo-list-folder folder))
(let ((rest (nthcdr (string-to-int (elmo-filter-value filter) )
- msgs)))
+ numbers)))
(mapcar '(lambda (x)
- (delete x msgs)) rest))
- msgs)))
+ (delete x numbers)) rest))
+ numbers)))
((listp filter)
(elmo-search folder filter)))))
(defun elmo-filter-commit (spec)
(elmo-commit (nth 2 spec)))
-(defun elmo-filter-clear-killed (spec)
- (elmo-clear-killed (nth 2 spec)))
-
(defun elmo-filter-plugged-p (spec)
(elmo-folder-plugged-p (nth 2 spec)))
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 17:52:16 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
ret-val)))
(defun elmo-imap4-list-folder (spec)
- (elmo-imap4-list spec "all"))
+ (let ((killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers (elmo-imap4-list spec "all"))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-imap4-list-folder-unread (spec mark-alist unread-marks)
(if (elmo-imap4-use-flag-p spec)
(defalias 'elmo-imap4-sync-number-alist 'elmo-generic-sync-number-alist)
-(defalias 'elmo-imap4-clear-killed 'elmo-generic-clear-killed)
-
(provide 'elmo-imap4)
;;; elmo-imap4.el ends here
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 17:57:16 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(sort flist '<))))
(defun elmo-internal-list-folder (spec)
- (elmo-internal-list-folder-subr spec))
+ (let ((killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers (elmo-internal-list-folder-subr spec))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-internal-list-folder-by-location (spec location &optional msgdb)
(let* ((path (elmo-msgdb-expand-path nil spec))
(defalias 'elmo-internal-list-folder-important
'elmo-generic-list-folder-important)
(defalias 'elmo-internal-commit 'elmo-generic-commit)
-(defalias 'elmo-internal-clear-killed 'elmo-generic-clear-killed)
(provide 'elmo-internal)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 17:52:07 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(defsubst elmo-localdir-list-folder-subr (spec &optional nonsort)
(let* ((dir (elmo-localdir-get-folder-directory spec))
(flist (mapcar 'string-to-int
- (directory-files dir nil "^[0-9]+$" t))))
- (if nonsort
- (cons (or (elmo-max-of-list flist) 0) (length flist))
- (sort flist '<))))
+ (directory-files dir nil "^[0-9]+$" t)))
+ (killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers
+ (if nonsort
+ (cons (or (elmo-max-of-list flist) 0) (length flist))
+ (sort flist '<)))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-localdir-append-msg (spec string &optional msg no-see)
(let ((dir (elmo-localdir-get-folder-directory spec))
(defalias 'elmo-localdir-list-folder-important
'elmo-generic-list-folder-important)
(defalias 'elmo-localdir-commit 'elmo-generic-commit)
-(defalias 'elmo-localdir-clear-killed 'elmo-generic-clear-killed)
(provide 'elmo-localdir)
;; Yuuichi Teranishi <teranisi@gohome.org>
;; Author: OKUNISHI Fujikazu <fuji0924@mbox.kyoto-inet.or.jp>
-;; Time-stamp: <00/07/10 17:57:30 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(defalias 'elmo-localnews-list-folder-important
'elmo-generic-list-folder-important)
(defalias 'elmo-localnews-commit 'elmo-generic-commit)
-(defalias 'elmo-localnews-clear-killed 'elmo-generic-clear-killed)
(provide 'elmo-localnews)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 17:57:40 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(defun elmo-maildir-list-folder (spec)
(elmo-maildir-update-current spec)
- (elmo-maildir-list-folder-subr spec))
+ (let ((killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers (elmo-maildir-list-folder-subr spec))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-maildir-max-of-folder (spec)
(elmo-maildir-list-folder-subr spec t))
'elmo-generic-list-folder-unread)
(defalias 'elmo-maildir-list-folder-important
'elmo-generic-list-folder-important)
-(defalias 'elmo-maildir-clear-killed 'elmo-generic-clear-killed)
(provide 'elmo-maildir)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/13 10:32:40 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(expand-file-name "folder"
elmo-msgdb-dir)))
((eq type 'multi)
- (expand-file-name (elmo-safe-filename folder)
+ (setq fld (concat "*" (mapconcat 'identity (cdr spec) ",")))
+ (expand-file-name (elmo-safe-filename fld)
(expand-file-name "multi"
elmo-msgdb-dir)))
((eq type 'filter)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 17:54:06 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(defun elmo-multi-list-folder (spec)
(let* ((flds (cdr spec))
(cur-number 0)
- ret-val)
+ (killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
(while flds
(setq cur-number (+ cur-number 1))
- (setq ret-val (append
- ret-val
+ (setq numbers (append
+ numbers
(mapcar
(function
(lambda (x)
(* elmo-multi-divide-number cur-number) x)))
(elmo-list-folder (car flds)))))
(setq flds (cdr flds)))
- ret-val))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-multi-folder-exists-p (spec)
(let* ((flds (cdr spec)))
(defun elmo-multi-commit (spec)
(mapcar 'elmo-commit (cdr spec)))
-(defun elmo-multi-clear-killed (spec)
- (mapcar 'elmo-clear-killed (cdr spec)))
-
(defun elmo-multi-plugged-p (spec)
(let* ((flds (cdr spec)))
(catch 'plugged
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/11 18:02:53 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(defun elmo-nntp-list-folder (spec)
(elmo-nntp-setting spec
(let* ((server (format "%s" server)) ;; delete text property
- (killed (and elmo-nntp-use-killed-list
+ (killed (and elmo-use-killed-list
(elmo-msgdb-killed-list-load
(elmo-msgdb-expand-path nil spec))))
response numbers use-listgroup)
(setq numbers (elmo-nntp-make-msglist
(elmo-match-string 2 response)
(elmo-match-string 3 response)))))
- (delq nil
- (mapcar (lambda (number)
- (unless (memq number killed)
- number))
- numbers))))))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))))
(defun elmo-nntp-max-of-folder (spec)
(let* ((port (elmo-nntp-spec-port spec))
(ssl (elmo-nntp-spec-ssl spec))
(folder (elmo-nntp-spec-group spec))
(dir (elmo-msgdb-expand-path nil spec))
- (killed-list (and elmo-nntp-use-killed-list
+ (killed-list (and elmo-use-killed-list
(elmo-msgdb-killed-list-load dir)))
number-alist end-num)
(if elmo-nntp-groups-async
(if entry
(progn
(setq end-num (nth 2 entry))
- (when (and killed-list elmo-nntp-use-killed-list)
+ (when (and killed-list elmo-use-killed-list)
(setq killed-list (nreverse (sort killed-list '<)))
(cond
;; XXX biggest number in server is killed,
(elmo-match-string 3 response)))
(setq e-num (string-to-int
(elmo-match-string 1 response)))
- (when (and killed-list elmo-nntp-use-killed-list)
+ (when (and killed-list elmo-use-killed-list)
(setq killed-list (nreverse (sort killed-list '<)))
(cond
;; XXX biggest number in server is killed,
(save-excursion
(elmo-nntp-setting spec
(let* ((cwf (caddr connection))
- (filter (and as-num numlist))
+ (filter numlist)
+ ;(filter (and as-num numlist))
beg-num end-num cur length
ret-val ov-str use-xover dir)
(if (and folder
important-mark
seen-list
filter))))))
- (when elmo-nntp-use-killed-list
+ (when elmo-use-killed-list
(setq dir (elmo-msgdb-expand-path nil spec))
(elmo-msgdb-killed-list-save
dir
(elmo-nntp-send-data-line process sending-data))))
-(defun elmo-nntp-clear-killed (spec)
- (elmo-msgdb-killed-list-save (elmo-msgdb-expand-path nil spec) nil))
-
(defun elmo-nntp-delete-msgs (spec msgs)
"MSGS on FOLDER at SERVER pretended as Deleted. Returns nil if failed."
- (if elmo-nntp-use-killed-list
+ (if elmo-use-killed-list
(let* ((dir (elmo-msgdb-expand-path nil spec))
(killed-list (elmo-msgdb-killed-list-load dir)))
(mapcar '(lambda (msg)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 17:58:38 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(defun elmo-pipe-list-folder (spec)
(elmo-pipe-drain (elmo-pipe-spec-src spec)
(elmo-pipe-spec-dst spec))
- (elmo-list-folder (elmo-pipe-spec-dst spec)))
+ (let ((killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers (elmo-list-folder (elmo-pipe-spec-dst spec)))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-pipe-list-folder-unread (spec mark-alist unread-marks)
(elmo-list-folder-unread (elmo-pipe-spec-dst spec) mark-alist unread-marks))
(elmo-commit (elmo-pipe-spec-src spec))
(elmo-commit (elmo-pipe-spec-dst spec)))
-(defun elmo-pipe-clear-killed (spec)
- (elmo-clear-killed (elmo-pipe-spec-src spec)))
-
(defun elmo-pipe-plugged-p (spec)
(and (elmo-folder-plugged-p (elmo-pipe-spec-src spec))
(elmo-folder-plugged-p (elmo-pipe-spec-dst spec))))
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/04/28 10:28:08 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(nreverse ret-val)))))
(defun elmo-pop3-list-folder (spec)
- (save-excursion
- (elmo-pop3-flush-connection)
- (let* ((connection (elmo-pop3-get-connection spec))
- (buffer (nth 0 connection))
- (process (nth 1 connection))
- response errmsg ret-val)
- (elmo-pop3-send-command buffer process "list")
- (if (null (elmo-pop3-read-response buffer process))
- (error "POP List folder failed"))
- (if (null (setq response (elmo-pop3-read-contents buffer process)))
- (error "POP List folder failed"))
- ;; POP server always returns a sequence of serial numbers.
- (elmo-pop3-parse-list-response response))))
+ (let ((killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path nil spec))))
+ numbers)
+ (setq numbers
+ (save-excursion
+ (elmo-pop3-flush-connection)
+ (let* ((connection (elmo-pop3-get-connection spec))
+ (buffer (nth 0 connection))
+ (process (nth 1 connection))
+ response errmsg ret-val)
+ (elmo-pop3-send-command buffer process "list")
+ (if (null (elmo-pop3-read-response buffer process))
+ (error "POP List folder failed"))
+ (if (null (setq response
+ (elmo-pop3-read-contents buffer process)))
+ (error "POP List folder failed"))
+ ;; POP server always returns a sequence of serial numbers.
+ (elmo-pop3-parse-list-response response))))
+ (if killed
+ (delq nil
+ (mapcar (lambda (number)
+ (unless (memq number killed) number))
+ numbers))
+ numbers)))
(defun elmo-pop3-max-of-folder (spec)
(save-excursion
(defalias 'elmo-pop3-list-folder-important
'elmo-generic-list-folder-important)
(defalias 'elmo-pop3-commit 'elmo-generic-commit)
-(defalias 'elmo-pop3-clear-killed 'elmo-generic-clear-killed)
(provide 'elmo-pop3)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/06/15 15:30:58 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 10:35:15 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
"Non-nil means max number of msgdb is set as the max number of `list active'.
(Needed for inn 2.3 or later?).")
-(defvar elmo-nntp-use-killed-list t
+(defvar elmo-use-killed-list t
"If non-nil, deleted messages are saved as `killed'
and do not appear again.")
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/07/10 20:24:29 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
(elmo-dop-list-folder folder)))
;; list elmo-list-folders (folder)
-
(defun elmo-list-folders (folder &optional hierarchy)
(elmo-call-func folder "list-folders" hierarchy))
(car x))))
mark-alist)))
-(defun elmo-generic-clear-killed (spec)
- nil)
-
(defun elmo-generic-list-folder-important (spec overview)
nil)
(elmo-call-func folder "commit"))
(defun elmo-clear-killed (folder)
- (elmo-call-func folder "clear-killed"))
+ (elmo-msgdb-killed-list-save (elmo-msgdb-expand-path folder) nil))
;; returns cons cell of (unsync . number-of-messages-in-folder)
(defun elmo-folder-diff (fld &optional number-alist)
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/03/06 18:35:49 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <2000-06-22 09:29:22 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/03/14 19:43:18 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/06/22 09:54:34 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/03/07 17:00:30 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
-;; Time-stamp: <00/03/07 17:00:43 teranisi>
;; This file is part of ELMO (Elisp Library for Message Orchestration).