From: Chris Hanson Date: Fri, 12 May 2000 17:56:46 +0000 (+0000) Subject: Replace FOLDER-PRESENTATION-NAME with URL-PRESENTATION-NAME. X-Git-Tag: 20090517-FFI~3888 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=307a65cc29b4bdfc2b5cb01fbe98fc1d667ffd3d;p=mit-scheme.git Replace FOLDER-PRESENTATION-NAME with URL-PRESENTATION-NAME. --- diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index 9306aee2b..549e8ab37 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.52 2000/05/10 17:03:17 cph Exp $ +;;; $Id: imail-core.scm,v 1.53 2000/05/12 17:56:18 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -85,6 +85,10 @@ (define url-protocol-parsers (make-string-hash-table)) + +;; Return a string that concisely identifies URL, for use in the +;; presentation layer. +(define-generic url-presentation-name (url)) ;;;; Server operations @@ -263,12 +267,6 @@ (define-generic close-folder (folder)) -;; ------------------------------------------------------------------- -;; Return a string that concisely identifies FOLDER, for use in the -;; presentation layer. - -(define-generic folder-presentation-name (folder)) - ;; ------------------------------------------------------------------- ;; Return #T if FOLDER represents a real folder, i.e. has a ;; corresponding file or server entry. diff --git a/v7/src/imail/imail-file.scm b/v7/src/imail/imail-file.scm index 328496996..493f04257 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.20 2000/05/10 17:27:55 cph Exp $ +;;; $Id: imail-file.scm,v 1.21 2000/05/12 17:56:22 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -30,6 +30,9 @@ (define-method url-body ((url )) (pathname->short-name (file-url-pathname url))) +(define-method url-presentation-name ((url )) + (file-namestring (file-url-pathname url))) + ;;;; Server operations (define-method %delete-folder ((url )) @@ -85,9 +88,6 @@ (set-file-folder-messages! folder 'UNKNOWN) (for-each detach-message! messages))))))) -(define-method folder-presentation-name ((folder )) - (url-body (folder-url folder))) - (define-method %folder-valid? ((folder )) (file-exists? (file-folder-pathname folder))) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index b7c2ebc20..f40ad5ed8 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.30 2000/05/10 21:24:46 cph Exp $ +;;; $Id: imail-imap.scm,v 1.31 2000/05/12 17:56:24 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -99,6 +99,9 @@ (if uid (string-append "/;uid=" uid) "")))) + +(define-method url-presentation-name ((url )) + (imap-url-mailbox url)) ;;;; Server connection @@ -565,9 +568,6 @@ (define-method close-folder ((folder )) (close-imap-connection (imap-folder-connection folder))) -(define-method folder-presentation-name ((folder )) - (imap-url-mailbox (folder-url folder))) - (define-method %folder-valid? ((folder )) folder #t) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 0ebe33dc2..4a0754921 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.40 2000/05/11 00:47:27 cph Exp $ +;;; $Id: imail-top.scm,v 1.41 2000/05/12 17:56:28 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -105,16 +105,17 @@ May be called with an IMAIL folder URL as argument; (lambda (url-string) (bind-authenticator imail-authenticator (lambda () - (let* ((url + (let ((folder + (open-folder (if url-string (imail-parse-partial-url url-string) - (imail-default-url))) - (folder (open-folder url))) + (imail-default-url))))) (select-buffer (let ((buffer (or (imail-folder->buffer folder #f) (let ((buffer - (new-buffer (folder-presentation-name folder)))) + (new-buffer + (url-presentation-name (folder-url folder))))) (associate-imail-folder-with-buffer folder buffer) buffer)))) (select-message folder (first-unseen-message folder) #t) diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index e097866e3..1d8b2130b 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.4 2000/05/11 14:46:36 cph Exp $ +$Id: todo.txt,v 1.5 2000/05/12 17:56:46 cph Exp $ Bug fixes --------- @@ -34,9 +34,6 @@ Design changes Binary search can be used which should produce excellent results on large folders. UID FETCH command should be useful for this. -* Eliminate FOLDER-PRESENTATION-NAME in favor of - URL-PRESENTATION-NAME. - * Change APPEND-MESSAGE to accept arguments (MESSAGE URL) rather than (FOLDER MESSAGE) as currently. There's no need to have the folder open to append a message to it, and this requirement causes problems