#| -*-Scheme-*-
-$Id: imail-core.scm,v 1.164 2007/03/11 17:33:37 riastradh Exp $
+$Id: imail-core.scm,v 1.165 2007/03/11 22:38:55 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; -------------------------------------------------------------------
;; Search FOLDER for messages matching CRITERIA. At present, CRITERIA
-;; may be a string. Returns a list of messages.
+;; may be a string. Returns a list of message indices.
-(define-generic search-folder (folder criteria))
+(define (search-folder folder criteria)
+ (map (lambda (index)
+ (unmap-folder-index folder index))
+ (%search-folder folder criteria)))
+
+(define-generic %search-folder (folder criteria))
\f
;; -------------------------------------------------------------------
;; Compare FOLDER's cache with the persistent folder and return a
#| -*-Scheme-*-
-$Id: imail-file.scm,v 1.90 2007/03/11 17:33:37 riastradh Exp $
+$Id: imail-file.scm,v 1.91 2007/03/11 22:38:55 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(loop (fix:+ i 1) (fix:+ i* 1)))))))
(set-file-folder-messages! folder messages*)))))))))
-(define-method search-folder ((folder <file-folder>) criteria)
+(define-method %search-folder ((folder <file-folder>) criteria)
(cond ((string? criteria)
(let ((n (folder-length folder)))
(let loop ((index 0) (winners '()))
#| -*-Scheme-*-
-$Id: imail-imap.scm,v 1.210 2007/03/11 17:33:37 riastradh Exp $
+$Id: imail-imap.scm,v 1.211 2007/03/11 22:38:55 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(define-method expunge-deleted-messages ((folder <imap-folder>))
(imap:command:expunge (guarantee-imap-folder-open folder)))
-(define-method search-folder ((folder <imap-folder>) criteria)
+(define-method %search-folder ((folder <imap-folder>) criteria)
(map (lambda (index) (- index 1))
(imap:response:search-indices
(let ((connection (guarantee-imap-folder-open folder)))