From 3295d8b134fbfa1c8f608ec98dc987b4706a672c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 1 Jun 2000 20:08:26 +0000 Subject: [PATCH] Generalize MESSAGE-MIME-BODY-PART to allow passing selector ending in HEADER or TEXT. --- v7/src/imail/imail-imap.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index bed90d16a..3e3c69ade 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.98 2000/06/01 19:29:35 cph Exp $ +;;; $Id: imail-imap.scm,v 1.99 2000/06/01 20:08:26 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -778,14 +778,24 @@ (parse-mime-body (imap-message-bodystructure message))) (define-method message-mime-body-part ((message ) selector) - (let ((section (map (lambda (n) (+ n 1)) selector))) + (let ((section + (map (lambda (x) + (if (exact-nonnegative-integer? x) + (+ x 1) + x)) + selector))) (imap:response:fetch-body-part (imap:command:uid-fetch (imap-folder-connection (message-folder message)) (imap-message-uid message) `(',(string-append "body[" (decorated-string-append - "" "." "" (map number->string section)) + "" "." "" + (map (lambda (x) + (if (exact-nonnegative-integer? x) + (number->string x) + (symbol->string x))) + section)) "]"))) section #f))) -- 2.25.1