;;; -*-Scheme-*-
;;;
-;;; $Id: imail-imap.scm,v 1.124 2000/06/23 18:46:05 cph Exp $
+;;; $Id: imail-imap.scm,v 1.125 2000/06/23 19:05:37 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(lambda (interrupt-mask)
interrupt-mask
(read-message-headers! folder n)))
- (folder-modified! folder 'INCREASE-LENGTH))
+ (folder-modified! folder 'INCREASE-LENGTH n count))
((= count n)
(set-imap-folder-messages-synchronized?! folder #t))
(else
(imap-message-uid m*))
(error "Message inserted into folder:" m*))
(loop (fix:+ i 1) i*)))))))
- (folder-modified! folder 'SET-LENGTH)))))))
+ (folder-modified! folder 'SET-LENGTH n count)))))))
\f
;;;; Message datatype
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-top.scm,v 1.184 2000/06/23 15:46:00 cph Exp $
+;;; $Id: imail-top.scm,v 1.185 2000/06/23 19:05:38 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
=> (lambda (unseen) (select-message folder unseen)))
((selected-message #f)
(message "No unseen messages"))
- ((navigator/first-message folder)
+ ((navigator/last-message folder)
=> (lambda (first) (select-message folder first)))
(else
(message "No changes to mail folder")))))))
(let ((folder (selected-folder #f buffer)))
(if (message-attached? message folder)
message
- (let ((message
- (let ((index
- (and folder
- (message-detached? message)
- (message-index message))))
- (and index
- (< index (folder-length folder))
- (get-message folder index)))))
- (buffer-put! buffer 'IMAIL-MESSAGE message)
- message)))))))))
+ (begin
+ (buffer-put! buffer 'IMAIL-MESSAGE #f)
+ #f)))))))))
(and (if (default-object? error?) #t error?)
(error "No selected IMAIL message."))))
\f
(maybe-add-command-suffix! notice-message-expunge folder
(car parameters)))
((INCREASE-LENGTH SET-LENGTH)
- (maybe-add-command-suffix! notice-message-expunge folder 0))
+ (maybe-add-command-suffix! notice-folder-length-change folder
+ (car parameters) (cadr parameters)))
(else
(maybe-add-command-suffix! notice-folder-modifications folder))))
(if (or (not m)
(message-detached? m))
(select-message folder
- (let ((length (folder-length folder)))
- (and (> length 0)
- (if (< index length)
- index
- (- length 1))))
+ (and index
+ (< index (folder-length folder))
+ index)
#t)))))
(notice-folder-modifications folder))
+(define (notice-folder-length-change folder old new)
+ (let ((buffer (imail-folder->buffer folder #f)))
+ (if buffer
+ (cond ((> new old)
+ (select-message folder old #t))
+ ((let ((m (selected-message #f buffer)))
+ (or (not m)
+ (message-detached? m)))
+ (select-message folder #f #t)))))
+ (notice-folder-modifications folder))
+
(define (notice-folder-modifications folder)
(let ((buffer (imail-folder->buffer folder #f)))
(if buffer
IMAIL To-Do List
-$Id: todo.txt,v 1.94 2000/06/22 20:19:08 cph Exp $
+$Id: todo.txt,v 1.95 2000/06/23 19:05:40 cph Exp $
Bug fixes
---------
-* If a folder has message N selected, the folder is simultaneously
- opened somewhere else, one new message is added, and message N is
- deleted, then the display is _not_ updated to reflect the new
- message.
-
* Preserve internal-date when copying to rmail folder from any other
type of folder, by writing a distinguished header field into the
rmail file.