From 21405d68bdac118950866b11a7721ef247a72ed8 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 22 May 2000 19:50:15 +0000 Subject: [PATCH] Implement workaround to keep the IMAP connection open when writing multiple messages. --- v7/src/imail/imail-top.scm | 15 ++++++++++----- v7/src/imail/todo.txt | 5 +---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 34f59ee38..9b1325d38 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.84 2000/05/22 14:50:30 cph Exp $ +;;; $Id: imail-top.scm,v 1.85 2000/05/22 19:48:23 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -923,10 +923,15 @@ This command is meant to be used to move the contents of a folder (lambda (url-string) (let ((folder (selected-folder)) (to (imail-parse-partial-url url-string))) - (let ((n (folder-length folder))) - (do ((i 0 (+ i 1))) - ((= i n)) - (append-message (get-message folder i) to)))))) + ;; Kludge: by opening the folder, we prevent a condition where + ;; writing messages to an IMAP folder opens a new connection for + ;; each message. + (with-open-folder to + (lambda () + (let ((n (folder-length folder))) + (do ((i 0 (+ i 1))) + ((= i n)) + (append-message (get-message folder i) to)))))))) ;;;; Sending mail diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index 5978dd509..186397c41 100644 --- a/v7/src/imail/todo.txt +++ b/v7/src/imail/todo.txt @@ -1,5 +1,5 @@ IMAIL To-Do List -$Id: todo.txt,v 1.35 2000/05/22 15:25:43 cph Exp $ +$Id: todo.txt,v 1.36 2000/05/22 19:50:15 cph Exp $ Bug fixes --------- @@ -10,9 +10,6 @@ Bug fixes * Login messages interfere with modeline when doing completion on IMAP URLs. -* M-x imail-copy-message reopens the IMAP connection for each message - that it sends. - * Implement operations for IMAP: URL-EXISTS?. * Recovery from server disconnection should be more transparent. -- 2.25.1