;;; -*-Scheme-*-
;;;
-;;; $Id: imail-core.scm,v 1.56 2000/05/15 19:01:46 cph Exp $
+;;; $Id: imail-core.scm,v 1.57 2000/05/15 19:11:42 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(define-generic %move-folder (url new-url))
(define-method %move-folder ((url <url>) (new-url <url>))
- (%copy-folder url new-url)
- (%delete-folder url))
-
-;; -------------------------------------------------------------------
-;; Copy the folder named URL to be NEW-URL. Signal an error if the
-;; folder doesn't exist, if NEW-URL already refers to a folder, or if
-;; the copy can't be performed for some reason.
-
-(define (copy-folder url new-url)
- (%copy-folder (->url url) (->url new-url)))
-
-(define-generic %copy-folder (url new-url))
-
-(define-method %copy-folder ((url <url>) (new-url <url>))
+ (%new-folder new-url)
(let ((folder (open-folder url)))
(let ((n (folder-length folder)))
(do ((i 0 (+ i 1)))
((= i n))
- (%append-message (get-message folder i) new-url)))))
+ (%append-message (get-message folder i) new-url))))
+ (%delete-folder url))
;; -------------------------------------------------------------------
;; Insert a copy of MESSAGE in FOLDER at the end of the existing
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-file.scm,v 1.22 2000/05/12 18:22:50 cph Exp $
+;;; $Id: imail-file.scm,v 1.23 2000/05/15 19:11:45 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(define-method %delete-folder ((url <file-url>))
(delete-file (file-url-pathname url)))
-;;; The next two methods only work when operating on two URLs of the
-;;; same class. Otherwise, it's necessary to do format conversions;
-;;; this is handled at a higher level in the class heirarchy.
+;;; The next method only works when operating on two URLs of the same
+;;; class. Otherwise, it's necessary to do format conversions; this
+;;; is handled at a higher level in the class heirarchy.
(define-computed-method %move-folder ((uc1 <file-url>) (uc2 <file-url>))
(and (eq? uc1 uc2)
;; fails, such as moving across file systems under unix.
(rename-file (file-url-pathname url) (file-url-pathname new-url)))))
-(define-computed-method %copy-folder ((uc1 <file-url>) (uc2 <file-url>))
- (and (eq? uc1 uc2)
- (lambda (url new-url)
- (copy-file (file-url-pathname url) (file-url-pathname new-url)))))
-
(define-method available-folder-names ((url <file-url>))
url
(error "Unimplemented operation:" 'AVAILABLE-FOLDER-NAMES))
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-imap.scm,v 1.34 2000/05/15 19:01:50 cph Exp $
+;;; $Id: imail-imap.scm,v 1.35 2000/05/15 19:11:47 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(define-method %move-folder ((url <imap-url>) (new-url <imap-url>))
???)
-(define-method %copy-folder ((url <imap-url>) (new-url <imap-url>))
- ???)
-
(define-method %append-message ((message <message>) (url <imap-url>))
???)
IMAIL To-Do List
-$Id: todo.txt,v 1.9 2000/05/15 19:08:47 cph Exp $
+$Id: todo.txt,v 1.10 2000/05/15 19:11:52 cph Exp $
Bug fixes
---------
Design changes
--------------
-* Eliminate COPY-FOLDER operation. Implement something closer to the
- IMAP COPY operation, e.g. APPEND-MESSAGES.
+* Implement something closer to the IMAP COPY operation, e.g.
+ APPEND-MESSAGES.
* Reimplement UID synchronization. Take advantage of monotonic UID
numbers to discover largest prefix range that hasn't changed.