;;; -*-Scheme-*-
;;;
-;;; $Id: imail-top.scm,v 1.92 2000/05/23 02:57:28 cph Exp $
+;;; $Id: imail-top.scm,v 1.93 2000/05/23 03:27:07 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(define-command imail-continue
"Continue composing outgoing message previously being composed."
()
- (lambda ()
- ((ref-command mail-other-window) #t)))
+ (lambda () ((ref-command mail-other-window) #t)))
(define-command imail-forward
"Forward the current message to another user.
ADDRESSES is a string consisting of several addresses separated by commas."
"sResend to"
(lambda (addresses)
- ???))
-
+ (let ((buffer (selected-buffer))
+ (message (selected-message)))
+ (make-mail-buffer
+ `(("Resent-From" ,(mail-from-string buffer))
+ ("Resent-Date" ,(universal-time->string (get-universal-time)))
+ ("Resent-To" ,addresses)
+ ,@(if (ref-variable mail-self-blind buffer)
+ `(("Resent-Bcc" ,(mail-from-string buffer)))
+ '())
+ ,@(map transform
+ (lambda (header)
+ (list (header-field-name header)
+ (header-field-value header)))
+ (list-transform-negative (message-header-fields message)
+ (lambda (header)
+ (string-ci=? (header-field-name header) "sender")))))
+ #f
+ (lambda (mail-buffer)
+ (insert-string (message-body message) (buffer-end mail-buffer))
+ (set-buffer-point! mail-buffer (buffer-start mail-buffer))
+ (if (window-has-no-neighbors? (current-window))
+ (select-buffer mail-buffer)
+ (select-buffer-other-window mail-buffer))
+ (message-resent message))))))
+\f
(define-command imail-reply
"Reply to the current message.
Normally include CC: to all other recipients of original message;
(lambda (mail-buffer)
(message-answered message)
(select-buffer-other-window mail-buffer))))))
-\f
+
(define (imail-reply-headers message cc?)
(let ((resent-reply-to
(get-last-header-field-value message "resent-reply-to" #f))
IMAIL To-Do List
-$Id: todo.txt,v 1.40 2000/05/23 02:57:49 cph Exp $
+$Id: todo.txt,v 1.41 2000/05/23 03:27:02 cph Exp $
Bug fixes
---------
* Add command to rename folders. Add command to append all of the
messages from one folder to another.
-* Add command to copy a folder from one URL to another. This
- basically creates the target, opens the source, and copies all of
- the messages.
-
-* Write M-x imail-resend.
-
* Add mail notification in mode line, active across the editor as long
as there is an IMAP connection open in some buffer.