requirement that the result be #F if the resource doesn't exist.
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-browser.scm,v 1.2 2001/05/26 03:02:29 cph Exp $
+;;; $Id: imail-browser.scm,v 1.3 2001/05/29 20:36:53 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(+ 1 (loop container*)))))))
(define (make-browser-line-info url)
- (vector url (url-is-container? url) #f))
+ (vector url (url-corresponding-container url) #f))
(define (browser-line-info-url info)
(vector-ref info 0))
""
()
(lambda ()
- (let ((url (selected-url)))
- (let ((container (url-is-container? url)))
+ (let ((info (browser-line-info)))
+ (let ((container (browser-line-info-container-url info)))
(if container
((ref-command imail-browse-container) (url->string container))
(editor-error "Not a selectable container."))))))
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-core.scm,v 1.139 2001/05/26 02:12:50 cph Exp $
+;;; $Id: imail-core.scm,v 1.140 2001/05/29 20:36:34 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
;; Return #T iff FOLDER-URL both exists and can be opened.
(define-generic folder-url-is-selectable? (folder-url))
-;; If URL both exists and can contain other resources, return a
-;; container URL for the same resource. Otherwise return #F.
-(define-generic url-is-container? (url))
-(define-method url-is-container? ((url <container-url>)) url)
+;; If URL can potentially contain other resources, return a container
+;; URL for the same resource. Otherwise return #F. The result is
+;; undefined if the URL doesn't represent an existing folder.
+(define-generic url-corresponding-container (url))
+(define-method url-corresponding-container ((url <container-url>)) url)
;; Return a locator for the container of URL. E.g. the container URL
;; of "imap://localhost/inbox/foo" is "imap://localhost/inbox/".
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-file.scm,v 1.74 2001/05/25 18:16:51 cph Exp $
+;;; $Id: imail-file.scm,v 1.75 2001/05/29 20:36:40 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
(define-method folder-url-is-selectable? ((url <file-url>))
(and (find-pathname-url-constructor (pathname-url-pathname url) #t #f) #t))
-(define-method url-is-container? ((url <file-url>))
+(define-method url-corresponding-container ((url <file-url>))
url
#f)
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-imap.scm,v 1.169 2001/05/29 20:26:32 cph Exp $
+;;; $Id: imail-imap.scm,v 1.170 2001/05/29 20:36:47 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
(guarantee-imap-url-list-info url)
(imap-folder-url-selectable? url))
-(define-method url-is-container? ((url <imap-folder-url>))
+(define-method url-corresponding-container ((url <imap-folder-url>))
(guarantee-imap-url-list-info url)
(imap-folder-url-corresponding-container url))