X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=elmo%2Felmo-pipe.el;h=372ba2a84b3c7660e3b91c2a0f8b79efae061f05;hb=ee2dd54f276eeeca395eccf46c125c45bce5c6d8;hp=a6d1c8f6a5e117f4075c5ea353872db733bc51b9;hpb=1e366a559be4aec4ad4d3cf3e954b8e62a20d2f3;p=elisp%2Fwanderlust.git diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index a6d1c8f..372ba2a 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -1,10 +1,9 @@ ;;; elmo-pipe.el -- PIPE Interface for ELMO. -;; Copyright 1998,1999,2000 Yuuichi Teranishi +;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi ;; Author: Yuuichi Teranishi ;; Keywords: mail, net news -;; Time-stamp: <2000-03-03 14:06:56 teranisi> ;; This file is part of ELMO (Elisp Library for Message Orchestration). @@ -41,7 +40,7 @@ (defalias 'elmo-pipe-msgdb-create 'elmo-pipe-msgdb-create-as-numlist) (defun elmo-pipe-msgdb-create-as-numlist (spec numlist new-mark already-mark - seen-mark important-mark + seen-mark important-mark seen-list) (elmo-msgdb-create-as-numlist (elmo-pipe-spec-dst spec) numlist new-mark already-mark @@ -55,7 +54,7 @@ (defun elmo-pipe-read-msg (spec number outbuf) (elmo-call-func (elmo-pipe-spec-dst spec) - "read-msg" + "read-msg" number outbuf)) (defun elmo-pipe-delete-msgs (spec msgs) @@ -64,29 +63,42 @@ (defvar elmo-pipe-drained-hook nil "A hook called when the pipe is flushed.") (defun elmo-pipe-drain (src dst) - (let ((msgdb (elmo-msgdb-load src)) - elmo-nntp-use-cache + "Move all messages of SRC to DST." + (let (elmo-nntp-use-cache elmo-imap4-use-cache - elmo-pop3-use-cache) ; Inhibit caching while moving messages. + elmo-pop3-use-cache ; Inhibit caching while moving messages. + elmo-pop3-use-uidl) ; No need to use UIDL (message "Checking %s..." src) - (elmo-move-msgs src (elmo-list-folder src) dst msgdb) - (elmo-msgdb-save src msgdb) + (let ((srclist (elmo-list-folder src)) + (msgdb (elmo-msgdb-load src))) + (elmo-move-msgs src srclist dst msgdb) + ;; Don't save msgdb here. + ;; Because summary view of original folder is not updated yet. + ;; (elmo-msgdb-save src msgdb) + (elmo-commit src)) (run-hooks 'elmo-pipe-drained-hook))) (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))) - -(defun elmo-pipe-list-folder-unread (spec mark-alist unread-marks) - (elmo-list-folder-unread (elmo-pipe-spec-dst spec) mark-alist unread-marks)) + (let ((killed (and elmo-use-killed-list + (elmo-msgdb-killed-list-load + (elmo-msgdb-expand-path spec)))) + numbers) + (setq numbers (elmo-list-folder (elmo-pipe-spec-dst spec))) + (elmo-living-messages numbers killed))) + +(defun elmo-pipe-list-folder-unread (spec number-alist mark-alist unread-marks) + (elmo-list-folder-unread (elmo-pipe-spec-dst spec) + number-alist mark-alist unread-marks)) -(defun elmo-pipe-list-folder-important (spec overview) - (elmo-list-folder-important (elmo-pipe-spec-dst spec) overview)) +(defun elmo-pipe-list-folder-important (spec number-alist) + (elmo-list-folder-important (elmo-pipe-spec-dst spec) number-alist)) (defun elmo-pipe-max-of-folder (spec) - (let ((src-length (length (elmo-list-folder (elmo-pipe-spec-src spec)))) - (dst-list (elmo-list-folder (elmo-pipe-spec-dst spec)))) + (let* (elmo-pop3-use-uidl + (src-length (length (elmo-list-folder (elmo-pipe-spec-src spec)))) + (dst-list (elmo-list-folder (elmo-pipe-spec-dst spec)))) (cons (+ src-length (elmo-max-of-list dst-list)) (+ src-length (length dst-list))))) @@ -131,12 +143,15 @@ (elmo-get-msg-filename (elmo-pipe-spec-dst spec) number loc-alist)) (defun elmo-pipe-sync-number-alist (spec number-alist) - (elmo-call-func (elmo-pipe-spec-src spec) + (elmo-call-func (elmo-pipe-spec-src spec) "sync-number-alist" number-alist)) ; ?? (defun elmo-pipe-server-diff (spec) nil) -(provide 'elmo-pipe) +(defalias 'elmo-pipe-folder-diff 'elmo-generic-folder-diff) + +(require 'product) +(product-provide (provide 'elmo-pipe) (require 'elmo-version)) ;;; elmo-pipe.el ends here