From 30d38d2cf696026c4762e2c1dd5dfdd1d621ef09 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 15 May 2000 19:11:52 +0000 Subject: [PATCH] Eliminate COPY-FOLDER. --- v7/src/imail/imail-core.scm | 20 ++++---------------- v7/src/imail/imail-file.scm | 13 ++++--------- v7/src/imail/imail-imap.scm | 5 +---- v7/src/imail/todo.txt | 6 +++--- 4 files changed, 12 insertions(+), 32 deletions(-) diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index d153c69ce..00f32c6b8 100644 --- a/v7/src/imail/imail-core.scm +++ b/v7/src/imail/imail-core.scm @@ -1,6 +1,6 @@ ;;; -*-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 ;;; @@ -137,25 +137,13 @@ (define-generic %move-folder (url new-url)) (define-method %move-folder ((url ) (new-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 ) (new-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 diff --git a/v7/src/imail/imail-file.scm b/v7/src/imail/imail-file.scm index abcc2bed9..46bb6fa1a 100644 --- a/v7/src/imail/imail-file.scm +++ b/v7/src/imail/imail-file.scm @@ -1,6 +1,6 @@ ;;; -*-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 ;;; @@ -38,9 +38,9 @@ (define-method %delete-folder ((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 ) (uc2 )) (and (eq? uc1 uc2) @@ -49,11 +49,6 @@ ;; 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 ) (uc2 )) - (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 )) url (error "Unimplemented operation:" 'AVAILABLE-FOLDER-NAMES)) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index ed8789286..7783f4de1 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ ;;; -*-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 ;;; @@ -516,9 +516,6 @@ (define-method %move-folder ((url ) (new-url )) ???) -(define-method %copy-folder ((url ) (new-url )) - ???) - (define-method %append-message ((message ) (url )) ???) diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index beaa99742..2c6a5ccff 100644 --- a/v7/src/imail/todo.txt +++ b/v7/src/imail/todo.txt @@ -1,5 +1,5 @@ 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 --------- @@ -39,8 +39,8 @@ 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. -- 2.25.1