[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-mit-scheme] imail: message shouldn't retain deleted flag when f
From: |
Taylor R Campbell |
Subject: |
Re: [Bug-mit-scheme] imail: message shouldn't retain deleted flag when filed |
Date: |
Thu, 30 Apr 2009 20:41:39 -0400 |
User-agent: |
IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+ |
Sorry, there was a bug in the patch for option 1. I have tested it
more thoroughly now. Here is the fixed patch:
((lambda (form)
(eval form (->environment '(EDWIN IMAIL IMAP-FOLDER))))
'(define-method %append-message ((message <message>) (url <imap-folder-url>))
(let ((folder (message-folder message))
(flags (flags-delete "recent" (message-permanent-flags message)))
(maybe-create
(lambda (connection thunk)
(if (imap:catch-no-response
(lambda (response)
(let ((code (imap:response:response-text-code response)))
(and code
(imap:response-code:trycreate? code))))
(lambda ()
(thunk)
#f))
(begin
(imap:command:create connection (imap-url-server-mailbox url))
(thunk)
#t)))))
(if (and (lset= string-ci=?
flags
(flags-delete "recent" (message-flags message)))
(let ((url* (resource-locator folder)))
(and (imap-url? url*)
(compatible-imap-urls? url url*))))
(let ((connection (guarantee-imap-folder-open folder)))
(maybe-create connection
(lambda ()
(imap:command:uid-copy connection
(imap-message-uid message)
(imap-url-server-mailbox url)))))
(with-open-imap-connection url
(lambda (connection)
(maybe-create connection
(lambda ()
(imap:command:append connection
(imap-url-server-mailbox url)
(map imail-flag->imap-flag flags)
(message-internal-time message)
(message->string message))))))))))