From 6d9d081dc5ef9a01cfdb0f6952fca87095454664 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 13 Jun 2000 21:18:45 +0000 Subject: [PATCH] Change M-x imail-get-new-mail so that it selects the first unseen message, or does nothing otherwise. This will be more robust when resynchronizing the folder, and will also provide a command to move to the first unseen message. --- v7/src/imail/imail-top.scm | 28 +++++----------------------- v7/src/imail/todo.txt | 11 +---------- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 6044baf2a..bd1fa06d5 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.149 2000/06/12 04:04:51 cph Exp $ +;;; $Id: imail-top.scm,v 1.150 2000/06/13 21:18:24 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -1955,30 +1955,12 @@ A prefix argument says to prompt for a URL and append all messages (if url-string ((ref-command imail-input-from-folder) url-string) (let* ((folder (selected-folder)) - (count (folder-modification-count folder)) - ;; NAVIGATOR/LAST-MESSAGE must run _after_ - ;; FOLDER-MODIFICATION-COUNT as it can potentially change - ;; its value. (E.g. when IMAP folder is closed, this - ;; reopens it, reads new information from the server, and - ;; changes the modification count.) - (last (navigator/last-message folder))) + (count (folder-modification-count folder))) (probe-folder folder) (if (> (folder-modification-count folder) count) - (select-message - folder - (or (cond ((not last) - (navigator/first-message folder)) - ((message-attached? last folder) - (navigator/next-message last)) - ((message-index last) - => (lambda (index) - (let ((index (+ index 1))) - (if (< index (folder-length folder)) - (get-message folder index) - (navigator/first-unseen-message - folder))))) - (else (navigator/first-unseen-message folder))) - (selected-message #f))) + (select-message folder + (or (navigator/first-unseen-message folder) + (selected-message #f))) (message "(No changes to mail folder)")))))) (define-command imail-save-folder diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index 7eb7da85a..99a36843f 100644 --- a/v7/src/imail/todo.txt +++ b/v7/src/imail/todo.txt @@ -1,16 +1,9 @@ IMAIL To-Do List -$Id: todo.txt,v 1.76 2000/06/12 01:39:09 cph Exp $ +$Id: todo.txt,v 1.77 2000/06/13 21:18:45 cph Exp $ Bug fixes --------- -* M-x imail-get-new-mail doesn't select message right when mailbox has - changed significantly since last sync. It ignores the UNSEEN - attribute and uses the message indexes. It should pay attention to - UNSEEN and to UIDNEXT to figure out what it needs to do. [See also - the note below regarding redesign of the UID synchronization code. - These may be related problems.] - * Must be able to handle malformed headers in incoming mail. Generating a low-level error in this situation is unacceptable. @@ -38,8 +31,6 @@ New features big binary things but small text things that are easier to view inline. -* Command to move to first unseen message in folder. - * In M-x imail-copy-folder, default the target buffer to have the same name as the source buffer, e.g. from "foo.rmail" to "inbox.foo". [It may not be obvious how to do this as I'm not sure how to specify -- 2.25.1