+2002-09-08 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * elmo-dop.el (elmo-dop-queue-flush): Perform plugged ones only so
+ as not to clear queue unexpectedly. (Ref. [wl:9778],[wl:10493])
+
2002-09-03 Yuuichi Teranishi <teranisi@gohome.org>
* pldap.el (ldap-decode-string): Return string as-is if
If optional argument FORCE is non-nil, try flushing all operation queues
even an operation concerns the unplugged folder."
(elmo-dop-queue-merge)
- (let ((queue elmo-dop-queue)
+ (let ((queue-all elmo-dop-queue)
+ queue
(count 0)
- folder
len)
;; obsolete
- (unless (or (null queue)
- (vectorp (car queue)))
+ (unless (or (null queue-all)
+ (vectorp (car queue-all)))
(if (y-or-n-p "Saved queue is old version(2.6). Clear all pending operations? ")
(progn
(setq elmo-dop-queue nil)
(message "All pending operations are cleared.")
(elmo-dop-queue-save))
(error "Please use 2.6 or earlier.")))
+ (while queue-all
+ (if (elmo-folder-plugged-p
+ (elmo-make-folder (elmo-dop-queue-fname (car queue-all))))
+ (setq queue (append queue (list (car queue-all)))))
+ (setq queue-all (cdr queue-all)))
(setq count (length queue))
(when (> count 0)
(if (elmo-y-or-n-p
(elmo-make-folder
(elmo-dop-queue-fname (car queue))))
(elmo-folder-open folder)
- (unless (elmo-folder-plugged-p folder)
+ (unless (elmo-folder-plugged-p folder); redundant?
(error "Unplugged.")))
(elmo-dop-queue-arguments (car queue)))
(elmo-folder-close folder))
performed num)
(sit-for 0) ;
(elmo-dop-queue-save)))
- (if (elmo-y-or-n-p "Clear all pending operations? "
+ ;; when answer=NO against performing dop
+ (if (elmo-y-or-n-p "Clear these pending operations? "
(not elmo-dop-flush-confirm) t)
(progn
- (setq elmo-dop-queue nil)
- (message "All pending operations are cleared.")
+ (while queue
+ (setq elmo-dop-queue (delq (car queue) elmo-dop-queue))
+ (setq queue (cdr queue)))
+ (message "Pending operations are cleared.")
(elmo-dop-queue-save))
(message "")))
count)))